diff options
author | Thomas Graf <tgraf@suug.ch> | 2007-09-14 23:28:01 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2007-09-14 23:28:01 (GMT) |
commit | 44d362409d5469aed47d19e7908d19bd194493a4 (patch) | |
tree | 5d1e739a4566f3af796273e5c3f78ca53d234df6 /include/netlink/socket.h | |
download | libnl-44d362409d5469aed47d19e7908d19bd194493a4.zip libnl-44d362409d5469aed47d19e7908d19bd194493a4.tar.gz libnl-44d362409d5469aed47d19e7908d19bd194493a4.tar.bz2 |
Initial import
Diffstat (limited to 'include/netlink/socket.h')
-rw-r--r-- | include/netlink/socket.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/include/netlink/socket.h b/include/netlink/socket.h new file mode 100644 index 0000000..038df7a --- /dev/null +++ b/include/netlink/socket.h @@ -0,0 +1,66 @@ +/* + * netlink/socket.h Netlink Socket + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation version 2.1 + * of the License. + * + * Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch> + */ + +#ifndef NETLINK_SOCKET_H_ +#define NETLINK_SOCKET_H_ + +#include <netlink/types.h> +#include <netlink/handlers.h> + +#ifdef __cplusplus +extern "C" { +#endif + +extern struct nl_handle * nl_handle_alloc(void); +extern struct nl_handle * nl_handle_alloc_cb(struct nl_cb *); +extern void nl_handle_destroy(struct nl_handle *); + +extern uint32_t nl_socket_get_local_port(struct nl_handle *); +extern void nl_socket_set_local_port(struct nl_handle *, + uint32_t); + +extern int nl_socket_add_membership(struct nl_handle *, + int); +extern int nl_socket_drop_membership(struct nl_handle *, + int); +extern void nl_join_groups(struct nl_handle *, int); + +extern uint32_t nl_socket_get_peer_port(struct nl_handle *); +extern void nl_socket_set_peer_port(struct nl_handle *, + uint32_t); + +extern struct nl_cb * nl_socket_get_cb(struct nl_handle *); +extern void nl_socket_set_cb(struct nl_handle *, + struct nl_cb *); +extern int nl_socket_modify_cb(struct nl_handle *, + enum nl_cb_type, + enum nl_cb_kind, + nl_recvmsg_msg_cb_t, + void *); + +extern int nl_set_buffer_size(struct nl_handle *, + int, int); +extern int nl_set_passcred(struct nl_handle *, int); +extern int nl_socket_recv_pktinfo(struct nl_handle *, int); + +extern void nl_disable_sequence_check(struct nl_handle *); +extern unsigned int nl_socket_use_seq(struct nl_handle *); + +extern int nl_socket_get_fd(struct nl_handle *); +extern int nl_socket_set_nonblocking(struct nl_handle *); +extern void nl_socket_enable_msg_peek(struct nl_handle *); +extern void nl_socket_disable_msg_peek(struct nl_handle *); + +#ifdef __cplusplus +} +#endif + +#endif |