00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef NETLINK_LOG_MSG_H_
00016 #define NETLINK_LOG_MSG_H_
00017
00018 #include <netlink/netlink.h>
00019
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023
00024 struct nlmsghdr;
00025 struct nfnl_log_msg;
00026
00027 extern struct nl_object_ops log_msg_obj_ops;
00028
00029
00030 extern struct nfnl_log_msg *nfnl_log_msg_alloc(void);
00031 extern int nfnlmsg_log_msg_parse(struct nlmsghdr *,
00032 struct nfnl_log_msg **);
00033
00034 extern void nfnl_log_msg_get(struct nfnl_log_msg *);
00035 extern void nfnl_log_msg_put(struct nfnl_log_msg *);
00036
00037 extern void nfnl_log_msg_set_family(struct nfnl_log_msg *, uint8_t);
00038 extern uint8_t nfnl_log_msg_get_family(const struct nfnl_log_msg *);
00039
00040 extern void nfnl_log_msg_set_hwproto(struct nfnl_log_msg *, uint16_t);
00041 extern int nfnl_log_msg_test_hwproto(const struct nfnl_log_msg *);
00042 extern uint16_t nfnl_log_msg_get_hwproto(const struct nfnl_log_msg *);
00043
00044 extern void nfnl_log_msg_set_hook(struct nfnl_log_msg *, uint8_t);
00045 extern int nfnl_log_msg_test_hook(const struct nfnl_log_msg *);
00046 extern uint8_t nfnl_log_msg_get_hook(const struct nfnl_log_msg *);
00047
00048 extern void nfnl_log_msg_set_mark(struct nfnl_log_msg *, uint32_t);
00049 extern int nfnl_log_msg_test_mark(const struct nfnl_log_msg *);
00050 extern uint32_t nfnl_log_msg_get_mark(const struct nfnl_log_msg *);
00051
00052 extern void nfnl_log_msg_set_timestamp(struct nfnl_log_msg *,
00053 struct timeval *);
00054 extern const struct timeval *nfnl_log_msg_get_timestamp(const struct nfnl_log_msg *);
00055
00056 extern void nfnl_log_msg_set_indev(struct nfnl_log_msg *, uint32_t);
00057 extern uint32_t nfnl_log_msg_get_indev(const struct nfnl_log_msg *);
00058
00059 extern void nfnl_log_msg_set_outdev(struct nfnl_log_msg *, uint32_t);
00060 extern uint32_t nfnl_log_msg_get_outdev(const struct nfnl_log_msg *);
00061
00062 extern void nfnl_log_msg_set_physindev(struct nfnl_log_msg *, uint32_t);
00063 extern uint32_t nfnl_log_msg_get_physindev(const struct nfnl_log_msg *);
00064
00065 extern void nfnl_log_msg_set_physoutdev(struct nfnl_log_msg *, uint32_t);
00066 extern uint32_t nfnl_log_msg_get_physoutdev(const struct nfnl_log_msg *);
00067
00068 extern void nfnl_log_msg_set_hwaddr(struct nfnl_log_msg *, uint8_t *, int);
00069 extern const uint8_t * nfnl_log_msg_get_hwaddr(const struct nfnl_log_msg *, int *);
00070
00071 extern int nfnl_log_msg_set_payload(struct nfnl_log_msg *, uint8_t *, int);
00072 extern const void * nfnl_log_msg_get_payload(const struct nfnl_log_msg *, int *);
00073
00074 extern int nfnl_log_msg_set_prefix(struct nfnl_log_msg *, void *);
00075 extern const char * nfnl_log_msg_get_prefix(const struct nfnl_log_msg *);
00076
00077 extern void nfnl_log_msg_set_uid(struct nfnl_log_msg *, uint32_t);
00078 extern int nfnl_log_msg_test_uid(const struct nfnl_log_msg *);
00079 extern uint32_t nfnl_log_msg_get_uid(const struct nfnl_log_msg *);
00080
00081 extern void nfnl_log_msg_set_gid(struct nfnl_log_msg *, uint32_t);
00082 extern int nfnl_log_msg_test_gid(const struct nfnl_log_msg *);
00083 extern uint32_t nfnl_log_msg_get_gid(const struct nfnl_log_msg *);
00084
00085 extern void nfnl_log_msg_set_seq(struct nfnl_log_msg *, uint32_t);
00086 extern int nfnl_log_msg_test_seq(const struct nfnl_log_msg *);
00087 extern uint32_t nfnl_log_msg_get_seq(const struct nfnl_log_msg *);
00088
00089 extern void nfnl_log_msg_set_seq_global(struct nfnl_log_msg *, uint32_t);
00090 extern int nfnl_log_msg_test_seq_global(const struct nfnl_log_msg *);
00091 extern uint32_t nfnl_log_msg_get_seq_global(const struct nfnl_log_msg *);
00092
00093 #ifdef __cplusplus
00094 }
00095 #endif
00096
00097 #endif
00098