]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-dhcp6.c
The stuff in the "linux-include" directory is no longer needed, as we no
[tcpdump] / print-dhcp6.c
index 5fbf5587fd409edb53f0239099413deb58e37c51..8a22bf589229606fd1a650d98037506097418e31 100644 (file)
@@ -29,7 +29,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.9 2000-07-01 03:39:02 assar Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.12 2000-10-24 00:56:50 fenner Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -42,7 +42,6 @@ static const char rcsid[] =
 
 struct mbuf;
 struct rtentry;
-#include <net/if.h>
 
 #include <netinet/in.h>
 
@@ -57,10 +56,10 @@ struct rtentry;
 #include "dhcp6opt.h"
 
 #if 0
-static void dhcp6opttab_init __P((void));
-static struct dhcp6_opt *dhcp6opttab_byname __P((char *));
+static void dhcp6opttab_init (void);
+static struct dhcp6_opt *dhcp6opttab_byname (char *);
 #endif
-static struct dhcp6_opt *dhcp6opttab_bycode __P((u_int));
+static struct dhcp6_opt *dhcp6opttab_bycode (u_int);
 
 static char tstr[] = " [|dhcp6]";
 
@@ -153,7 +152,6 @@ dhcp6ext_print(u_char *cp, u_char *ep)
 
        if (cp == ep)
                return;
-       printf(" ");
        while (cp < ep) {
                if (ep - cp < sizeof(u_int16_t))
                        break;
@@ -191,11 +189,11 @@ dhcp6ext_print(u_char *cp, u_char *ep)
                        break;
                }
                if (cp + 4 + len > ep) {
-                       printf("[|%s]", p->name);
+                       printf(" [|%s]", p->name);
                        return;
                }
 
-               printf("(%s, ", p->name);
+               printf(" (%s, ", p->name);
                switch (p->type) {
                case OT6_V6:
                        for (i = 0; i < len; i += 16) {
@@ -252,7 +250,7 @@ dhcp6_print(register const u_char *cp, u_int length,
                        break;
                }
 
-               printf(" solicit(");    /*)*/
+               printf(" solicit (");   /*)*/
                if (dh6->dh6_sol.dh6sol_flags != 0) {
                        u_int8_t f = dh6->dh6_sol.dh6sol_flags;
                        printf("%s%s ",
@@ -279,7 +277,7 @@ dhcp6_print(register const u_char *cp, u_int length,
                        printf(" advert");
                        break;
                }
-               printf(" advert(");     /*)*/
+               printf(" advert (");    /*)*/
                memcpy(&field16, &dh6->dh6_adv.dh6adv_rsv_id, sizeof(field16));
                printf("solicit-ID=%d",
                       ntohs(field16) & DH6SOL_SOLICIT_ID_MASK); 
@@ -300,7 +298,7 @@ dhcp6_print(register const u_char *cp, u_int length,
                        printf(" request");
                        break;
                }
-               printf(" request(");    /*)*/
+               printf(" request (");   /*)*/
                if (dh6->dh6_req.dh6req_flags != 0) {
                        u_int8_t f = dh6->dh6_req.dh6req_flags;
                        printf("%s%s ",
@@ -323,7 +321,7 @@ dhcp6_print(register const u_char *cp, u_int length,
                        printf(" reply");
                        break;
                }
-               printf(" reply(");      /*)*/
+               printf(" reply (");     /*)*/
                if ((dh6->dh6_rep.dh6rep_flagandstat & DH6REP_RELAYPRESENT) != 0)
                        printf("R ");
                printf("stat=0x%02x",