00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef NETLINK_NETLINK_H_
00013 #define NETLINK_NETLINK_H_
00014
00015 #include <stdio.h>
00016 #include <stdint.h>
00017 #include <string.h>
00018 #include <stdlib.h>
00019 #include <sys/poll.h>
00020 #include <sys/socket.h>
00021 #include <sys/types.h>
00022 #include <sys/time.h>
00023 #include <netdb.h>
00024 #include <netlink/netlink-compat.h>
00025 #include <linux/netlink.h>
00026 #include <linux/rtnetlink.h>
00027 #include <linux/genetlink.h>
00028 #include <linux/netfilter/nfnetlink.h>
00029 #include <netlink/version.h>
00030 #include <netlink/errno.h>
00031 #include <netlink/types.h>
00032 #include <netlink/handlers.h>
00033 #include <netlink/socket.h>
00034
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038
00039 struct ucred;
00040
00041 extern int nl_debug;
00042 extern struct nl_dump_params nl_debug_dp;
00043
00044
00045 extern int nl_connect(struct nl_sock *, int);
00046 extern void nl_close(struct nl_sock *);
00047
00048
00049 extern int nl_sendto(struct nl_sock *, void *, size_t);
00050 extern int nl_sendmsg(struct nl_sock *, struct nl_msg *,
00051 struct msghdr *);
00052 extern int nl_send(struct nl_sock *, struct nl_msg *);
00053 extern int nl_send_auto_complete(struct nl_sock *,
00054 struct nl_msg *);
00055 extern int nl_send_simple(struct nl_sock *, int, int,
00056 void *, size_t);
00057
00058
00059 extern int nl_recv(struct nl_sock *,
00060 struct sockaddr_nl *, unsigned char **,
00061 struct ucred **);
00062
00063 extern int nl_recvmsgs(struct nl_sock *, struct nl_cb *);
00064
00065 extern int nl_recvmsgs_default(struct nl_sock *);
00066
00067 extern int nl_wait_for_ack(struct nl_sock *);
00068
00069
00070 extern char * nl_nlfamily2str(int, char *, size_t);
00071 extern int nl_str2nlfamily(const char *);
00072
00073 #ifdef __cplusplus
00074 }
00075 #endif
00076
00077 #endif