FD.io VPP  v18.07.1-19-g511ce25
Vector Packet Processing
client.h File Reference
+ Include dependency graph for client.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dhcp_client_t_
 
struct  dhcp_client_main_t
 
struct  dhcp_client_add_del_args_t
 

Macros

#define foreach_dhcp_client_state
 
#define EVENT_DHCP_CLIENT_WAKEUP   1
 

Typedefs

typedef void(* dhcp_event_cb_t) (u32 client_index, const struct dhcp_client_t_ *client)
 Callback function for DHCP complete events. More...
 
typedef struct dhcp_client_t_ dhcp_client_t
 
typedef int(* dhcp_client_walk_cb_t) (const dhcp_client_t *client, void *data)
 callback function for clients walking the DHCP client configurations More...
 

Enumerations

enum  dhcp_client_state_t { foreach_dhcp_client_state }
 

Functions

int dhcp_client_for_us (u32 bi0, vlib_buffer_t *b0, ip4_header_t *ip0, udp_header_t *u0, dhcp_header_t *dh0)
 
int dhcp_client_config (u32 is_add, u32 client_index, vlib_main_t *vm, u32 sw_if_index, u8 *hostname, u8 *client_id, dhcp_event_cb_t event_callback, u8 set_broadcast_flag, u32 pid)
 Add/Delete DHCP clients. More...
 
void dhcp_client_walk (dhcp_client_walk_cb_t cb, void *ctx)
 Walk (visit each) DHCP client configuration. More...
 

Variables

dhcp_client_main_t dhcp_client_main
 

Macro Definition Documentation

#define EVENT_DHCP_CLIENT_WAKEUP   1

Definition at line 125 of file client.h.

#define foreach_dhcp_client_state
Value:
_(DHCP_DISCOVER) \
_(DHCP_REQUEST) \
_(DHCP_BOUND)

Definition at line 25 of file client.h.

Typedef Documentation

typedef struct dhcp_client_t_ dhcp_client_t
typedef int(* dhcp_client_walk_cb_t) (const dhcp_client_t *client, void *data)

callback function for clients walking the DHCP client configurations

Parameters
clientThe client being visitsed
dataThe data passed during the call to 'walk'
Returns
!0 to continue walking 0 to stop.

Definition at line 151 of file client.h.

typedef void(* dhcp_event_cb_t) (u32 client_index, const struct dhcp_client_t_ *client)

Callback function for DHCP complete events.

Definition at line 42 of file client.h.

Enumeration Type Documentation

Enumerator
foreach_dhcp_client_state 

Definition at line 30 of file client.h.

Function Documentation

int dhcp_client_config ( u32  is_add,
u32  client_index,
vlib_main_t vm,
u32  sw_if_index,
u8 hostname,
u8 client_id,
dhcp_event_cb_t  event_callback,
u8  set_broadcast_flag,
u32  pid 
)

Add/Delete DHCP clients.

Definition at line 975 of file client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int dhcp_client_for_us ( u32  bi0,
vlib_buffer_t b0,
ip4_header_t ip0,
udp_header_t u0,
dhcp_header_t dh0 
)

Definition at line 161 of file client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void dhcp_client_walk ( dhcp_client_walk_cb_t  cb,
void *  ctx 
)

Walk (visit each) DHCP client configuration.

Parameters
cbThe callback function invoked as each client is visited
ctxContext data passed back to the client in the invocation of the callback.

Definition at line 1061 of file client.c.

+ Here is the caller graph for this function:

Variable Documentation

dhcp_client_main_t dhcp_client_main

Definition at line 20 of file client.c.