FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
dhcp6_packet.h File Reference
+ Include dependency graph for dhcp6_packet.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dhcpv6_hdr_
 
struct  dhcp_stats_counters_
 

Macros

#define DHCP_MAX_RELAY_ADDR   16
 
#define PROTO_UDP   17
 
#define DHCPV6_CLIENT_PORT   546
 
#define DHCPV6_SERVER_PORT   547
 
#define HOP_COUNT_LIMIT   32
 
#define DHCPV6_CISCO_ENT_NUM   9
 
#define dhcpv6_foreach_option
 
#define dhcpv6_optlen(opt)   clib_net_to_host_u16((opt)->length)
 

Typedefs

typedef enum dhcpv6_msg_type_ dhcpv6_msg_type_t
 
typedef struct dhcpv6_hdr_ dhcpv6_header_t
 
typedef enum dhcp_stats_action_type_ dhcp_stats_action_type_t
 
typedef struct dhcp_stats_counters_ dhcp_stats_counters_t
 
typedef enum dhcpv6_stats_drop_reason_ dhcpv6_stats_drop_reason_t
 

Enumerations

enum  dhcpv6_msg_type_ {
  DHCPV6_MSG_SOLICIT = 1, DHCPV6_MSG_ADVERTISE = 2, DHCPV6_MSG_REQUEST = 3, DHCPV6_MSG_CONFIRM = 4,
  DHCPV6_MSG_RENEW = 5, DHCPV6_MSG_REBIND = 6, DHCPV6_MSG_REPLY = 7, DHCPV6_MSG_RELEASE = 8,
  DHCPV6_MSG_DECLINE = 9, DHCPV6_MSG_RECONFIGURE = 10, DHCPV6_MSG_INFORMATION_REQUEST = 11, DHCPV6_MSG_RELAY_FORW = 12,
  DHCPV6_MSG_RELAY_REPL = 13
}
 
enum  { DHCPV6_OPTION_MAX }
 
enum  {
  DHCPV6_STATUS_SUCCESS = 0, DHCPV6_STATUS_UNSPEC_FAIL = 1, DHCPV6_STATUS_NOADDRS_AVAIL = 2, DHCPV6_STATUS_NO_BINDING = 3,
  DHCPV6_STATUS_NOT_ONLINK = 4, DHCPV6_STATUS_USE_MULTICAST = 5, DHCPV6_STATUS_NOPREFIX_AVAIL = 6
}
 
enum  { DHCPV6_DUID_LLT = 1, DHCPV6_DUID_EN = 2, DHCPV6_DUID_LL = 3 }
 
enum  dhcp_stats_action_type_ { DHCP_STATS_ACTION_FORWARDED = 1, DHCP_STATS_ACTION_RECEIVED, DHCP_STATS_ACTION_DROPPED }
 
enum  dhcpv6_stats_drop_reason_ {
  DHCPV6_RELAY_PKT_DROP_RELAYDISABLE = 1, DHCPV6_RELAY_PKT_DROP_MAX_HOPS, DHCPV6_RELAY_PKT_DROP_VALIDATION_FAIL, DHCPV6_RELAY_PKT_DROP_UNKNOWN_OP_INTF,
  DHCPV6_RELAY_PKT_DROP_BAD_CONTEXT, DHCPV6_RELAY_PKT_DROP_OPT_INSERT_FAIL, DHCPV6_RELAY_PKT_DROP_REPLY_FROM_CLIENT
}
 

Functions

typedef CLIB_PACKED (struct dhcpv6_relay_ctx_ { dhcpv6_header_t *pkt;u32 pkt_len;u32 dhcpv6_len;u32 if_index;u32 ctx_id;char ctx_name[32+1];u8 dhcp_msg_type;}) dhcpv6_relay_ctx_t
 
typedef CLIB_PACKED (struct dhcpv6_relay_hdr_ { u8 msg_type;u8 hop_count;ip6_address_t link_addr;ip6_address_t peer_addr;u8 data[0];}) dhcpv6_relay_hdr_t
 
