summaryrefslogtreecommitdiffstats
path: root/ospfclient/ospf_apiclient.h
diff options
context:
space:
mode:
authorwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:03:14 +0200
committerwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:04:07 +0200
commitd62a17aedeb0eebdba98238874bb13d62c48dbf9 (patch)
tree3b319b1d61c8b85b4d1f06adf8b844bb8a9b5107 /ospfclient/ospf_apiclient.h
parent*: add indent control files (diff)
downloadfrr-d62a17aedeb0eebdba98238874bb13d62c48dbf9.tar.xz
frr-d62a17aedeb0eebdba98238874bb13d62c48dbf9.zip
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfclient/ospf_apiclient.h')
-rw-r--r--ospfclient/ospf_apiclient.h127
1 files changed, 49 insertions, 78 deletions
diff --git a/ospfclient/ospf_apiclient.h b/ospfclient/ospf_apiclient.h
index 5882ac349..916a2d8ed 100644
--- a/ospfclient/ospf_apiclient.h
+++ b/ospfclient/ospf_apiclient.h
@@ -23,28 +23,25 @@
#define _OSPF_APICLIENT_H
/* Structure for the OSPF API client */
-struct ospf_apiclient
-{
-
- /* Sockets for sync requests and async notifications */
- int fd_sync;
- int fd_async;
-
- /* Pointer to callback functions */
- void (*ready_notify) (u_char lsa_type, u_char opaque_type,
- struct in_addr addr);
- void (*new_if) (struct in_addr ifaddr, struct in_addr area_id);
- void (*del_if) (struct in_addr ifaddr);
- void (*ism_change) (struct in_addr ifaddr, struct in_addr area_id,
- u_char status);
- void (*nsm_change) (struct in_addr ifaddr, struct in_addr nbraddr,
- struct in_addr router_id, u_char status);
- void (*update_notify) (struct in_addr ifaddr, struct in_addr area_id,
- u_char self_origin,
- struct lsa_header * lsa);
- void (*delete_notify) (struct in_addr ifaddr, struct in_addr area_id,
- u_char self_origin,
- struct lsa_header * lsa);
+struct ospf_apiclient {
+
+ /* Sockets for sync requests and async notifications */
+ int fd_sync;
+ int fd_async;
+
+ /* Pointer to callback functions */
+ void (*ready_notify)(u_char lsa_type, u_char opaque_type,
+ struct in_addr addr);
+ void (*new_if)(struct in_addr ifaddr, struct in_addr area_id);
+ void (*del_if)(struct in_addr ifaddr);
+ void (*ism_change)(struct in_addr ifaddr, struct in_addr area_id,
+ u_char status);
+ void (*nsm_change)(struct in_addr ifaddr, struct in_addr nbraddr,
+ struct in_addr router_id, u_char status);
+ void (*update_notify)(struct in_addr ifaddr, struct in_addr area_id,
+ u_char self_origin, struct lsa_header *lsa);
+ void (*delete_notify)(struct in_addr ifaddr, struct in_addr area_id,
+ u_char self_origin, struct lsa_header *lsa);
};
@@ -54,79 +51,53 @@ struct ospf_apiclient
/* Open connection to OSPF daemon. Two ports will be allocated on
client, sync channel at syncport and reverse channel at syncport+1 */
-struct ospf_apiclient *ospf_apiclient_connect (char *host, int syncport);
+struct ospf_apiclient *ospf_apiclient_connect(char *host, int syncport);
/* Shutdown connection to OSPF daemon. */
-int ospf_apiclient_close (struct ospf_apiclient *oclient);
+int ospf_apiclient_close(struct ospf_apiclient *oclient);
/* Synchronous request to register opaque type. */
-int ospf_apiclient_register_opaque_type (struct ospf_apiclient *oclient,
- u_char ltype, u_char otype);
+int ospf_apiclient_register_opaque_type(struct ospf_apiclient *oclient,
+ u_char ltype, u_char otype);
/* Synchronous request to register event mask. */
-int ospf_apiclient_register_events (struct ospf_apiclient *oclient,
- u_int32_t mask);
+int ospf_apiclient_register_events(struct ospf_apiclient *oclient,
+ u_int32_t mask);
/* Register callback functions.*/
-void ospf_apiclient_register_callback (struct ospf_apiclient *oclient,
- void (*ready_notify) (u_char lsa_type,
- u_char
- opaque_type,
- struct in_addr
- addr),
- void (*new_if) (struct in_addr ifaddr,
- struct in_addr
- area_id),
- void (*del_if) (struct in_addr ifaddr),
- void (*ism_change) (struct in_addr
- ifaddr,
- struct in_addr
- area_id,
- u_char status),
- void (*nsm_change) (struct in_addr
- ifaddr,
- struct in_addr
- nbraddr,
- struct in_addr
- router_id,
- u_char status),
- void (*update_notify) (struct in_addr
- ifaddr,
- struct in_addr
- area_id,
- u_char selforig,
- struct
- lsa_header *
- lsa),
- void (*delete_notify) (struct in_addr
- ifaddr,
- struct in_addr
- area_id,
- u_char selforig,
- struct
- lsa_header *
- lsa));
+void ospf_apiclient_register_callback(
+ struct ospf_apiclient *oclient,
+ void (*ready_notify)(u_char lsa_type, u_char opaque_type,
+ struct in_addr addr),
+ void (*new_if)(struct in_addr ifaddr, struct in_addr area_id),
+ void (*del_if)(struct in_addr ifaddr),
+ void (*ism_change)(struct in_addr ifaddr, struct in_addr area_id,
+ u_char status),
+ void (*nsm_change)(struct in_addr ifaddr, struct in_addr nbraddr,
+ struct in_addr router_id, u_char status),
+ void (*update_notify)(struct in_addr ifaddr, struct in_addr area_id,
+ u_char selforig, struct lsa_header *lsa),
+ void (*delete_notify)(struct in_addr ifaddr, struct in_addr area_id,
+ u_char selforig, struct lsa_header *lsa));
/* Synchronous request to synchronize LSDB. */
-int ospf_apiclient_sync_lsdb (struct ospf_apiclient *oclient);
+int ospf_apiclient_sync_lsdb(struct ospf_apiclient *oclient);
/* Synchronous request to originate or update opaque LSA. */
-int
-ospf_apiclient_lsa_originate(struct ospf_apiclient *oclient,
- struct in_addr ifaddr,
- struct in_addr area_id,
- u_char lsa_type,
- u_char opaque_type, u_int32_t opaque_id,
- void *opaquedata, int opaquelen);
+int ospf_apiclient_lsa_originate(struct ospf_apiclient *oclient,
+ struct in_addr ifaddr, struct in_addr area_id,
+ u_char lsa_type, u_char opaque_type,
+ u_int32_t opaque_id, void *opaquedata,
+ int opaquelen);
/* Synchronous request to delete opaque LSA. Parameter opaque_id is in
host byte order */
-int ospf_apiclient_lsa_delete (struct ospf_apiclient *oclient,
- struct in_addr area_id, u_char lsa_type,
- u_char opaque_type, u_int32_t opaque_id);
+int ospf_apiclient_lsa_delete(struct ospf_apiclient *oclient,
+ struct in_addr area_id, u_char lsa_type,
+ u_char opaque_type, u_int32_t opaque_id);
/* Fetch async message and handle it */
-int ospf_apiclient_handle_async (struct ospf_apiclient *oclient);
+int ospf_apiclient_handle_async(struct ospf_apiclient *oclient);
#endif /* _OSPF_APICLIENT_H */