September 2002
Intermediate to advanced
560 pages
13h 16m
English
/********************************************************* NAME : vrrp_build_dlt *********************************************************/ static void vrrp_build_dlt( vrrp_rt *vsrv, char *buffer, int buflen ) { /* hardcoded for ethernet */ struct ether_header * eth = (struct ether_header *)buffer; /* destination address —rfc1122.6.4*/ eth->ether_dhost[0] = 0x01; eth->ether_dhost[1] = 0x00; eth->ether_dhost[2] = 0x5E; eth->ether_dhost[3] = (INADDR_VRRP_GROUP >> 16) & 0x7F; eth->ether_dhost[4] = (INADDR_VRRP_GROUP >> 8) & 0xFF; eth->ether_dhost[5] = INADDR_VRRP_GROUP & 0xFF; /* source address —rfc2338.7.3 */ memcpy( eth->ether_shost, vrrp_hwaddr, sizeof(vrrp_hwaddr)); /* type */ eth->ether_type ...Read now
Unlock full access