version 1.49, 2006/11/17 01:11:23 |
version 1.50, 2007/06/04 12:20:24 |
|
|
#include <netinet/in.h> |
#include <netinet/in.h> |
#include <netinet/in_var.h> |
#include <netinet/in_var.h> |
#include <netinet/if_ether.h> |
#include <netinet/if_ether.h> |
#include <netipx/ipx.h> |
|
#include <netipx/ipx_if.h> |
|
#include <arpa/inet.h> |
#include <arpa/inet.h> |
|
|
#include <limits.h> |
#include <limits.h> |
|
|
#ifdef INET6 |
#ifdef INET6 |
struct in6_ifaddr in6; |
struct in6_ifaddr in6; |
#endif |
#endif |
struct ipx_ifaddr ipx; |
|
} ifaddr; |
} ifaddr; |
u_long total, ifaddraddr; |
u_long total, ifaddraddr; |
struct sockaddr *sa; |
struct sockaddr *sa; |
|
|
} |
} |
break; |
break; |
#endif |
#endif |
case AF_IPX: |
|
{ |
|
struct sockaddr_ipx *sipx = |
|
(struct sockaddr_ipx *)sa; |
|
u_long net; |
|
char netnum[8]; |
|
|
|
*(union ipx_net *)&net = sipx->sipx_addr.ipx_net; |
|
snprintf(netnum, sizeof netnum, "%XH", |
|
ntohl(net)); |
|
printf("ipx:%-8s", netnum); |
|
printf("%-17s ", |
|
ipx_phost((struct sockaddr *)sipx)); |
|
} |
|
break; |
|
case AF_APPLETALK: |
case AF_APPLETALK: |
printf("atlk:%-12s",atalk_print(sa,0x10) ); |
printf("atlk:%-12s",atalk_print(sa,0x10) ); |
printf("%-12s ",atalk_print(sa,0x0b) ); |
printf("%-12s ",atalk_print(sa,0x0b) ); |
|
|
{ |
{ |
signalled = YES; |
signalled = YES; |
} |
} |
|
|
char * |
|
ipx_phost(struct sockaddr *sa) |
|
{ |
|
struct sockaddr_ipx *sipx = (struct sockaddr_ipx *)sa; |
|
struct sockaddr_ipx work; |
|
static union ipx_net ipx_zeronet; |
|
char *p; |
|
|
|
work = *sipx; |
|
work.sipx_addr.ipx_port = 0; |
|
work.sipx_addr.ipx_net = ipx_zeronet; |
|
|
|
p = ipx_print((struct sockaddr *)&work); |
|
if (strncmp("0H.", p, 3) == 0) |
|
p += 3; |
|
return(p); |
|
} |
|
|
|