C.4. Routines to Compute Various Header Sizes in Octets

 /************************************************************* NAME : vrrp_dlthd_len *************************************************************/ static int vrrp_dlt_len( vrrp_rt *rt ) { return ETHER_HDR_LEN; /* hardcoded for ethernet */ } /********************************************************* NAME : vrrp_iphdr_len *************************************************************/ static int vrrp_iphdr_len( vrrp_rt *vsrv ) { return sizeof( struct iphdr ); } /********************************************************* NAME : vrrp_hd_len *************************************************************/ static int vrrp_hd_len( vrrp_rt *vsrv ) { return sizeof( vrrp_pkt ) + vsrv->naddr*sizeof(uint32_t) ...

Get VRRP: Increasing Reliability and Failover with the Virtual Router Redundance Protocol now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.