aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/dhcp/proxy.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-02-14 07:28:41 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-02-21 22:25:48 +0000
commit20a175a18414c67e38b5ce0709b33fb1df8069c9 (patch)
tree3c06d6c83f62ca84e78d28cefbd8e18c3e37005e /src/vnet/dhcp/proxy.h
parent2e3677bb2085d4992f74156bdff8fe050ac9de24 (diff)
dhcp: multiple additions
DHCP additions: 1) DHCPv4 will only relay a message back to the client, if the Option82 information is present. So make this the default. 2) It is no longer possible to select via the API to "insert circuit ID" - since this is now default 3) Remove the version 2 API since it's now the same as version 1. 4) Adding the VSS option is now conditional only on the presence of VSS config (not the 'insert' option in the set API) 5) DHCP proxy dump via API Change-Id: Ia7271ba8c1d4dbf34a02c401d268ccfbb1b74f17 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/dhcp/proxy.h')
-rw-r--r--src/vnet/dhcp/proxy.h33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/vnet/dhcp/proxy.h b/src/vnet/dhcp/proxy.h
index e12c0d001b5..4b115c741ff 100644
--- a/src/vnet/dhcp/proxy.h
+++ b/src/vnet/dhcp/proxy.h
@@ -27,7 +27,6 @@
#include <vnet/pg/pg.h>
#include <vnet/ip/format.h>
#include <vnet/ip/udp.h>
-#include <vnet/dhcp/client.h>
typedef enum {
#define dhcp_proxy_error(n,s) DHCP_PROXY_ERROR_##n,
@@ -49,9 +48,7 @@ typedef union {
typedef struct {
ip4_address_t dhcp_server;
ip4_address_t dhcp_src_address;
- u32 insert_option_82;
u32 server_fib_index;
- u32 valid;
} dhcp_server_t;
typedef struct {
@@ -64,29 +61,39 @@ typedef struct {
/* to drop pkts in server-to-client direction */
u32 error_drop_node_index;
- vss_info *opt82vss;
+ vss_info *vss;
/* hash lookup specific vrf_id -> option 82 vss suboption */
- uword * opt82vss_index_by_vrf_id;
+ u32 *vss_index_by_rx_fib_index;
/* convenience */
- dhcp_client_main_t * dhcp_client_main;
vlib_main_t * vlib_main;
vnet_main_t * vnet_main;
} dhcp_proxy_main_t;
-dhcp_proxy_main_t dhcp_proxy_main;
+extern dhcp_proxy_main_t dhcp_proxy_main;
-int dhcp_proxy_set_server (ip4_address_t *addr, ip4_address_t *src_address,
- u32 fib_id, int insert_option_82, int is_del);
+void dhcp_send_details (void *opaque,
+ u32 context,
+ const ip46_address_t *server,
+ const ip46_address_t *src,
+ u32 server_fib_id,
+ u32 rx_fib_id,
+ u32 vss_fib_id,
+ u32 vss_oui);
-int dhcp_proxy_set_server_2 (ip4_address_t *addr, ip4_address_t *src_address,
- u32 rx_fib_id,
- u32 server_fib_id,
- int insert_option_82, int is_del);
+int dhcp_proxy_set_server (ip4_address_t *addr,
+ ip4_address_t *src_address,
+ u32 fib_id,
+ u32 server_fib_id,
+ int is_del);
int dhcp_proxy_set_option82_vss(u32 vrf_id,
u32 oui,
u32 fib_id,
int is_del);
+
+void dhcp_proxy_dump(void *opaque,
+ u32 context);
+
#endif /* included_dhcp_proxy_h */