diff options
author | Thomas Graf <tgr@plip.localdomain> | 2008-12-10 17:00:11 (GMT) |
---|---|---|
committer | Thomas Graf <tgr@plip.localdomain> | 2008-12-10 17:00:11 (GMT) |
commit | 724dfa6d70943e0d4e3c8e54bff43050828a64d0 (patch) | |
tree | 46d8b4a8fcb930bcd156739b17df71726b2f2ad1 /include | |
parent | d112cfbcb9e98417396d01def368fb16046c6011 (diff) | |
download | libnl-724dfa6d70943e0d4e3c8e54bff43050828a64d0.zip libnl-724dfa6d70943e0d4e3c8e54bff43050828a64d0.tar.gz libnl-724dfa6d70943e0d4e3c8e54bff43050828a64d0.tar.bz2 |
Consistent naming of socket functions
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink/socket.h | 74 |
1 files changed, 32 insertions, 42 deletions
diff --git a/include/netlink/socket.h b/include/netlink/socket.h index 5eefa08..4c0589d 100644 --- a/include/netlink/socket.h +++ b/include/netlink/socket.h @@ -22,55 +22,45 @@ extern "C" { /* backwards compatibility for now */ #define nl_handle nl_sock -extern struct nl_sock * nl_socket_alloc(void); -extern struct nl_sock * nl_socket_alloc_cb(struct nl_cb *); -extern void nl_socket_free(struct nl_sock *); +extern struct nl_sock * nl_socket_alloc(void); +extern struct nl_sock * nl_socket_alloc_cb(struct nl_cb *); +extern void nl_socket_free(struct nl_sock *); -extern uint32_t nl_socket_get_local_port(struct nl_sock *); -extern void nl_socket_set_local_port(struct nl_sock *, - uint32_t); +extern uint32_t nl_socket_get_local_port(struct nl_sock *); +extern void nl_socket_set_local_port(struct nl_sock *, uint32_t); -extern int nl_socket_add_memberships(struct nl_sock *, - int, ...); -extern int nl_socket_drop_memberships(struct nl_sock *, - int, ...); -extern void nl_join_groups(struct nl_sock *, int); +extern int nl_socket_add_memberships(struct nl_sock *, int, ...); +extern int nl_socket_add_membership(struct nl_sock *, int); +extern int nl_socket_drop_memberships(struct nl_sock *, int, ...); +extern int nl_socket_drop_membership(struct nl_sock *, + int); +extern void nl_join_groups(struct nl_sock *, int); -static inline int nl_socket_add_membership(struct nl_sock *sk, int group) { - return nl_socket_add_memberships(sk, group, 0); -} - -static inline int nl_socket_drop_membership(struct nl_sock *sk, int group) { - return nl_socket_drop_memberships(sk, group, 0); -} -extern uint32_t nl_socket_get_peer_port(struct nl_sock *); -extern void nl_socket_set_peer_port(struct nl_sock *, +extern uint32_t nl_socket_get_peer_port(struct nl_sock *); +extern void nl_socket_set_peer_port(struct nl_sock *, uint32_t); -extern struct nl_cb * nl_socket_get_cb(struct nl_sock *); -extern void nl_socket_set_cb(struct nl_sock *, +extern struct nl_cb * nl_socket_get_cb(struct nl_sock *); +extern void nl_socket_set_cb(struct nl_sock *, struct nl_cb *); -extern int nl_socket_modify_cb(struct nl_sock *, - enum nl_cb_type, - enum nl_cb_kind, - nl_recvmsg_msg_cb_t, - void *); - -extern int nl_set_buffer_size(struct nl_sock *, - int, int); -extern int nl_set_passcred(struct nl_sock *, int); -extern int nl_socket_recv_pktinfo(struct nl_sock *, int); - -extern void nl_disable_sequence_check(struct nl_sock *); -extern unsigned int nl_socket_use_seq(struct nl_sock *); -extern void nl_socket_disable_auto_ack(struct nl_sock *); -extern void nl_socket_enable_auto_ack(struct nl_sock *); - -extern int nl_socket_get_fd(struct nl_sock *); -extern int nl_socket_set_nonblocking(struct nl_sock *); -extern void nl_socket_enable_msg_peek(struct nl_sock *); -extern void nl_socket_disable_msg_peek(struct nl_sock *); +extern int nl_socket_modify_cb(struct nl_sock *, enum nl_cb_type, + enum nl_cb_kind, + nl_recvmsg_msg_cb_t, void *); + +extern int nl_socket_set_buffer_size(struct nl_sock *, int, int); +extern int nl_socket_set_passcred(struct nl_sock *, int); +extern int nl_socket_recv_pktinfo(struct nl_sock *, int); + +extern void nl_socket_disable_seq_check(struct nl_sock *); +extern unsigned int nl_socket_use_seq(struct nl_sock *); +extern void nl_socket_disable_auto_ack(struct nl_sock *); +extern void nl_socket_enable_auto_ack(struct nl_sock *); + +extern int nl_socket_get_fd(struct nl_sock *); +extern int nl_socket_set_nonblocking(struct nl_sock *); +extern void nl_socket_enable_msg_peek(struct nl_sock *); +extern void nl_socket_disable_msg_peek(struct nl_sock *); #ifdef __cplusplus } |