]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Add printer for encapsulate expression.
authorTed Lemon <source@isc.org>
Mon, 5 Apr 1999 16:18:22 +0000 (16:18 +0000)
committerTed Lemon <source@isc.org>
Mon, 5 Apr 1999 16:18:22 +0000 (16:18 +0000)
common/print.c

index 6f1e7ebe49950dcd13e3e178a9c483774ad11693..9ffefb7b2c6691e55d69a219bd1c6d644f792b26 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: print.c,v 1.21 1999/03/16 05:50:36 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: print.c,v 1.22 1999/04/05 16:18:22 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -440,6 +440,17 @@ static int print_subexpression (expr, buf, len)
                buf [rv] = 0;
                return rv;
 
+             case expr_encapsulate:
+               rv = 13;
+               strcpy (buf, "(encapsulate ");
+               rv += expr -> data.encapsulate.len;
+               if (rv + 2 > len)
+                       rv = len - 2;
+               strncpy (buf, expr -> data.encapsulate.data, rv - 13);
+               buf [rv++] = ')';
+               buf [rv++] = 0;
+               break;
+
              case expr_extract_int8:
                if (len > 7) {
                        rv = 6;