|
Lines 20-25
Link Here
|
| 20 |
#include <netinet/in.h> |
20 |
#include <netinet/in.h> |
| 21 |
#include <arpa/inet.h> |
21 |
#include <arpa/inet.h> |
| 22 |
|
22 |
|
|
|
23 |
#ifdef HAVE_BLUETOOTH |
| 24 |
#include <bluetooth/bluetooth.h> |
| 25 |
#include <bluetooth/rfcomm.h> |
| 26 |
#endif |
| 27 |
|
| 23 |
#include <ctype.h> |
28 |
#include <ctype.h> |
| 24 |
#include <errno.h> |
29 |
#include <errno.h> |
| 25 |
#include <netdb.h> |
30 |
#include <netdb.h> |
|
Lines 60-65
get_remote_hostname(int sock, int use_dns)
Link Here
|
| 60 |
cleanup_exit(255); |
65 |
cleanup_exit(255); |
| 61 |
} |
66 |
} |
| 62 |
|
67 |
|
|
|
68 |
#ifdef HAVE_BLUETOOTH |
| 69 |
if (from.ss_family == AF_BLUETOOTH) { |
| 70 |
struct sockaddr_rc *from_rc = (void *)&from; |
| 71 |
char ba[28]; |
| 72 |
|
| 73 |
sprintf(ba, "Bluetooth:"); |
| 74 |
ba2str(&from_rc->rc_bdaddr, ba + 10); |
| 75 |
return xstrdup(ba); |
| 76 |
} |
| 77 |
#endif |
| 63 |
if (from.ss_family == AF_INET) |
78 |
if (from.ss_family == AF_INET) |
| 64 |
check_ip_options(sock, ntop); |
79 |
check_ip_options(sock, ntop); |
| 65 |
|
80 |
|
|
Lines 264-269
get_socket_address(int sock, int remote, int flags)
Link Here
|
| 264 |
return NULL; |
279 |
return NULL; |
| 265 |
} |
280 |
} |
| 266 |
|
281 |
|
|
|
282 |
#ifdef HAVE_BLUETOOTH |
| 283 |
if (addr.ss_family == AF_BLUETOOTH) { |
| 284 |
struct sockaddr_rc *from_rc = (void *)&addr; |
| 285 |
char ba[28]; |
| 286 |
|
| 287 |
sprintf(ba, "Bluetooth:"); |
| 288 |
ba2str(&from_rc->rc_bdaddr, ba + 10); |
| 289 |
return xstrdup(ba); |
| 290 |
} |
| 291 |
#endif |
| 267 |
/* Work around Linux IPv6 weirdness */ |
292 |
/* Work around Linux IPv6 weirdness */ |
| 268 |
if (addr.ss_family == AF_INET6) |
293 |
if (addr.ss_family == AF_INET6) |
| 269 |
addrlen = sizeof(struct sockaddr_in6); |
294 |
addrlen = sizeof(struct sockaddr_in6); |
|
Lines 375-380
get_sock_port(int sock, int local)
Link Here
|
| 375 |
} |
400 |
} |
| 376 |
} |
401 |
} |
| 377 |
|
402 |
|
|
|
403 |
#ifdef HAVE_BLUETOOTH |
| 404 |
if (from.ss_family == AF_BLUETOOTH) { |
| 405 |
struct sockaddr_rc *from_rc = (void *)&from; |
| 406 |
|
| 407 |
return from_rc->rc_channel; |
| 408 |
} |
| 409 |
#endif |
| 378 |
/* Work around Linux IPv6 weirdness */ |
410 |
/* Work around Linux IPv6 weirdness */ |
| 379 |
if (from.ss_family == AF_INET6) |
411 |
if (from.ss_family == AF_INET6) |
| 380 |
fromlen = sizeof(struct sockaddr_in6); |
412 |
fromlen = sizeof(struct sockaddr_in6); |