-/* This structure defines protocol families and their handlers. */
-struct aftype {
- const char *name;
- const char *title;
- int af;
- int alen;
- char *(*print) (unsigned char *);
- char *(*sprint) (struct sockaddr *, int numeric);
- int (*input) (int type, char *bufp, struct sockaddr *);
- void (*herror) (char *text);
- int (*rprint) (int options);
- int (*rinput) (int typ, int ext, char **argv);
-
- /* may modify src */
- int (*getmask) (char *src, struct sockaddr * mask, char *name);
-
- int fd;
- char *flag_file;
-};
-
-#ifdef KEEP_UNUSED
-
-static int flag_unx;
-
-#ifdef HAVE_AFIPX
-static int flag_ipx;
-#endif
-#ifdef HAVE_AFX25
-static int flag_ax25;
-#endif
-#ifdef HAVE_AFATALK
-static int flag_ddp;
-#endif
-#ifdef HAVE_AFNETROM
-static int flag_netrom;
-#endif
-static int flag_inet;
-
-#ifdef HAVE_AFINET6
-static int flag_inet6;
-#endif
-#ifdef HAVE_AFECONET
-static int flag_econet;
-#endif
-#ifdef HAVE_AFX25
-static int flag_x25 = 0;
-#endif
-#ifdef HAVE_AFASH
-static int flag_ash;
-#endif
-
-
-static struct aftrans_t {
- char *alias;
- char *name;
- int *flag;
-} aftrans[] = {
-
-#ifdef HAVE_AFX25
- {
- "ax25", "ax25", &flag_ax25},
-#endif
- {
- "ip", "inet", &flag_inet},
-#ifdef HAVE_AFINET6
- {
- "ip6", "inet6", &flag_inet6},
-#endif
-#ifdef HAVE_AFIPX
- {
- "ipx", "ipx", &flag_ipx},
-#endif
-#ifdef HAVE_AFATALK
- {
- "appletalk", "ddp", &flag_ddp},
-#endif
-#ifdef HAVE_AFNETROM
- {
- "netrom", "netrom", &flag_netrom},
-#endif
- {
- "inet", "inet", &flag_inet},
-#ifdef HAVE_AFINET6
- {
- "inet6", "inet6", &flag_inet6},
-#endif
-#ifdef HAVE_AFATALK
- {
- "ddp", "ddp", &flag_ddp},
-#endif
- {
- "unix", "unix", &flag_unx}, {
- "tcpip", "inet", &flag_inet},
-#ifdef HAVE_AFECONET
- {
- "econet", "ec", &flag_econet},
-#endif
-#ifdef HAVE_AFX25
- {
- "x25", "x25", &flag_x25},
-#endif
-#ifdef HAVE_AFASH
- {
- "ash", "ash", &flag_ash},
-#endif
- {
- 0, 0, 0}
-};
-
-static char afname[256] = "";
-#endif /* KEEP_UNUSED */
-
-#if HAVE_AFUNIX
-
-/* Display a UNIX domain address. */
-static char *UNIX_print(unsigned char *ptr)
-{
- return (ptr);
-}
-
-
-/* Display a UNIX domain address. */
-static char *UNIX_sprint(struct sockaddr *sap, int numeric)
-{
- static char buf[64];
-
- if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
- return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf));
- return (UNIX_print(sap->sa_data));
-}
-
-
-static struct aftype unix_aftype = {
- "unix", "UNIX Domain", AF_UNIX, 0,
- UNIX_print, UNIX_sprint, NULL, NULL,
- NULL, NULL, NULL,
- -1,
- "/proc/net/unix"
-};
-#endif /* HAVE_AFUNIX */
-
-#if HAVE_AFINET
-
-#ifdef KEEP_UNUSED
-static void INET_reserror(char *text)
-{
- herror(text);
-}
-
-/* Display an Internet socket address. */
-static char *INET_print(unsigned char *ptr)
-{
- return (inet_ntoa((*(struct in_addr *) ptr)));
-}
-#endif /* KEEP_UNUSED */
-