summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_siaquery.c
diff options
context:
space:
mode:
Diffstat (limited to 'eigrpd/eigrp_siaquery.c')
-rw-r--r--eigrpd/eigrp_siaquery.c51
1 files changed, 26 insertions, 25 deletions
diff --git a/eigrpd/eigrp_siaquery.c b/eigrpd/eigrp_siaquery.c
index 030a86c1c..b04130076 100644
--- a/eigrpd/eigrp_siaquery.c
+++ b/eigrpd/eigrp_siaquery.c
@@ -58,7 +58,7 @@
/*EIGRP SIA-QUERY read function*/
void
eigrp_siaquery_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *eigrph,
- struct stream * s, struct eigrp_interface *ei, int size)
+ struct stream * s, struct eigrp_interface *ei, int size)
{
struct eigrp_neighbor *nbr;
struct TLV_IPv4_Internal_type *tlv;
@@ -89,17 +89,17 @@ eigrp_siaquery_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header
dest_addr = prefix_ipv4_new();
dest_addr->prefix = tlv->destination;
dest_addr->prefixlen = tlv->prefix_length;
- struct eigrp_prefix_entry *dest = eigrp_topology_table_lookup_ipv4(
- eigrp->topology_table, dest_addr);
+ struct eigrp_prefix_entry *dest =
+ eigrp_topology_table_lookup_ipv4(eigrp->topology_table, dest_addr);
/* If the destination exists (it should, but one never know)*/
if (dest != NULL)
{
struct eigrp_fsm_action_message *msg;
msg = XCALLOC(MTYPE_EIGRP_FSM_MSG,
- sizeof(struct eigrp_fsm_action_message));
- struct eigrp_neighbor_entry *entry = eigrp_prefix_entry_lookup(
- dest->entries, nbr);
+ sizeof(struct eigrp_fsm_action_message));
+ struct eigrp_neighbor_entry *entry =
+ eigrp_prefix_entry_lookup(dest->entries, nbr);
msg->packet_type = EIGRP_OPC_SIAQUERY;
msg->eigrp = eigrp;
msg->data_type = EIGRP_TLV_IPv4_INT;
@@ -116,7 +116,6 @@ eigrp_siaquery_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header
eigrp_hello_send_ack(nbr);
}
-
void
eigrp_send_siaquery (struct eigrp_neighbor *nbr, struct eigrp_prefix_entry *pe)
{
@@ -127,38 +126,40 @@ eigrp_send_siaquery (struct eigrp_neighbor *nbr, struct eigrp_prefix_entry *pe)
/* Prepare EIGRP INIT UPDATE header */
eigrp_packet_header_init(EIGRP_OPC_SIAQUERY, nbr->ei, ep->s, 0,
- nbr->ei->eigrp->sequence_number, 0);
+ nbr->ei->eigrp->sequence_number, 0);
// encode Authentication TLV, if needed
- if((IF_DEF_PARAMS (nbr->ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5) && (IF_DEF_PARAMS (nbr->ei->ifp)->auth_keychain != NULL))
+ if((IF_DEF_PARAMS (nbr->ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5) &&
+ (IF_DEF_PARAMS (nbr->ei->ifp)->auth_keychain != NULL))
{
length += eigrp_add_authTLV_MD5_to_stream(ep->s,nbr->ei);
}
- length += eigrp_add_internalTLV_to_stream(ep->s, pe);
+ length += eigrp_add_internalTLV_to_stream(ep->s, pe);
- if((IF_DEF_PARAMS (nbr->ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5) && (IF_DEF_PARAMS (nbr->ei->ifp)->auth_keychain != NULL))
+ if((IF_DEF_PARAMS (nbr->ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5) &&
+ (IF_DEF_PARAMS (nbr->ei->ifp)->auth_keychain != NULL))
{
eigrp_make_md5_digest(nbr->ei,ep->s, EIGRP_AUTH_UPDATE_FLAG);
}
/* EIGRP Checksum */
- eigrp_packet_checksum(nbr->ei, ep->s, length);
+ eigrp_packet_checksum(nbr->ei, ep->s, length);
- ep->length = length;
- ep->dst.s_addr = nbr->src.s_addr;
+ ep->length = length;
+ ep->dst.s_addr = nbr->src.s_addr;
- /*This ack number we await from neighbor*/
- ep->sequence_number = nbr->ei->eigrp->sequence_number;
+ /*This ack number we await from neighbor*/
+ ep->sequence_number = nbr->ei->eigrp->sequence_number;
- if (nbr->state == EIGRP_NEIGHBOR_UP)
- {
- /*Put packet to retransmission queue*/
- eigrp_fifo_push_head(nbr->retrans_queue, ep);
+ if (nbr->state == EIGRP_NEIGHBOR_UP)
+ {
+ /*Put packet to retransmission queue*/
+ eigrp_fifo_push_head(nbr->retrans_queue, ep);
- if (nbr->retrans_queue->count == 1)
- {
- eigrp_send_packet_reliably(nbr);
- }
- }
+ if (nbr->retrans_queue->count == 1)
+ {
+ eigrp_send_packet_reliably(nbr);
+ }
+ }
}