summaryrefslogtreecommitdiffstats
path: root/include/libnetlink.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemming@brocade.com>2015-08-13 14:09:58 -0700
committerStephen Hemminger <shemming@brocade.com>2015-08-13 14:09:58 -0700
commit892e21248cfdb8c1332d46a01df253eae748c9d8 (patch)
tree4734ddd32f03bf37e4ab14b9607748fa9daf6648 /include/libnetlink.h
parenta02371fb3831c8d3d9d53209f2389b250a1fb804 (diff)
remove unnecessary extern
No need for extern on function prototypes.
Diffstat (limited to 'include/libnetlink.h')
-rw-r--r--include/libnetlink.h81
1 files changed, 42 insertions, 39 deletions
diff --git a/include/libnetlink.h b/include/libnetlink.h
index 968034ba..0503dea5 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -26,20 +26,20 @@ struct rtnl_handle
extern int rcvbuf;
-extern int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions)
+int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions)
__attribute__((warn_unused_result));
-extern int rtnl_open_byproto(struct rtnl_handle *rth, unsigned subscriptions,
+int rtnl_open_byproto(struct rtnl_handle *rth, unsigned subscriptions,
int protocol)
__attribute__((warn_unused_result));
-extern void rtnl_close(struct rtnl_handle *rth);
-extern int rtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type)
+void rtnl_close(struct rtnl_handle *rth);
+int rtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type)
__attribute__((warn_unused_result));
-extern int rtnl_wilddump_req_filter(struct rtnl_handle *rth, int fam, int type,
+int rtnl_wilddump_req_filter(struct rtnl_handle *rth, int fam, int type,
__u32 filt_mask)
__attribute__((warn_unused_result));
-extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req,
+int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req,
int len)
__attribute__((warn_unused_result));
@@ -60,40 +60,43 @@ struct rtnl_dump_filter_arg
void *arg1;
};
-extern int rtnl_dump_filter_l(struct rtnl_handle *rth,
+int rtnl_dump_filter_l(struct rtnl_handle *rth,
const struct rtnl_dump_filter_arg *arg);
-extern int rtnl_dump_filter(struct rtnl_handle *rth, rtnl_filter_t filter,
- void *arg);
-extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
- struct nlmsghdr *answer, size_t len)
+int rtnl_dump_filter(struct rtnl_handle *rth, rtnl_filter_t filter, void *arg);
+int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
+ struct nlmsghdr *answer, size_t len)
__attribute__((warn_unused_result));
-extern int rtnl_send(struct rtnl_handle *rth, const void *buf, int)
+int rtnl_send(struct rtnl_handle *rth, const void *buf, int)
__attribute__((warn_unused_result));
-extern int rtnl_send_check(struct rtnl_handle *rth, const void *buf, int)
+int rtnl_send_check(struct rtnl_handle *rth, const void *buf, int)
__attribute__((warn_unused_result));
-extern int addattr(struct nlmsghdr *n, int maxlen, int type);
-extern int addattr8(struct nlmsghdr *n, int maxlen, int type, __u8 data);
-extern int addattr16(struct nlmsghdr *n, int maxlen, int type, __u16 data);
-extern int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data);
-extern int addattr64(struct nlmsghdr *n, int maxlen, int type, __u64 data);
-extern int addattrstrz(struct nlmsghdr *n, int maxlen, int type, const char *data);
-
-extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data, int alen);
-extern int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len);
-extern struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type);
-extern int addattr_nest_end(struct nlmsghdr *n, struct rtattr *nest);
-extern struct rtattr *addattr_nest_compat(struct nlmsghdr *n, int maxlen, int type, const void *data, int len);
-extern int addattr_nest_compat_end(struct nlmsghdr *n, struct rtattr *nest);
-extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data);
-extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, const void *data, int alen);
-
-extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len);
-extern int parse_rtattr_flags(struct rtattr *tb[], int max, struct rtattr *rta,
+int addattr(struct nlmsghdr *n, int maxlen, int type);
+int addattr8(struct nlmsghdr *n, int maxlen, int type, __u8 data);
+int addattr16(struct nlmsghdr *n, int maxlen, int type, __u16 data);
+int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data);
+int addattr64(struct nlmsghdr *n, int maxlen, int type, __u64 data);
+int addattrstrz(struct nlmsghdr *n, int maxlen, int type, const char *data);
+
+int addattr_l(struct nlmsghdr *n, int maxlen, int type,
+ const void *data, int alen);
+int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len);
+struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type);
+int addattr_nest_end(struct nlmsghdr *n, struct rtattr *nest);
+struct rtattr *addattr_nest_compat(struct nlmsghdr *n, int maxlen, int type,
+ const void *data, int len);
+int addattr_nest_compat_end(struct nlmsghdr *n, struct rtattr *nest);
+int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data);
+int rta_addattr_l(struct rtattr *rta, int maxlen, int type,
+ const void *data, int alen);
+
+int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len);
+int parse_rtattr_flags(struct rtattr *tb[], int max, struct rtattr *rta,
int len, unsigned short flags);
-extern int parse_rtattr_byindex(struct rtattr *tb[], int max, struct rtattr *rta, int len);
-extern struct rtattr *parse_rtattr_one(int type, struct rtattr *rta, int len);
-extern int __parse_rtattr_nested_compat(struct rtattr *tb[], int max, struct rtattr *rta, int len);
+int parse_rtattr_byindex(struct rtattr *tb[], int max,
+ struct rtattr *rta, int len);
+struct rtattr *parse_rtattr_one(int type, struct rtattr *rta, int len);
+int __parse_rtattr_nested_compat(struct rtattr *tb[], int max, struct rtattr *rta, int len);
#define parse_rtattr_nested(tb, max, rta) \
(parse_rtattr((tb), (max), RTA_DATA(rta), RTA_PAYLOAD(rta)))
@@ -128,11 +131,11 @@ static inline const char *rta_getattr_str(const struct rtattr *rta)
return (const char *)RTA_DATA(rta);
}
-extern int rtnl_listen_all_nsid(struct rtnl_handle *);
-extern int rtnl_listen(struct rtnl_handle *, rtnl_listen_filter_t handler,
- void *jarg);
-extern int rtnl_from_file(FILE *, rtnl_listen_filter_t handler,
- void *jarg);
+int rtnl_listen_all_nsid(struct rtnl_handle *);
+int rtnl_listen(struct rtnl_handle *, rtnl_listen_filter_t handler,
+ void *jarg);
+int rtnl_from_file(FILE *, rtnl_listen_filter_t handler,
+ void *jarg);
#define NLMSG_TAIL(nmsg) \
((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))