main.c (2e37c5a333bd995157935bdd3160558ca01c1959) main.c (9cc22e5c8903f1d455cd3246a667dd017fb75878)
1/*
2 * Copyright (c) 1983, 1988, 1993
3 * Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 221 unchanged lines hidden (view full) ---

230 { N_NGSOCKS, -1, 1, netgraphprotopr,
231 NULL, NULL, "ctrl", 0 },
232 { N_NGSOCKS, -1, 1, netgraphprotopr,
233 NULL, NULL, "data", 0 },
234 { -1, -1, 0, NULL,
235 NULL, NULL, NULL, 0 }
236};
237
1/*
2 * Copyright (c) 1983, 1988, 1993
3 * Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 221 unchanged lines hidden (view full) ---

230 { N_NGSOCKS, -1, 1, netgraphprotopr,
231 NULL, NULL, "ctrl", 0 },
232 { N_NGSOCKS, -1, 1, netgraphprotopr,
233 NULL, NULL, "data", 0 },
234 { -1, -1, 0, NULL,
235 NULL, NULL, NULL, 0 }
236};
237
238#ifdef IPX
238struct protox ipxprotox[] = {
239 { N_IPX, N_IPXSTAT, 1, ipxprotopr,
240 ipx_stats, NULL, "ipx", 0 },
241 { N_IPX, N_SPXSTAT, 1, ipxprotopr,
242 spx_stats, NULL, "spx", 0 },
243 { -1, -1, 0, NULL,
244 NULL, NULL, 0, 0 }
245};
239struct protox ipxprotox[] = {
240 { N_IPX, N_IPXSTAT, 1, ipxprotopr,
241 ipx_stats, NULL, "ipx", 0 },
242 { N_IPX, N_SPXSTAT, 1, ipxprotopr,
243 spx_stats, NULL, "spx", 0 },
244 { -1, -1, 0, NULL,
245 NULL, NULL, 0, 0 }
246};
247#endif
246
247struct protox *protoprotox[] = {
248 protox,
249#ifdef INET6
250 ip6protox,
251#endif
252#ifdef IPSEC
253 pfkeyprotox,
254#endif
248
249struct protox *protoprotox[] = {
250 protox,
251#ifdef INET6
252 ip6protox,
253#endif
254#ifdef IPSEC
255 pfkeyprotox,
256#endif
255 ipxprotox, atalkprotox, NULL };
257#ifdef IPX
258 ipxprotox,
259#endif
260 atalkprotox, NULL };
256
257const char *pluralies(int);
258static void printproto(struct protox *, const char *);
259static void usage(void);
260static struct protox *name2protox(char *);
261static struct protox *knownname(char *);
262
263static kvm_t *kvmd;

--- 248 unchanged lines hidden (view full) ---

512 for (tp = ip6protox; tp->pr_name; tp++)
513 printproto(tp, tp->pr_name);
514#endif /*INET6*/
515#ifdef IPSEC
516 if (af == PF_KEY || af == AF_UNSPEC)
517 for (tp = pfkeyprotox; tp->pr_name; tp++)
518 printproto(tp, tp->pr_name);
519#endif /*IPSEC*/
261
262const char *pluralies(int);
263static void printproto(struct protox *, const char *);
264static void usage(void);
265static struct protox *name2protox(char *);
266static struct protox *knownname(char *);
267
268static kvm_t *kvmd;

--- 248 unchanged lines hidden (view full) ---

517 for (tp = ip6protox; tp->pr_name; tp++)
518 printproto(tp, tp->pr_name);
519#endif /*INET6*/
520#ifdef IPSEC
521 if (af == PF_KEY || af == AF_UNSPEC)
522 for (tp = pfkeyprotox; tp->pr_name; tp++)
523 printproto(tp, tp->pr_name);
524#endif /*IPSEC*/
525#ifdef IPX
520 if (af == AF_IPX || af == AF_UNSPEC) {
521 kread(0, 0, 0);
522 for (tp = ipxprotox; tp->pr_name; tp++)
523 printproto(tp, tp->pr_name);
524 }
526 if (af == AF_IPX || af == AF_UNSPEC) {
527 kread(0, 0, 0);
528 for (tp = ipxprotox; tp->pr_name; tp++)
529 printproto(tp, tp->pr_name);
530 }
531#endif /* IPX */
525 if (af == AF_APPLETALK || af == AF_UNSPEC)
526 for (tp = atalkprotox; tp->pr_name; tp++)
527 printproto(tp, tp->pr_name);
528 if (af == AF_NETGRAPH || af == AF_UNSPEC)
529 for (tp = netgraphprotox; tp->pr_name; tp++)
530 printproto(tp, tp->pr_name);
531 if ((af == AF_UNIX || af == AF_UNSPEC) && !Lflag && !sflag)
532 unixpr();

--- 174 unchanged lines hidden ---
532 if (af == AF_APPLETALK || af == AF_UNSPEC)
533 for (tp = atalkprotox; tp->pr_name; tp++)
534 printproto(tp, tp->pr_name);
535 if (af == AF_NETGRAPH || af == AF_UNSPEC)
536 for (tp = netgraphprotox; tp->pr_name; tp++)
537 printproto(tp, tp->pr_name);
538 if ((af == AF_UNIX || af == AF_UNSPEC) && !Lflag && !sflag)
539 unixpr();

--- 174 unchanged lines hidden ---