Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tests: add quic plugin qclose/sclose tests
[vpp.git]
/
src
/
vnet
/
dhcp
/
dhcp_proxy.h
diff --git
a/src/vnet/dhcp/dhcp_proxy.h
b/src/vnet/dhcp/dhcp_proxy.h
index
ec43769
..
60c4eb8
100644
(file)
--- a/
src/vnet/dhcp/dhcp_proxy.h
+++ b/
src/vnet/dhcp/dhcp_proxy.h
@@
-44,6
+44,12
@@
typedef enum
DHCPV6_PROXY_N_ERROR,
} dhcpv6_proxy_error_t;
DHCPV6_PROXY_N_ERROR,
} dhcpv6_proxy_error_t;
+/* flags to indicate which DHCP ports should be or have been registered */
+typedef enum
+{
+ DHCP_PORT_REG_CLIENT = 0x1,
+ DHCP_PORT_REG_SERVER = 0x2,
+} dhcp_port_reg_flags_t;
/**
* @brief The Virtual Sub-net Selection information for a given RX FIB
/**
* @brief The Virtual Sub-net Selection information for a given RX FIB
@@
-90,7
+96,7
@@
typedef struct dhcp_server_t_
} dhcp_server_t;
/**
} dhcp_server_t;
/**
- * @brief A DHCP proxy represenation fpr per-client VRF config
+ * @brief A DHCP proxy represen
t
ation fpr per-client VRF config
*/
typedef struct dhcp_proxy_t_
{
*/
typedef struct dhcp_proxy_t_
{
@@
-146,10
+152,22
@@
typedef struct
/* hash lookup specific vrf_id -> option 82 vss suboption */
u32 *vss_index_by_rx_fib_index[DHCP_N_PROTOS];
/* hash lookup specific vrf_id -> option 82 vss suboption */
u32 *vss_index_by_rx_fib_index[DHCP_N_PROTOS];
+
+ /* flags to indicate which udp ports have been registered */
+ int udp_ports_registered;
+
+ /* convenience */
+ vlib_main_t *vlib_main;
+
} dhcp_proxy_main_t;
extern dhcp_proxy_main_t dhcp_proxy_main;
} dhcp_proxy_main_t;
extern dhcp_proxy_main_t dhcp_proxy_main;
+/**
+ * @brief Register the dhcp client and/or server ports, if not already done
+ */
+void dhcp_maybe_register_udp_ports (dhcp_port_reg_flags_t ports);
+
/**
* @brief Send the details of a proxy session to the API client during a dump
*/
/**
* @brief Send the details of a proxy session to the API client during a dump
*/