00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef NETLINK_QUEUE_MSG_H_
00013 #define NETLINK_QUEUE_MSG_H_
00014
00015 #include <netlink/netlink.h>
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021 struct nl_sock;
00022 struct nlmsghdr;
00023 struct nfnl_queue_msg;
00024
00025 extern struct nl_object_ops queue_msg_obj_ops;
00026
00027
00028 extern struct nfnl_queue_msg * nfnl_queue_msg_alloc(void);
00029 extern int nfnlmsg_queue_msg_parse(struct nlmsghdr *,
00030 struct nfnl_queue_msg **);
00031
00032 extern void nfnl_queue_msg_get(struct nfnl_queue_msg *);
00033 extern void nfnl_queue_msg_put(struct nfnl_queue_msg *);
00034
00035 extern void nfnl_queue_msg_set_group(struct nfnl_queue_msg *, uint16_t);
00036 extern int nfnl_queue_msg_test_group(const struct nfnl_queue_msg *);
00037 extern uint16_t nfnl_queue_msg_get_group(const struct nfnl_queue_msg *);
00038
00039 extern void nfnl_queue_msg_set_family(struct nfnl_queue_msg *, uint8_t);
00040 extern int nfnl_queue_msg_test_family(const struct nfnl_queue_msg *);
00041 extern uint8_t nfnl_queue_msg_get_family(const struct nfnl_queue_msg *);
00042
00043 extern void nfnl_queue_msg_set_packetid(struct nfnl_queue_msg *, uint32_t);
00044 extern int nfnl_queue_msg_test_packetid(const struct nfnl_queue_msg *);
00045 extern uint32_t nfnl_queue_msg_get_packetid(const struct nfnl_queue_msg *);
00046
00047 extern void nfnl_queue_msg_set_hwproto(struct nfnl_queue_msg *, uint16_t);
00048 extern int nfnl_queue_msg_test_hwproto(const struct nfnl_queue_msg *);
00049 extern uint16_t nfnl_queue_msg_get_hwproto(const struct nfnl_queue_msg *);
00050
00051 extern void nfnl_queue_msg_set_hook(struct nfnl_queue_msg *, uint8_t);
00052 extern int nfnl_queue_msg_test_hook(const struct nfnl_queue_msg *);
00053 extern uint8_t nfnl_queue_msg_get_hook(const struct nfnl_queue_msg *);
00054
00055 extern void nfnl_queue_msg_set_mark(struct nfnl_queue_msg *, uint32_t);
00056 extern int nfnl_queue_msg_test_mark(const struct nfnl_queue_msg *);
00057 extern uint32_t nfnl_queue_msg_get_mark(const struct nfnl_queue_msg *);
00058
00059 extern void nfnl_queue_msg_set_timestamp(struct nfnl_queue_msg *,
00060 struct timeval *);
00061 extern int nfnl_queue_msg_test_timestamp(const struct nfnl_queue_msg *);
00062 extern const struct timeval * nfnl_queue_msg_get_timestamp(const struct nfnl_queue_msg *);
00063
00064 extern void nfnl_queue_msg_set_indev(struct nfnl_queue_msg *, uint32_t);
00065 extern int nfnl_queue_msg_test_indev(const struct nfnl_queue_msg *);
00066 extern uint32_t nfnl_queue_msg_get_indev(const struct nfnl_queue_msg *);
00067
00068 extern void nfnl_queue_msg_set_outdev(struct nfnl_queue_msg *, uint32_t);
00069 extern int nfnl_queue_msg_test_outdev(const struct nfnl_queue_msg *);
00070 extern uint32_t nfnl_queue_msg_get_outdev(const struct nfnl_queue_msg *);
00071
00072 extern void nfnl_queue_msg_set_physindev(struct nfnl_queue_msg *, uint32_t);
00073 extern int nfnl_queue_msg_test_physindev(const struct nfnl_queue_msg *);
00074 extern uint32_t nfnl_queue_msg_get_physindev(const struct nfnl_queue_msg *);
00075
00076 extern void nfnl_queue_msg_set_physoutdev(struct nfnl_queue_msg *, uint32_t);
00077 extern int nfnl_queue_msg_test_physoutdev(const struct nfnl_queue_msg *);
00078 extern uint32_t nfnl_queue_msg_get_physoutdev(const struct nfnl_queue_msg *);
00079
00080 extern void nfnl_queue_msg_set_hwaddr(struct nfnl_queue_msg *, uint8_t *, int);
00081 extern int nfnl_queue_msg_test_hwaddr(const struct nfnl_queue_msg *);
00082 extern const uint8_t * nfnl_queue_msg_get_hwaddr(const struct nfnl_queue_msg *, int *);
00083
00084 extern int nfnl_queue_msg_set_payload(struct nfnl_queue_msg *, uint8_t *, int);
00085 extern int nfnl_queue_msg_test_payload(const struct nfnl_queue_msg *);
00086 extern const void * nfnl_queue_msg_get_payload(const struct nfnl_queue_msg *, int *);
00087
00088 extern void nfnl_queue_msg_set_verdict(struct nfnl_queue_msg *,
00089 unsigned int);
00090 extern int nfnl_queue_msg_test_verdict(const struct nfnl_queue_msg *);
00091 extern unsigned int nfnl_queue_msg_get_verdict(const struct nfnl_queue_msg *);
00092
00093 extern struct nl_msg * nfnl_queue_msg_build_verdict(const struct nfnl_queue_msg *);
00094 extern int nfnl_queue_msg_send_verdict(struct nl_sock *,
00095 const struct nfnl_queue_msg *);
00096 extern int nfnl_queue_msg_send_verdict_payload(struct nl_sock *,
00097 const struct nfnl_queue_msg *,
00098 const void *, unsigned );
00099 #ifdef __cplusplus
00100 }
00101 #endif
00102
00103 #endif
00104