typedef CLIB_PACKED (struct { u16 option;u16 length;u8 data[0];}) dhcpv6_option_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u16 status_code;}) dhcpv6_status_code_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u32 int_idx;}) dhcpv6_int_id_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u8 vss_type;u8 data[0];}) dhcpv6_vss_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u32 ent_num;u32 rmt_id;}) dhcpv6_rmt_id_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u16 link_type;u8 data[6];}) dhcpv6_client_mac_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u32 iaid;u32 t1;u32 t2;u8 data[0];}) dhcpv6_ia_header_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u32 preferred;u32 valid;u8 prefix;ip6_address_t addr;}) dhcpv6_ia_opt_pd_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;ip6_address_t addr;u32 preferred;u32 valid;}) dhcpv6_ia_opt_addr_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u16 options[0];}) dhcpv6_oro_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u16 elapsed_10ms;}) dhcpv6_elapsed_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u16 duid_type;u16 hardware_type;}) dhcpv6_duid_t
 
typedef CLIB_PACKED (struct { dhcpv6_option_t opt;u16 status_code;u8 message[0];}) dhcpv6_status_t
 

Macro Definition Documentation

◆ DHCP_MAX_RELAY_ADDR

#define DHCP_MAX_RELAY_ADDR   16

Definition at line 24 of file dhcp6_packet.h.

◆ DHCPV6_CISCO_ENT_NUM

#define DHCPV6_CISCO_ENT_NUM   9

Definition at line 29 of file dhcp6_packet.h.

◆ DHCPV6_CLIENT_PORT

#define DHCPV6_CLIENT_PORT   546

Definition at line 26 of file dhcp6_packet.h.

◆ dhcpv6_foreach_option

#define dhcpv6_foreach_option
Value:
_(CLIENTID , 1 , 4 ) \
_(SERVERID , 2 , 4 ) \
_(IA_NA , 3 , 12) \
_(IA_TA , 4 , 4 ) \
_(IAADDR , 5 , 24) \
_(ORO , 6 , 0 ) \
_(PREFERENCE , 7 , 1 ) \
_(ELAPSED_TIME , 8 , 2 ) \
_(RELAY_MSG , 9 , 0 ) \
_(AUTH , 11 , 11) \
_(UNICAST , 12 , 16) \
_(STATUS_CODE , 13 , 2 ) \
_(RAPID_COMMIT , 14 , 0 ) \
_(USER_CLASS , 15 , 0 ) \
_(VENDOR_CLASS , 16 , 4 ) \
_(VENDOR_OPTS , 17 , 4 ) \
_(INTERFACE_ID , 18 , 0 ) \
_(RECONF_MSG , 19 , 1 ) \
_(RECONF_ACCEPT , 20 , 0 ) \
_(DNS_SEARCH , 24 , 0 ) \
_(IA_PD , 25 , 12) \
_(IAPREFIX , 26 , 25) \
_(REMOTEID , 37 , 4 ) \
_(VSS , 68 , 1 ) \
_(CLIENT_LINK_LAYER_ADDRESS, 79 , 2 )

Definition at line 52 of file dhcp6_packet.h.

◆ dhcpv6_optlen

#define dhcpv6_optlen (   opt)    clib_net_to_host_u16((opt)->length)

Definition at line 172 of file dhcp6_packet.h.

◆ DHCPV6_SERVER_PORT

#define DHCPV6_SERVER_PORT   547

Definition at line 27 of file dhcp6_packet.h.

◆ HOP_COUNT_LIMIT

#define HOP_COUNT_LIMIT   32

Definition at line 28 of file dhcp6_packet.h.

◆ PROTO_UDP

#define PROTO_UDP   17

Definition at line 25 of file dhcp6_packet.h.

Typedef Documentation

◆ dhcp_stats_action_type_t

◆ dhcp_stats_counters_t

◆ dhcpv6_header_t

typedef struct dhcpv6_hdr_ dhcpv6_header_t

◆ dhcpv6_msg_type_t

◆ dhcpv6_stats_drop_reason_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DHCPV6_OPTION_MAX 

Definition at line 82 of file dhcp6_packet.h.

◆ anonymous enum

