15 #ifndef __POLICE_INLINES_H__ 16 #define __POLICE_INLINES_H__ 22 #define IP4_NON_DSCP_BITS 0x03 23 #define IP4_DSCP_SHIFT 2 24 #define IP6_NON_DSCP_BITS 0xf03fffff 25 #define IP6_DSCP_SHIFT 22 36 type = clib_net_to_host_u16 (eh->
type);
62 u64 time_in_policer_periods,
81 #endif // __POLICE_INLINES_H__
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
vnet_policer_main_t vnet_policer_main
static_always_inline void vnet_policer_mark(vlib_buffer_t *b, u8 dscp)
#define static_always_inline
vl_api_fib_path_type_t type
static policer_result_e vnet_police_packet(policer_read_response_type_st *policer, u32 packet_length, policer_result_e packet_color, u64 time)
policer_read_response_type_st * policers
#define IP6_NON_DSCP_BITS
#define IP4_NON_DSCP_BITS
static_always_inline u8 vnet_policer_police(vlib_main_t *vm, vlib_buffer_t *b, u32 policer_index, u64 time_in_policer_periods, policer_result_e packet_color)
VLIB buffer representation.
static u16 ip4_header_checksum(ip4_header_t *i)