]> The Tcpdump Group git mirrors - tcpdump/commitdiff
from Carles Kishimoto <[email protected]>: add support for two more bootp...
authorhannes <hannes>
Thu, 20 Sep 2007 15:04:45 +0000 (15:04 +0000)
committerhannes <hannes>
Thu, 20 Sep 2007 15:04:45 +0000 (15:04 +0000)
print-bootp.c

index 9d1e43921bf614b696fa6c3ba8e436e594dbbeba..b442c18388a75e479102eee426a0e1d1baa566c3 100644 (file)
@@ -22,7 +22,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.87 2007-08-21 21:59:12 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.88 2007-09-20 15:04:45 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -352,9 +352,13 @@ static struct tok dhcp_msg_values[] = {
         { 0,                   NULL }
 };
 
-#define AGENT_SUBOPTION_CIRCUIT_ID 1
+#define AGENT_SUBOPTION_CIRCUIT_ID     1       /* RFC 3046 */
+#define AGENT_SUBOPTION_REMOTE_ID      2       /* RFC 3046 */
+#define AGENT_SUBOPTION_SUBSCRIBER_ID  6       /* RFC 3993 */
 static struct tok agent_suboption_values[] = {
         { AGENT_SUBOPTION_CIRCUIT_ID, "Circuit-ID" },
+        { AGENT_SUBOPTION_REMOTE_ID, "Remote-ID" },
+        { AGENT_SUBOPTION_SUBSCRIBER_ID, "Subscriber-ID" },
         { 0,                   NULL }
 };
 
@@ -686,9 +690,11 @@ rfc1048_print(register const u_char *bp)
                                           suboptlen);
                                        switch (subopt) {
 
-                                       case AGENT_SUBOPTION_CIRCUIT_ID:
-                                               fn_printn(bp, suboptlen, NULL);
-                                               break;
+                                        case AGENT_SUBOPTION_CIRCUIT_ID: /* fall through */
+                                        case AGENT_SUBOPTION_REMOTE_ID:
+                                        case AGENT_SUBOPTION_SUBSCRIBER_ID:
+                                                fn_printn(bp, suboptlen, NULL);
+                                                break;
 
                                        default:
                                                print_unknown_data(bp, "\n\t\t", suboptlen);