New function ds_put_printable().
[sliver-openvswitch.git] / include / dhcp.h
index 82f3d3e..f44c4c6 100644 (file)
@@ -193,7 +193,8 @@ const char *dhcp_type_name(enum dhcp_msg_type);
     DHCP_OPT(T2,                       59, SECS,    1, 1)               \
     DHCP_OPT(VENDOR_CLASS,             60, STRING,  1, SIZE_MAX)        \
     DHCP_OPT(CLIENT_ID,                61, UINT8,   2, SIZE_MAX)        \
-    DHCP_VNDOPT(OFP_CONTROLLER_VCONN,   1, STRING,  1, SIZE_MAX)
+    DHCP_VNDOPT(OFP_CONTROLLER_VCONN,   1, STRING,  1, SIZE_MAX)        \
+    DHCP_VNDOPT(OFP_PKI_URI,            2, STRING,  1, SIZE_MAX)
 
 /* Shorthand for defining vendor options (used above). */
 #define DHCP_VNDOPT(NAME, CODE, ARG, MIN, MAX) \
@@ -217,6 +218,11 @@ struct dhcp_option {
     void *data;                 /* Data. */
 };
 
+const char *dhcp_option_to_string(const struct dhcp_option *, int code,
+                                  struct ds *);
+bool dhcp_option_equals(const struct dhcp_option *,
+                        const struct dhcp_option *);
+
 /* Abstracted DHCP protocol message, to make them easier to manipulate than
  * through raw protocol buffers. */
 struct dhcp_msg {
@@ -265,9 +271,8 @@ bool dhcp_msg_get_uint8(const struct dhcp_msg *, int code,
                         size_t offset, uint8_t *);
 bool dhcp_msg_get_uint16(const struct dhcp_msg *, int code,
                          size_t offset, uint16_t *);
-const char *dhcp_option_to_string(const struct dhcp_option *, int code,
-                                  struct ds *);
-const char *dhcp_msg_to_string(const struct dhcp_msg *, struct ds *);
+const char *dhcp_msg_to_string(const struct dhcp_msg *, bool multiline,
+                               struct ds *);
 int dhcp_parse(struct dhcp_msg *, const struct buffer *);
 void dhcp_assemble(const struct dhcp_msg *, struct buffer *);