-/* 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;
-static int flag_inet;
-
-static struct aftrans_t {
- char *alias;
- char *name;
- int *flag;
-} aftrans[] = {
-
- {
- "ip", "inet", &flag_inet},
-#ifdef HAVE_AFINET6
- {
- "ip6", "inet6", &flag_inet6},
-#endif
- {
- "inet", "inet", &flag_inet},
-#ifdef HAVE_AFINET6
- {
- "inet6", "inet6", &flag_inet6},
-#endif
- {
- "unix", "unix", &flag_unx}, {
- "tcpip", "inet", &flag_inet},
- {
- 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);
-}
-