anonymous enum
Enumerator
DHCPV6_STATUS_SUCCESS 
DHCPV6_STATUS_UNSPEC_FAIL 
DHCPV6_STATUS_NOADDRS_AVAIL 
DHCPV6_STATUS_NO_BINDING 
DHCPV6_STATUS_NOT_ONLINK 
DHCPV6_STATUS_USE_MULTICAST 
DHCPV6_STATUS_NOPREFIX_AVAIL 

Definition at line 93 of file dhcp6_packet.h.

◆ anonymous enum

anonymous enum
Enumerator
DHCPV6_DUID_LLT 
DHCPV6_DUID_EN 
DHCPV6_DUID_LL 

Definition at line 107 of file dhcp6_packet.h.

◆ dhcp_stats_action_type_

Enumerator
DHCP_STATS_ACTION_FORWARDED 
DHCP_STATS_ACTION_RECEIVED 
DHCP_STATS_ACTION_DROPPED 

Definition at line 146 of file dhcp6_packet.h.

◆ dhcpv6_msg_type_

Enumerator
DHCPV6_MSG_SOLICIT 
DHCPV6_MSG_ADVERTISE 
DHCPV6_MSG_REQUEST 
DHCPV6_MSG_CONFIRM 
DHCPV6_MSG_RENEW 
DHCPV6_MSG_REBIND 
DHCPV6_MSG_REPLY 
DHCPV6_MSG_RELEASE 
DHCPV6_MSG_DECLINE 
DHCPV6_MSG_RECONFIGURE 
DHCPV6_MSG_INFORMATION_REQUEST 
DHCPV6_MSG_RELAY_FORW 
DHCPV6_MSG_RELAY_REPL 

Definition at line 34 of file dhcp6_packet.h.

◆ dhcpv6_stats_drop_reason_

Enumerator
DHCPV6_RELAY_PKT_DROP_RELAYDISABLE 
DHCPV6_RELAY_PKT_DROP_MAX_HOPS 
DHCPV6_RELAY_PKT_DROP_VALIDATION_FAIL 
DHCPV6_RELAY_PKT_DROP_UNKNOWN_OP_INTF 
DHCPV6_RELAY_PKT_DROP_BAD_CONTEXT 
DHCPV6_RELAY_PKT_DROP_OPT_INSERT_FAIL 
DHCPV6_RELAY_PKT_DROP_REPLY_FROM_CLIENT 

Definition at line 161 of file dhcp6_packet.h.

Function Documentation

◆ CLIB_PACKED() [1/15]

typedef CLIB_PACKED ( struct dhcpv6_relay_ctx_ { dhcpv6_header_t *pkt;u32 pkt_len;u32 dhcpv6_len;u32 if_index;u32 ctx_id;char ctx_name[32+1];u8 dhcp_msg_type;}  )

◆ CLIB_PACKED() [2/15]

typedef CLIB_PACKED ( struct dhcpv6_relay_hdr_ { u8 msg_type;u8 hop_count;ip6_address_t link_addr;ip6_address_t peer_addr;u8 data[0];}  )

◆ CLIB_PACKED() [3/15]

typedef CLIB_PACKED ( struct { u16 option;u16 length;u8 data[0];}  )

◆ CLIB_PACKED() [4/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u16 status_code;}  )

◆ CLIB_PACKED() [5/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u32 int_idx;}  )

◆ CLIB_PACKED() [6/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u8 vss_type;u8 data[0];}  )

◆ CLIB_PACKED() [7/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u32 ent_num;u32 rmt_id;}  )

◆ CLIB_PACKED() [8/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u16 link_type;u8 data[6];}  )

◆ CLIB_PACKED() [9/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u32 iaid;u32 t1;u32 t2;u8 data[0];}  )

◆ CLIB_PACKED() [10/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u32 preferred;u32 valid;u8 prefix;ip6_address_t addr;}  )

◆ CLIB_PACKED() [11/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;ip6_address_t addr;u32 preferred;u32 valid;}  )

◆ CLIB_PACKED() [12/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u16 options[0];}  )

◆ CLIB_PACKED() [13/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u16 elapsed_10ms;}  )

◆ CLIB_PACKED() [14/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u16 duid_type;u16 hardware_type;}  )

◆ CLIB_PACKED() [15/15]

typedef CLIB_PACKED ( struct { dhcpv6_option_t opt;u16 status_code;u8 message[0];}  )