diff options
| author | whitespace / reindent <invalid@invalid.invalid> | 2017-08-09 11:49:42 +0200 |
|---|---|---|
| committer | whitespace / reindent <invalid@invalid.invalid> | 2017-08-09 12:03:17 +0200 |
| commit | ac4d0be5874fafd14212d6007fff7495edc9b152 (patch) | |
| tree | 5e2f0d3189de928c849f9983406389ade3b098cb /ospf6d/ospf6_message.h | |
| parent | 76a86854181c27819e5cf71b12ae1fa5ccd9e02a (diff) | |
*: reindentreindent-3.0-after
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_message.h')
| -rw-r--r-- | ospf6d/ospf6_message.h | 134 |
1 files changed, 64 insertions, 70 deletions
diff --git a/ospf6d/ospf6_message.h b/ospf6d/ospf6_message.h index 4a9e0c7a66..0ec1a24d31 100644 --- a/ospf6d/ospf6_message.h +++ b/ospf6d/ospf6_message.h @@ -14,9 +14,9 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with GNU Zebra; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * along with GNU Zebra; see the file COPYING. If not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. */ #ifndef OSPF6_MESSAGE_H @@ -28,12 +28,12 @@ extern unsigned char conf_debug_ospf6_message[]; #define OSPF6_DEBUG_MESSAGE_SEND 0x01 #define OSPF6_DEBUG_MESSAGE_RECV 0x02 -#define OSPF6_DEBUG_MESSAGE_ON(type, level) \ - (conf_debug_ospf6_message[type] |= (level)) -#define OSPF6_DEBUG_MESSAGE_OFF(type, level) \ - (conf_debug_ospf6_message[type] &= ~(level)) -#define IS_OSPF6_DEBUG_MESSAGE(t, e) \ - (conf_debug_ospf6_message[t] & OSPF6_DEBUG_MESSAGE_ ## e) +#define OSPF6_DEBUG_MESSAGE_ON(type, level) \ + (conf_debug_ospf6_message[type] |= (level)) +#define OSPF6_DEBUG_MESSAGE_OFF(type, level) \ + (conf_debug_ospf6_message[type] &= ~(level)) +#define IS_OSPF6_DEBUG_MESSAGE(t, e) \ + (conf_debug_ospf6_message[t] & OSPF6_DEBUG_MESSAGE_##e) /* Type */ #define OSPF6_MESSAGE_TYPE_UNKNOWN 0x0 @@ -46,45 +46,42 @@ extern unsigned char conf_debug_ospf6_message[]; /* OSPFv3 packet header */ #define OSPF6_HEADER_SIZE 16U -struct ospf6_header -{ - u_char version; - u_char type; - u_int16_t length; - u_int32_t router_id; - u_int32_t area_id; - u_int16_t checksum; - u_char instance_id; - u_char reserved; +struct ospf6_header { + u_char version; + u_char type; + u_int16_t length; + u_int32_t router_id; + u_int32_t area_id; + u_int16_t checksum; + u_char instance_id; + u_char reserved; }; #define OSPF6_MESSAGE_END(H) ((caddr_t) (H) + ntohs ((H)->length)) /* Hello */ #define OSPF6_HELLO_MIN_SIZE 20U -struct ospf6_hello -{ - ifindex_t interface_id; - u_char priority; - u_char options[3]; - u_int16_t hello_interval; - u_int16_t dead_interval; - u_int32_t drouter; - u_int32_t bdrouter; - /* Followed by Router-IDs */ +struct ospf6_hello { + ifindex_t interface_id; + u_char priority; + u_char options[3]; + u_int16_t hello_interval; + u_int16_t dead_interval; + u_int32_t drouter; + u_int32_t bdrouter; + /* Followed by Router-IDs */ }; /* Database Description */ #define OSPF6_DB_DESC_MIN_SIZE 12U -struct ospf6_dbdesc -{ - u_char reserved1; - u_char options[3]; - u_int16_t ifmtu; - u_char reserved2; - u_char bits; - u_int32_t seqnum; - /* Followed by LSA Headers */ +struct ospf6_dbdesc { + u_char reserved1; + u_char options[3]; + u_int16_t ifmtu; + u_char reserved2; + u_char bits; + u_int32_t seqnum; + /* Followed by LSA Headers */ }; #define OSPF6_DBDESC_MSBIT (0x01) /* master/slave bit */ @@ -95,20 +92,18 @@ struct ospf6_dbdesc #define OSPF6_LS_REQ_MIN_SIZE 0U /* It is just a sequence of entries below */ #define OSPF6_LSREQ_LSDESC_FIX_SIZE 12U -struct ospf6_lsreq_entry -{ - u_int16_t reserved; /* Must Be Zero */ - u_int16_t type; /* LS type */ - u_int32_t id; /* Link State ID */ - u_int32_t adv_router; /* Advertising Router */ +struct ospf6_lsreq_entry { + u_int16_t reserved; /* Must Be Zero */ + u_int16_t type; /* LS type */ + u_int32_t id; /* Link State ID */ + u_int32_t adv_router; /* Advertising Router */ }; /* Link State Update */ #define OSPF6_LS_UPD_MIN_SIZE 4U -struct ospf6_lsupdate -{ - u_int32_t lsa_number; - /* Followed by LSAs */ +struct ospf6_lsupdate { + u_int32_t lsa_number; + /* Followed by LSAs */ }; /* Link State Acknowledgement */ @@ -116,27 +111,26 @@ struct ospf6_lsupdate /* It is just a sequence of LSA Headers */ /* Function definition */ -extern void ospf6_hello_print (struct ospf6_header *); -extern void ospf6_dbdesc_print (struct ospf6_header *); -extern void ospf6_lsreq_print (struct ospf6_header *); -extern void ospf6_lsupdate_print (struct ospf6_header *); -extern void ospf6_lsack_print (struct ospf6_header *); - -extern int ospf6_iobuf_size (unsigned int size); -extern void ospf6_message_terminate (void); -extern int ospf6_receive (struct thread *thread); - -extern int ospf6_hello_send (struct thread *thread); -extern int ospf6_dbdesc_send (struct thread *thread); -extern int ospf6_dbdesc_send_newone (struct thread *thread); -extern int ospf6_lsreq_send (struct thread *thread); -extern int ospf6_lsupdate_send_interface (struct thread *thread); -extern int ospf6_lsupdate_send_neighbor (struct thread *thread); -extern int ospf6_lsack_send_interface (struct thread *thread); -extern int ospf6_lsack_send_neighbor (struct thread *thread); - -extern int config_write_ospf6_debug_message (struct vty *); -extern void install_element_ospf6_debug_message (void); +extern void ospf6_hello_print(struct ospf6_header *); +extern void ospf6_dbdesc_print(struct ospf6_header *); +extern void ospf6_lsreq_print(struct ospf6_header *); +extern void ospf6_lsupdate_print(struct ospf6_header *); +extern void ospf6_lsack_print(struct ospf6_header *); + +extern int ospf6_iobuf_size(unsigned int size); +extern void ospf6_message_terminate(void); +extern int ospf6_receive(struct thread *thread); + +extern int ospf6_hello_send(struct thread *thread); +extern int ospf6_dbdesc_send(struct thread *thread); +extern int ospf6_dbdesc_send_newone(struct thread *thread); +extern int ospf6_lsreq_send(struct thread *thread); +extern int ospf6_lsupdate_send_interface(struct thread *thread); +extern int ospf6_lsupdate_send_neighbor(struct thread *thread); +extern int ospf6_lsack_send_interface(struct thread *thread); +extern int ospf6_lsack_send_neighbor(struct thread *thread); + +extern int config_write_ospf6_debug_message(struct vty *); +extern void install_element_ospf6_debug_message(void); #endif /* OSPF6_MESSAGE_H */ - |
