libnl: /data/src/libnl3/include/netlink/netfilter/log_msg.h Source File

libnl 3.10.0

log_msg.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch>
4 * Copyright (c) 2007 Philip Craig <philipc@snapgear.com>
5 * Copyright (c) 2007 Secure Computing Corporation
6 * Copyright (c) 2008 Patrick McHardy <kaber@trash.net>
7 */
8
9#ifndef NETLINK_LOG_MSG_H_
10#define NETLINK_LOG_MSG_H_
11
12#include <netlink/netlink.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18struct nlmsghdr;
19struct nfnl_log_msg;
20struct nfnl_ct;
21
22extern struct nl_object_ops log_msg_obj_ops;
23
24/* General */
25extern struct nfnl_log_msg *nfnl_log_msg_alloc(void);
26extern int nfnlmsg_log_msg_parse(struct nlmsghdr *,
27 struct nfnl_log_msg **);
28
29extern void nfnl_log_msg_get(struct nfnl_log_msg *);
30extern void nfnl_log_msg_put(struct nfnl_log_msg *);
31
32extern void nfnl_log_msg_set_family(struct nfnl_log_msg *, uint8_t);
33extern uint8_t nfnl_log_msg_get_family(const struct nfnl_log_msg *);
34
35extern void nfnl_log_msg_set_hwproto(struct nfnl_log_msg *, uint16_t);
36extern int nfnl_log_msg_test_hwproto(const struct nfnl_log_msg *);
37extern uint16_t nfnl_log_msg_get_hwproto(const struct nfnl_log_msg *);
38
39extern void nfnl_log_msg_set_hook(struct nfnl_log_msg *, uint8_t);
40extern int nfnl_log_msg_test_hook(const struct nfnl_log_msg *);
41extern uint8_t nfnl_log_msg_get_hook(const struct nfnl_log_msg *);
42
43extern void nfnl_log_msg_set_mark(struct nfnl_log_msg *, uint32_t);
44extern int nfnl_log_msg_test_mark(const struct nfnl_log_msg *);
45extern uint32_t nfnl_log_msg_get_mark(const struct nfnl_log_msg *);
46
47extern void nfnl_log_msg_set_timestamp(struct nfnl_log_msg *,
48 struct timeval *);
49extern const struct timeval *nfnl_log_msg_get_timestamp(const struct nfnl_log_msg *);
50
51extern void nfnl_log_msg_set_indev(struct nfnl_log_msg *, uint32_t);
52extern uint32_t nfnl_log_msg_get_indev(const struct nfnl_log_msg *);
53
54extern void nfnl_log_msg_set_outdev(struct nfnl_log_msg *, uint32_t);
55extern uint32_t nfnl_log_msg_get_outdev(const struct nfnl_log_msg *);
56
57extern void nfnl_log_msg_set_physindev(struct nfnl_log_msg *, uint32_t);
58extern uint32_t nfnl_log_msg_get_physindev(const struct nfnl_log_msg *);
59
60extern void nfnl_log_msg_set_physoutdev(struct nfnl_log_msg *, uint32_t);
61extern uint32_t nfnl_log_msg_get_physoutdev(const struct nfnl_log_msg *);
62
63extern void nfnl_log_msg_set_hwaddr(struct nfnl_log_msg *, uint8_t *, int);
64extern const uint8_t * nfnl_log_msg_get_hwaddr(const struct nfnl_log_msg *, int *);
65
66extern int nfnl_log_msg_set_payload(struct nfnl_log_msg *, uint8_t *, int);
67extern const void * nfnl_log_msg_get_payload(const struct nfnl_log_msg *, int *);
68
69extern int nfnl_log_msg_set_prefix(struct nfnl_log_msg *, void *);
70extern const char * nfnl_log_msg_get_prefix(const struct nfnl_log_msg *);
71
72extern void nfnl_log_msg_set_uid(struct nfnl_log_msg *, uint32_t);
73extern int nfnl_log_msg_test_uid(const struct nfnl_log_msg *);
74extern uint32_t nfnl_log_msg_get_uid(const struct nfnl_log_msg *);
75
76extern void nfnl_log_msg_set_gid(struct nfnl_log_msg *, uint32_t);
77extern int nfnl_log_msg_test_gid(const struct nfnl_log_msg *);
78extern uint32_t nfnl_log_msg_get_gid(const struct nfnl_log_msg *);
79
80extern void nfnl_log_msg_set_seq(struct nfnl_log_msg *, uint32_t);
81extern int nfnl_log_msg_test_seq(const struct nfnl_log_msg *);
82extern uint32_t nfnl_log_msg_get_seq(const struct nfnl_log_msg *);
83
84extern void nfnl_log_msg_set_seq_global(struct nfnl_log_msg *, uint32_t);
85extern int nfnl_log_msg_test_seq_global(const struct nfnl_log_msg *);
86extern uint32_t nfnl_log_msg_get_seq_global(const struct nfnl_log_msg *);
87
88extern void nfnl_log_msg_set_hwtype(struct nfnl_log_msg *, uint16_t);
89extern int nfnl_log_msg_test_hwtype(const struct nfnl_log_msg *);
90extern uint16_t nfnl_log_msg_get_hwtype(const struct nfnl_log_msg *);
91
92extern void nfnl_log_msg_set_hwlen(struct nfnl_log_msg *, uint16_t);
93extern int nfnl_log_msg_test_hwlen(const struct nfnl_log_msg *);
94extern uint16_t nfnl_log_msg_get_hwlen(const struct nfnl_log_msg *);
95
96extern int nfnl_log_msg_set_hwheader(struct nfnl_log_msg *, void *, int);
97extern int nfnl_log_msg_test_hwheader(const struct nfnl_log_msg *);
98extern const void * nfnl_log_msg_get_hwheader(const struct nfnl_log_msg *, int *);
99
100extern void nfnl_log_msg_set_vlan_proto(struct nfnl_log_msg *, uint16_t);
101extern int nfnl_log_msg_test_vlan_proto(const struct nfnl_log_msg *);
102extern uint16_t nfnl_log_msg_get_vlan_proto(const struct nfnl_log_msg *);
103extern void nfnl_log_msg_set_vlan_tag(struct nfnl_log_msg *, uint16_t);
104extern int nfnl_log_msg_test_vlan_tag(const struct nfnl_log_msg *);
105extern uint16_t nfnl_log_msg_get_vlan_tag(const struct nfnl_log_msg *);
106extern uint16_t nfnl_log_msg_get_vlan_id(const struct nfnl_log_msg *);
107extern uint16_t nfnl_log_msg_get_vlan_cfi(const struct nfnl_log_msg *);
108extern uint16_t nfnl_log_msg_get_vlan_prio(const struct nfnl_log_msg *);
109
110extern void nfnl_log_msg_set_ct_info(struct nfnl_log_msg *, uint32_t);
111extern int nfnl_log_msg_test_ct_info(const struct nfnl_log_msg *);
112extern uint32_t nfnl_log_msg_get_ct_info(const struct nfnl_log_msg *);
113
114extern void nfnl_log_msg_set_ct(struct nfnl_log_msg *, struct nfnl_ct *);
115extern int nfnl_log_msg_test_ct(const struct nfnl_log_msg *);
116extern struct nfnl_ct * nfnl_log_msg_get_ct(const struct nfnl_log_msg *);
117
118#ifdef __cplusplus
119}
120#endif
121
122#endif
123
nfnl_ct
Definition nl-netfilter.h:40
nfnl_log_msg
Definition nl-netfilter.h:104