diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-01-12 07:59:04 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-01-12 07:59:04 -0500 | 
| commit | 8e699447d14e62c15342e354f2df742b35cb4732 (patch) | |
| tree | 81011ae4092662114cb8da64be6e0163443f158e /eigrpd | |
| parent | e9f1847e25178cf9e842c063a3b155c86319786b (diff) | |
eigrpd: Cleanup eigrp_packet.h to our proper formatting
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'eigrpd')
| -rw-r--r-- | eigrpd/eigrp_packet.h | 161 | 
1 files changed, 85 insertions, 76 deletions
diff --git a/eigrpd/eigrp_packet.h b/eigrpd/eigrp_packet.h index ed8c212a23..cb69bc26b2 100644 --- a/eigrpd/eigrp_packet.h +++ b/eigrpd/eigrp_packet.h @@ -36,49 +36,51 @@  extern int eigrp_read(struct thread *);  extern int eigrp_write(struct thread *); -extern struct eigrp_packet *eigrp_packet_new(size_t, struct eigrp_neighbor *); -extern struct eigrp_packet *eigrp_packet_duplicate(struct eigrp_packet *, -						   struct eigrp_neighbor *); -extern void eigrp_packet_free(struct eigrp_packet *); -extern void eigrp_packet_delete(struct eigrp_interface *); -extern void eigrp_packet_header_init(int, struct eigrp *, struct stream *, -				     uint32_t, uint32_t, uint32_t); -extern void eigrp_packet_checksum(struct eigrp_interface *, struct stream *, -				  uint16_t); +extern struct eigrp_packet *eigrp_packet_new(size_t size, +					     struct eigrp_neighbor *nbr); +extern struct eigrp_packet *eigrp_packet_duplicate(struct eigrp_packet *old, +						   struct eigrp_neighbor *nbr); +extern void eigrp_packet_free(struct eigrp_packet *ep); +extern void eigrp_packet_delete(struct eigrp_interface *ei); +extern void eigrp_packet_header_init(int type, struct eigrp *eigrp, +				     struct stream *s, uint32_t flags, +				     uint32_t sequence, uint32_t ack); +extern void eigrp_packet_checksum(struct eigrp_interface *ei, struct stream *s, +				  uint16_t length);  extern struct eigrp_fifo *eigrp_fifo_new(void); -extern struct eigrp_packet *eigrp_fifo_next(struct eigrp_fifo *); -extern struct eigrp_packet *eigrp_fifo_pop(struct eigrp_fifo *); -extern void eigrp_fifo_push(struct eigrp_fifo *, struct eigrp_packet *); -extern void eigrp_fifo_free(struct eigrp_fifo *); -extern void eigrp_fifo_reset(struct eigrp_fifo *); +extern struct eigrp_packet *eigrp_fifo_next(struct eigrp_fifo *fifo); +extern struct eigrp_packet *eigrp_fifo_pop(struct eigrp_fifo *fifo); +extern void eigrp_fifo_push(struct eigrp_fifo *fifo, struct eigrp_packet *ep); +extern void eigrp_fifo_free(struct eigrp_fifo *fifo); +extern void eigrp_fifo_reset(struct eigrp_fifo *fifo); -extern void eigrp_send_packet_reliably(struct eigrp_neighbor *); +extern void eigrp_send_packet_reliably(struct eigrp_neighbor *nbr); -extern struct TLV_IPv4_Internal_type *eigrp_read_ipv4_tlv(struct stream *); +extern struct TLV_IPv4_Internal_type *eigrp_read_ipv4_tlv(struct stream *s);  extern uint16_t  eigrp_add_internalTLV_to_stream(struct stream *s,  				struct eigrp_prefix_descriptor *pe); -extern uint16_t eigrp_add_authTLV_MD5_to_stream(struct stream *, -						struct eigrp_interface *); -extern uint16_t eigrp_add_authTLV_SHA256_to_stream(struct stream *, -						   struct eigrp_interface *); +extern uint16_t eigrp_add_authTLV_MD5_to_stream(struct stream *s, +						struct eigrp_interface *ei); +extern uint16_t eigrp_add_authTLV_SHA256_to_stream(struct stream *s, +						   struct eigrp_interface *ei); -extern int eigrp_unack_packet_retrans(struct thread *); -extern int eigrp_unack_multicast_packet_retrans(struct thread *); +extern int eigrp_unack_packet_retrans(struct thread *thread); +extern int eigrp_unack_multicast_packet_retrans(struct thread *thread);  /*   * untill there is reason to have their own header, these externs are found in   * eigrp_hello.c   */  extern void eigrp_sw_version_initialize(void); -extern void eigrp_hello_send(struct eigrp_interface *, uint8_t, -			     struct in_addr *); -extern void eigrp_hello_send_ack(struct eigrp_neighbor *); -extern void eigrp_hello_receive(struct eigrp *, struct ip *, -				struct eigrp_header *, struct stream *, -				struct eigrp_interface *, int); -extern int eigrp_hello_timer(struct thread *); +extern void eigrp_hello_send(struct eigrp_interface *ei, uint8_t flags, +			     struct in_addr *nbr_addr); +extern void eigrp_hello_send_ack(struct eigrp_neighbor *nbr); +extern void eigrp_hello_receive(struct eigrp *eigrp, struct ip *iph, +				struct eigrp_header *eigrph, struct stream *s, +				struct eigrp_interface *ei, int size); +extern int eigrp_hello_timer(struct thread *thread);  /*   * These externs are found in eigrp_update.c @@ -86,76 +88,83 @@ extern int eigrp_hello_timer(struct thread *);  extern bool eigrp_update_prefix_apply(struct eigrp *eigrp,  				      struct eigrp_interface *ei, int in,  				      struct prefix *prefix); -extern void eigrp_update_send(struct eigrp_interface *); -extern void eigrp_update_receive(struct eigrp *, struct ip *, -				 struct eigrp_header *, struct stream *, -				 struct eigrp_interface *, int); -extern void eigrp_update_send_all(struct eigrp *, struct eigrp_interface *); -extern void eigrp_update_send_init(struct eigrp_neighbor *); -extern void eigrp_update_send_EOT(struct eigrp_neighbor *); -extern int eigrp_update_send_GR_thread(struct thread *); -extern void eigrp_update_send_GR(struct eigrp_neighbor *, enum GR_type, -				 struct vty *); -extern void eigrp_update_send_interface_GR(struct eigrp_interface *, -					   enum GR_type, struct vty *); -extern void eigrp_update_send_process_GR(struct eigrp *, enum GR_type, -					 struct vty *); +extern void eigrp_update_send(struct eigrp_interface *ei); +extern void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph, +				 struct eigrp_header *eigrph, struct stream *s, +				 struct eigrp_interface *ei, int size); +extern void eigrp_update_send_all(struct eigrp *eigrp, +				  struct eigrp_interface *exception); +extern void eigrp_update_send_init(struct eigrp_neighbor *nbr); +extern void eigrp_update_send_EOT(struct eigrp_neighbor *nbr); +extern int eigrp_update_send_GR_thread(struct thread *thread); +extern void eigrp_update_send_GR(struct eigrp_neighbor *nbr, +				 enum GR_type gr_type, struct vty *vty); +extern void eigrp_update_send_interface_GR(struct eigrp_interface *ei, +					   enum GR_type gr_type, +					   struct vty *vty); +extern void eigrp_update_send_process_GR(struct eigrp *eigrp, +					 enum GR_type gr_type, struct vty *vty);  /*   * These externs are found in eigrp_query.c   */ -extern void eigrp_send_query(struct eigrp_interface *); -extern void eigrp_query_receive(struct eigrp *, struct ip *, -				struct eigrp_header *, struct stream *, -				struct eigrp_interface *, int); -extern uint32_t eigrp_query_send_all(struct eigrp *); +extern void eigrp_send_query(struct eigrp_interface *ei); +extern void eigrp_query_receive(struct eigrp *eigrp, struct ip *iph, +				struct eigrp_header *eigrph, struct stream *s, +				struct eigrp_interface *ei, int size); +extern uint32_t eigrp_query_send_all(struct eigrp *eigrp);  /*   * These externs are found in eigrp_reply.c   */ -extern void eigrp_send_reply(struct eigrp_neighbor *neigh, +extern void eigrp_send_reply(struct eigrp_neighbor *nbr,  			     struct eigrp_prefix_descriptor *pe); -extern void eigrp_reply_receive(struct eigrp *, struct ip *, -				struct eigrp_header *, struct stream *, -				struct eigrp_interface *, int); +extern void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph, +				struct eigrp_header *eigrph, struct stream *s, +				struct eigrp_interface *ei, int size);  /*   * These externs are found in eigrp_siaquery.c   */ -extern void eigrp_send_siaquery(struct eigrp_neighbor *neigh, +extern void eigrp_send_siaquery(struct eigrp_neighbor *nbr,  				struct eigrp_prefix_descriptor *pe); -extern void eigrp_siaquery_receive(struct eigrp *, struct ip *, -				   struct eigrp_header *, struct stream *, -				   struct eigrp_interface *, int); +extern void eigrp_siaquery_receive(struct eigrp *eigrp, struct ip *iph, +				   struct eigrp_header *eigrph, +				   struct stream *s, struct eigrp_interface *ei, +				   int size);  /*   * These externs are found in eigrp_siareply.c   */ -extern void eigrp_send_siareply(struct eigrp_neighbor *neigh, +extern void eigrp_send_siareply(struct eigrp_neighbor *nbr,  				struct eigrp_prefix_descriptor *pe); -extern void eigrp_siareply_receive(struct eigrp *, struct ip *, -				   struct eigrp_header *, struct stream *, -				   struct eigrp_interface *, int); +extern void eigrp_siareply_receive(struct eigrp *eigrp, struct ip *iph, +				   struct eigrp_header *eigrph, +				   struct stream *s, struct eigrp_interface *ei, +				   int size);  extern struct TLV_MD5_Authentication_Type *eigrp_authTLV_MD5_new(void); -extern void eigrp_authTLV_MD5_free(struct TLV_MD5_Authentication_Type *); +extern void eigrp_authTLV_MD5_free(struct TLV_MD5_Authentication_Type *authTLV);  extern struct TLV_SHA256_Authentication_Type *eigrp_authTLV_SHA256_new(void); -extern void eigrp_authTLV_SHA256_free(struct TLV_SHA256_Authentication_Type *); - -extern int eigrp_make_md5_digest(struct eigrp_interface *, struct stream *, -				 uint8_t); -extern int eigrp_check_md5_digest(struct stream *, -				  struct TLV_MD5_Authentication_Type *, -				  struct eigrp_neighbor *, uint8_t); -extern int eigrp_make_sha256_digest(struct eigrp_interface *, struct stream *, -				    uint8_t); -extern int eigrp_check_sha256_digest(struct stream *, -				     struct TLV_SHA256_Authentication_Type *, -				     struct eigrp_neighbor *, uint8_t); - - -extern void eigrp_IPv4_InternalTLV_free(struct TLV_IPv4_Internal_type *); +extern void +eigrp_authTLV_SHA256_free(struct TLV_SHA256_Authentication_Type *authTLV); + +extern int eigrp_make_md5_digest(struct eigrp_interface *ei, struct stream *s, +				 uint8_t flags); +extern int eigrp_check_md5_digest(struct stream *s, +				  struct TLV_MD5_Authentication_Type *authTLV, +				  struct eigrp_neighbor *nbr, uint8_t flags); +extern int eigrp_make_sha256_digest(struct eigrp_interface *ei, +				    struct stream *s, uint8_t flags); +extern int +eigrp_check_sha256_digest(struct stream *s, +			  struct TLV_SHA256_Authentication_Type *authTLV, +			  struct eigrp_neighbor *nbr, uint8_t flags); + + +extern void +eigrp_IPv4_InternalTLV_free(struct TLV_IPv4_Internal_type *IPv4_InternalTLV);  extern struct TLV_Sequence_Type *eigrp_SequenceTLV_new(void);  | 
