eigrp_hdr
struct eigrp_hdr eigrp_hdr;
if (ibuf_set_n32(buf, offsetof(struct eigrp_hdr, ack_num),
if (ibuf_get(&ebuf, &eigrp_hdr, sizeof(eigrp_hdr)) == -1)
flags |= ntohl(eigrp_hdr.flags);
if (ibuf_set_n32(buf, offsetof(struct eigrp_hdr, flags),
if (ibuf_set_n16(buf, offsetof(struct eigrp_hdr, chksum), 0) == -1)
if (ibuf_set_n16(buf, offsetof(struct eigrp_hdr, chksum),
if (eigrp_hdr.opcode != EIGRP_OPC_HELLO) {
__func__, opcode_name(eigrp_hdr.opcode), iface->name,
buffer, ntohs(eigrp_hdr.as), ntohl(eigrp_hdr.seq_num),
ntohl(eigrp_hdr.ack_num));
switch (eigrp_hdr.opcode) {
if (ntohl(eigrp_hdr.ack_num) == 0)
recv_packet_nbr(struct nbr *nbr, struct eigrp_hdr *eigrp_hdr,
seq = ntohl(eigrp_hdr->seq_num);
ack = ntohl(eigrp_hdr->ack_num);
if (eigrp_hdr->opcode == EIGRP_OPC_HELLO &&
if ((ntohl(eigrp_hdr->flags) & EIGRP_HDR_FLAG_CR)) {
if (ntohl(eigrp_hdr->seq_num) != nbr->next_mcast_seq)
struct iface *iface, struct eigrp_hdr *eigrp_hdr, char *buf, uint16_t len)
if (eigrp_hdr_sanity_check(af, dest, eigrp_hdr, len, iface) == -1)
buf += sizeof(*eigrp_hdr);
len -= sizeof(*eigrp_hdr);
static int recv_packet_nbr(struct nbr *, struct eigrp_hdr *,
union eigrpd_addr *, struct iface *, struct eigrp_hdr *,
ei = eigrp_if_lookup(iface, af, ntohs(eigrp_hdr->as));
if (nbr == NULL && (eigrp_hdr->opcode != EIGRP_OPC_HELLO ||
ntohl(eigrp_hdr->ack_num) != 0)) {
} else if (nbr && recv_packet_nbr(nbr, eigrp_hdr, &seq_addr_list,
if (eigrp_hdr->opcode != EIGRP_OPC_HELLO)
opcode_name(eigrp_hdr->opcode), log_addr(af, &nbr->addr),
ei->eigrp->as, ntohl(eigrp_hdr->seq_num),
ntohl(eigrp_hdr->ack_num));
switch (eigrp_hdr->opcode) {
struct eigrp_hdr *, uint16_t, const struct iface *);
if (ntohl(eigrp_hdr->ack_num) == 0) {
recv_update(nbr, &rinfo_list, ntohl(eigrp_hdr->flags));
struct eigrp_hdr *eigrp_hdr;
struct eigrp_hdr eigrp_hdr;
memset(&eigrp_hdr, 0, sizeof(eigrp_hdr));
eigrp_hdr.version = EIGRP_VERSION;
eigrp_hdr.opcode = opcode;
eigrp_hdr.flags = htonl(flags);
eigrp_hdr.seq_num = htonl(seq_num);
eigrp_hdr.vrid = htons(EIGRP_VRID_UNICAST_AF);
eigrp_hdr.as = htons(as);
if (len < sizeof(*eigrp_hdr)) {
eigrp_hdr = (struct eigrp_hdr *)buf;
recv_packet_eigrp(af, &src, &dest, iface, eigrp_hdr, buf, len);
struct eigrp_hdr *eigrp_hdr, uint16_t len, const struct iface *iface)
if (in_cksum(eigrp_hdr, len)) {
return (ibuf_add(buf, &eigrp_hdr, sizeof(eigrp_hdr)));
if (eigrp_hdr->version != EIGRP_HEADER_VERSION) {
__func__, eigrp_hdr->version, iface->name);
if (ntohs(eigrp_hdr->vrid) != EIGRP_VRID_UNICAST_AF) {
__func__, ntohs(eigrp_hdr->vrid), iface->name);
if (eigrp_hdr->opcode == EIGRP_OPC_HELLO &&
eigrp_hdr->ack_num != 0) {
size += sizeof(struct eigrp_hdr);
size += sizeof(struct eigrp_hdr);
size += sizeof(struct eigrp_hdr);