40 #ifndef included_ip_packet_h 41 #define included_ip_packet_h 47 #define ip_protocol(n,s) IP_PROTOCOL_##s = n, 54 #define ip_port(s,n) IP_PORT_##s = n, 66 #define foreach_ip_builtin_multicast_group \ 67 _ (1, all_hosts_on_subnet) \ 68 _ (2, all_routers_on_subnet) \ 70 _ (5, ospf_all_routers) \ 71 _ (6, ospf_designated_routers) \ 78 #define _(n,f) IP_MULTICAST_GROUP_##f = n, 118 u32 field_byte_offset,
u32 field_n_bytes)
122 if ((field_n_bytes % 2)
133 #define ip_csum_update(sum,old,new,type,field) \ 134 ip_csum_update_inline ((sum), (old), (new), \ 135 STRUCT_OFFSET_OF (type, field), \ 136 STRUCT_SIZE_OF (type, field)) 143 c = (c & 0xffff) + (c >> 16);
146 c = (c & 0xffff) + (c >> 16);
147 c = (c & 0xffff) + (c >> 16);
always_inline ip_csum_t ip_csum_update_inline(ip_csum_t sum, ip_csum_t old, ip_csum_t new, u32 field_byte_offset, u32 field_n_bytes)
#define CLIB_ARCH_IS_LITTLE_ENDIAN
always_inline u16 ip_csum_fold(ip_csum_t c)
enum ip_protocol ip_protocol_t
always_inline ip_csum_t ip_csum_sub_even(ip_csum_t c, ip_csum_t x)
ip_csum_t ip_incremental_checksum(ip_csum_t sum, void *data, uword n_bytes)
always_inline u16 ip_csum_and_memcpy_fold(ip_csum_t sum, void *dst)
always_inline ip_csum_t ip_csum_add_even(ip_csum_t c, ip_csum_t x)
ip_csum_t ip_csum_and_memcpy(ip_csum_t sum, void *dst, void *src, uword n_bytes)
always_inline ip_csum_t ip_csum_with_carry(ip_csum_t sum, ip_csum_t x)
#define foreach_ip_builtin_multicast_group