X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=nhrpd%2Fnhrp_protocol.h;h=3b94c814d61cd8e3cee28bc17416fb44aaaa69c1;hb=86afd5292f1769c6c1c1db7a1e65f09fed27b87d;hp=a4bc9fa6ba3095bfa7be8e088c43ba4ff4dad8cd;hpb=df581cd3e137e8d3ab0f9acbb3d33bdb1e63face;p=mirror_frr.git diff --git a/nhrpd/nhrp_protocol.h b/nhrpd/nhrp_protocol.h index a4bc9fa6b..3b94c814d 100644 --- a/nhrpd/nhrp_protocol.h +++ b/nhrpd/nhrp_protocol.h @@ -26,6 +26,7 @@ #define NHRP_PACKET_PURGE_REPLY 6 #define NHRP_PACKET_ERROR_INDICATION 7 #define NHRP_PACKET_TRAFFIC_INDICATION 8 +#define NHRP_PACKET_MAX 8 /* NHRP Extension Types */ #define NHRP_EXTENSION_FLAG_COMPULSORY 0x8000 @@ -78,51 +79,51 @@ /* NHRP Packet Structures */ struct nhrp_packet_header { /* Fixed header */ - uint16_t afnum; - uint16_t protocol_type; - uint8_t snap[5]; - uint8_t hop_count; - uint16_t packet_size; - uint16_t checksum; - uint16_t extension_offset; - uint8_t version; - uint8_t type; - uint8_t src_nbma_address_len; - uint8_t src_nbma_subaddress_len; + uint16_t afnum; + uint16_t protocol_type; + uint8_t snap[5]; + uint8_t hop_count; + uint16_t packet_size; + uint16_t checksum; + uint16_t extension_offset; + uint8_t version; + uint8_t type; + uint8_t src_nbma_address_len; + uint8_t src_nbma_subaddress_len; /* Mandatory header */ - uint8_t src_protocol_address_len; - uint8_t dst_protocol_address_len; - uint16_t flags; + uint8_t src_protocol_address_len; + uint8_t dst_protocol_address_len; + uint16_t flags; union { - uint32_t request_id; + uint32_t request_id; struct { - uint16_t code; - uint16_t offset; + uint16_t code; + uint16_t offset; } error; } u; } __attribute__((packed)); struct nhrp_cie_header { - uint8_t code; - uint8_t prefix_length; - uint16_t unused; - uint16_t mtu; - uint16_t holding_time; - uint8_t nbma_address_len; - uint8_t nbma_subaddress_len; - uint8_t protocol_address_len; - uint8_t preference; + uint8_t code; + uint8_t prefix_length; + uint16_t unused; + uint16_t mtu; + uint16_t holding_time; + uint8_t nbma_address_len; + uint8_t nbma_subaddress_len; + uint8_t protocol_address_len; + uint8_t preference; } __attribute__((packed)); struct nhrp_extension_header { - uint16_t type; - uint16_t length; + uint16_t type; + uint16_t length; } __attribute__((packed)); struct nhrp_cisco_authentication_extension { - uint32_t type; - uint8_t secret[8]; + uint32_t type; + uint8_t secret[8]; } __attribute__((packed)); #endif