Add packaging directory
[platform/upstream/libnl3.git] / include / netlink-private / types.h
1 /*
2  * netlink-private/types.h      Netlink Types (Private)
3  *
4  *      This library is free software; you can redistribute it and/or
5  *      modify it under the terms of the GNU Lesser General Public
6  *      License as published by the Free Software Foundation version 2.1
7  *      of the License.
8  *
9  * Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
10  */
11
12 #ifndef NETLINK_LOCAL_TYPES_H_
13 #define NETLINK_LOCAL_TYPES_H_
14
15 #include <netlink/list.h>
16 #include <netlink/route/link.h>
17 #include <netlink/route/qdisc.h>
18 #include <netlink/route/rtnl.h>
19 #include <netlink/route/route.h>
20 #include <netlink-private/route/tc-api.h>
21
22 #define NL_SOCK_BUFSIZE_SET     (1<<0)
23 #define NL_SOCK_PASSCRED        (1<<1)
24 #define NL_OWN_PORT             (1<<2)
25 #define NL_MSG_PEEK             (1<<3)
26 #define NL_NO_AUTO_ACK          (1<<4)
27
28 #define NL_MSG_CRED_PRESENT 1
29
30 struct nl_cache_ops;
31 struct nl_sock;
32 struct nl_object;
33 struct nl_hash_table;
34
35 struct nl_cb
36 {
37         nl_recvmsg_msg_cb_t     cb_set[NL_CB_TYPE_MAX+1];
38         void *                  cb_args[NL_CB_TYPE_MAX+1];
39         
40         nl_recvmsg_err_cb_t     cb_err;
41         void *                  cb_err_arg;
42
43         /** May be used to replace nl_recvmsgs with your own implementation
44          * in all internal calls to nl_recvmsgs. */
45         int                     (*cb_recvmsgs_ow)(struct nl_sock *,
46                                                   struct nl_cb *);
47
48         /** Overwrite internal calls to nl_recv, must return the number of
49          * octets read and allocate a buffer for the received data. */
50         int                     (*cb_recv_ow)(struct nl_sock *,
51                                               struct sockaddr_nl *,
52                                               unsigned char **,
53                                               struct ucred **);
54
55         /** Overwrites internal calls to nl_send, must send the netlink
56          * message. */
57         int                     (*cb_send_ow)(struct nl_sock *,
58                                               struct nl_msg *);
59
60         int                     cb_refcnt;
61 };
62
63 struct nl_sock
64 {
65         struct sockaddr_nl      s_local;
66         struct sockaddr_nl      s_peer;
67         int                     s_fd;
68         int                     s_proto;
69         unsigned int            s_seq_next;
70         unsigned int            s_seq_expect;
71         int                     s_flags;
72         struct nl_cb *          s_cb;
73         size_t                  s_bufsize;
74 };
75
76 struct nl_cache
77 {
78         struct nl_list_head     c_items;
79         int                     c_nitems;
80         int                     c_iarg1;
81         int                     c_iarg2;
82         int                     c_refcnt;
83         unsigned int            c_flags;
84         struct nl_hash_table *  hashtable;
85         struct nl_cache_ops *   c_ops;
86 };
87
88 struct nl_cache_assoc
89 {
90         struct nl_cache *       ca_cache;
91         change_func_t           ca_change;
92         void *                  ca_change_data;
93 };
94
95 struct nl_cache_mngr
96 {
97         int                     cm_protocol;
98         int                     cm_flags;
99         int                     cm_nassocs;
100         struct nl_sock *        cm_sock;
101         struct nl_sock *        cm_sync_sock;
102         struct nl_cache_assoc * cm_assocs;
103 };
104
105 struct nl_parser_param;
106
107 #define LOOSE_COMPARISON        1
108
109 #define NL_OBJ_MARK             1
110
111 struct nl_data
112 {
113         size_t                  d_size;
114         void *                  d_data;
115 };
116
117 struct nl_addr
118 {
119         int                     a_family;
120         unsigned int            a_maxsize;
121         unsigned int            a_len;
122         int                     a_prefixlen;
123         int                     a_refcnt;
124         char                    a_addr[0];
125 };
126
127 struct nl_msg
128 {
129         int                     nm_protocol;
130         int                     nm_flags;
131         struct sockaddr_nl      nm_src;
132         struct sockaddr_nl      nm_dst;
133         struct ucred            nm_creds;
134         struct nlmsghdr *       nm_nlh;
135         size_t                  nm_size;
136         int                     nm_refcnt;
137 };
138
139 struct rtnl_link_map
140 {
141         uint64_t lm_mem_start;
142         uint64_t lm_mem_end;
143         uint64_t lm_base_addr;
144         uint16_t lm_irq;
145         uint8_t  lm_dma;
146         uint8_t  lm_port;
147 };
148
149 #define IFQDISCSIZ      32
150
151 struct rtnl_link
152 {
153         NLHDR_COMMON
154
155         char                            l_name[IFNAMSIZ];
156         uint32_t                        l_family;
157         uint32_t                        l_arptype;
158         uint32_t                        l_index;
159         uint32_t                        l_flags;
160         uint32_t                        l_change;
161         uint32_t                        l_mtu;
162         uint32_t                        l_link;
163         uint32_t                        l_txqlen;
164         uint32_t                        l_weight;
165         uint32_t                        l_master;
166         struct nl_addr *                l_addr; 
167         struct nl_addr *                l_bcast;
168         char                            l_qdisc[IFQDISCSIZ];
169         struct rtnl_link_map            l_map;
170         uint64_t                        l_stats[RTNL_LINK_STATS_MAX+1];
171         uint32_t                        l_flag_mask;
172         uint32_t                        l_num_vf;
173         uint8_t                         l_operstate;
174         uint8_t                         l_linkmode;
175         /* 2 byte hole */
176         char *                          l_info_kind;
177         struct rtnl_link_info_ops *     l_info_ops;
178         void *                          l_af_data[AF_MAX];
179         void *                          l_info;
180         char *                          l_ifalias;
181         uint32_t                        l_promiscuity;
182         uint32_t                        l_num_tx_queues;
183         uint32_t                        l_num_rx_queues;
184         uint32_t                        l_group;
185         uint8_t                         l_carrier;
186         /* 3 byte hole */
187         struct rtnl_link_af_ops *       l_af_ops;
188 };
189
190 struct rtnl_ncacheinfo
191 {
192         uint32_t nci_confirmed; /**< Time since neighbour validty was last confirmed */
193         uint32_t nci_used;      /**< Time since neighbour entry was last ued */
194         uint32_t nci_updated;   /**< Time since last update */
195         uint32_t nci_refcnt;    /**< Reference counter */
196 };
197
198
199 struct rtnl_neigh
200 {
201         NLHDR_COMMON
202         uint32_t        n_family;
203         uint32_t        n_ifindex;
204         uint16_t        n_state;
205         uint8_t         n_flags;
206         uint8_t         n_type; 
207         struct nl_addr *n_lladdr;
208         struct nl_addr *n_dst;  
209         uint32_t        n_probes;
210         struct rtnl_ncacheinfo n_cacheinfo;
211         uint32_t                n_state_mask;
212         uint32_t                n_flag_mask;
213         uint32_t                n_master;
214 };
215
216
217 struct rtnl_addr_cacheinfo
218 {
219         /* Preferred lifetime in seconds */
220         uint32_t aci_prefered;
221
222         /* Valid lifetime in seconds */
223         uint32_t aci_valid;
224
225         /* Timestamp of creation in 1/100s seince boottime */
226         uint32_t aci_cstamp;
227
228         /* Timestamp of last update in 1/100s since boottime */
229         uint32_t aci_tstamp;
230 };
231
232 struct rtnl_addr
233 {
234         NLHDR_COMMON
235
236         uint8_t         a_family;
237         uint8_t         a_prefixlen;
238         uint8_t         a_flags;
239         uint8_t         a_scope;
240         uint32_t        a_ifindex;
241
242         struct nl_addr *a_peer; 
243         struct nl_addr *a_local;
244         struct nl_addr *a_bcast;
245         struct nl_addr *a_anycast;
246         struct nl_addr *a_multicast;
247
248         struct rtnl_addr_cacheinfo a_cacheinfo;
249         
250         char a_label[IFNAMSIZ];
251         uint32_t a_flag_mask;
252         struct rtnl_link *a_link;
253 };
254
255 struct rtnl_nexthop
256 {
257         uint8_t                 rtnh_flags;
258         uint8_t                 rtnh_flag_mask;
259         uint8_t                 rtnh_weight;
260         /* 1 byte spare */
261         uint32_t                rtnh_ifindex;
262         struct nl_addr *        rtnh_gateway;
263         uint32_t                ce_mask; /* HACK to support attr macros */
264         struct nl_list_head     rtnh_list;
265         uint32_t                rtnh_realms;
266 };
267
268 struct rtnl_route
269 {
270         NLHDR_COMMON
271
272         uint8_t                 rt_family;
273         uint8_t                 rt_dst_len;
274         uint8_t                 rt_src_len;
275         uint8_t                 rt_tos;
276         uint8_t                 rt_protocol;
277         uint8_t                 rt_scope;
278         uint8_t                 rt_type;
279         uint8_t                 rt_nmetrics;
280         uint32_t                rt_flags;
281         struct nl_addr *        rt_dst;
282         struct nl_addr *        rt_src;
283         uint32_t                rt_table;
284         uint32_t                rt_iif;
285         uint32_t                rt_prio;
286         uint32_t                rt_metrics[RTAX_MAX];
287         uint32_t                rt_metrics_mask;
288         uint32_t                rt_nr_nh;
289         struct nl_addr *        rt_pref_src;
290         struct nl_list_head     rt_nexthops;
291         struct rtnl_rtcacheinfo rt_cacheinfo;
292         uint32_t                rt_flag_mask;
293 };
294
295 struct rtnl_rule
296 {
297         NLHDR_COMMON
298         uint8_t         r_family;
299         uint8_t         r_action;
300         uint8_t         r_dsfield; /* ipv4 only */
301         uint8_t         r_unused;
302         uint32_t        r_table;
303         uint32_t        r_flags;
304         uint32_t        r_prio;
305         uint32_t        r_mark;
306         uint32_t        r_mask;
307         uint32_t        r_goto;
308         uint32_t        r_flow; /* ipv4 only */
309         struct nl_addr *r_src;
310         struct nl_addr *r_dst;
311         char            r_iifname[IFNAMSIZ];
312         char            r_oifname[IFNAMSIZ];
313 };
314
315 struct rtnl_neightbl_parms
316 {
317         /**
318          * Interface index of the device this parameter set is assigned
319          * to or 0 for the default set.
320          */
321         uint32_t                ntp_ifindex;
322
323         /**
324          * Number of references to this parameter set.
325          */
326         uint32_t                ntp_refcnt;
327
328         /**
329          * Queue length for pending arp requests, i.e. the number of
330          * packets which are accepted from other layers while the
331          * neighbour address is still being resolved
332          */
333         uint32_t                ntp_queue_len;
334
335         /**
336          * Number of requests to send to the user level ARP daemon.
337          * Specify 0 to disable.
338          */
339         uint32_t                ntp_app_probes;
340
341         /**
342          * Maximum number of retries for unicast solicitation.
343          */
344         uint32_t                ntp_ucast_probes;
345
346         /**
347          * Maximum number of retries for multicast solicitation.
348          */
349         uint32_t                ntp_mcast_probes;
350
351         /**
352          * Base value in milliseconds to ompute reachable time, see RFC2461.
353          */
354         uint64_t                ntp_base_reachable_time;
355
356         /**
357          * Actual reachable time (read-only)
358          */
359         uint64_t                ntp_reachable_time;     /* secs */
360
361         /**
362          * The time in milliseconds between retransmitted Neighbor
363          * Solicitation messages.
364          */
365         uint64_t                ntp_retrans_time;
366
367         /**
368          * Interval in milliseconds to check for stale neighbour
369          * entries.
370          */
371         uint64_t                ntp_gc_stale_time;      /* secs */
372
373         /**
374          * Delay in milliseconds for the first time probe if
375          * the neighbour is reachable.
376          */
377         uint64_t                ntp_probe_delay;        /* secs */
378
379         /**
380          * Maximum delay in milliseconds of an answer to a neighbour
381          * solicitation message.
382          */
383         uint64_t                ntp_anycast_delay;
384
385         /**
386          * Minimum age in milliseconds before a neighbour entry
387          * may be replaced.
388          */
389         uint64_t                ntp_locktime;
390
391         /**
392          * Delay in milliseconds before answering to an ARP request
393          * for which a proxy ARP entry exists.
394          */
395         uint64_t                ntp_proxy_delay;
396
397         /**
398          * Queue length for the delayed proxy arp requests.
399          */
400         uint32_t                ntp_proxy_qlen;
401         
402         /**
403          * Mask of available parameter attributes
404          */
405         uint32_t                ntp_mask;
406 };
407
408 #define NTBLNAMSIZ      32
409
410 /**
411  * Neighbour table
412  * @ingroup neightbl
413  */
414 struct rtnl_neightbl
415 {
416         NLHDR_COMMON
417
418         char                    nt_name[NTBLNAMSIZ];
419         uint32_t                nt_family;
420         uint32_t                nt_gc_thresh1;
421         uint32_t                nt_gc_thresh2;
422         uint32_t                nt_gc_thresh3;
423         uint64_t                nt_gc_interval;
424         struct ndt_config       nt_config;
425         struct rtnl_neightbl_parms nt_parms;
426         struct ndt_stats        nt_stats;
427 };
428
429 struct rtnl_ratespec
430 {
431         uint8_t                 rs_cell_log;
432         uint16_t                rs_overhead;
433         int16_t                 rs_cell_align;
434         uint16_t                rs_mpu;
435         uint32_t                rs_rate;
436 };
437
438 struct rtnl_tstats
439 {
440         struct {
441                 uint64_t            bytes;
442                 uint64_t            packets;
443         } tcs_basic;
444
445         struct {
446                 uint32_t            bps;
447                 uint32_t            pps;
448         } tcs_rate_est;
449
450         struct {
451                 uint32_t            qlen;
452                 uint32_t            backlog;
453                 uint32_t            drops;
454                 uint32_t            requeues;
455                 uint32_t            overlimits;
456         } tcs_queue;
457 };
458
459 #define TCKINDSIZ       32
460
461 #define NL_TC_GENERIC(pre)                              \
462         NLHDR_COMMON                                    \
463         uint32_t                pre ##_family;          \
464         uint32_t                pre ##_ifindex;         \
465         uint32_t                pre ##_handle;          \
466         uint32_t                pre ##_parent;          \
467         uint32_t                pre ##_info;            \
468         uint32_t                pre ##_mtu;             \
469         uint32_t                pre ##_mpu;             \
470         uint32_t                pre ##_overhead;        \
471         uint32_t                pre ##_linktype;        \
472         char                    pre ##_kind[TCKINDSIZ]; \
473         struct nl_data *        pre ##_opts;            \
474         uint64_t                pre ##_stats[RTNL_TC_STATS_MAX+1]; \
475         struct nl_data *        pre ##_xstats;          \
476         struct nl_data *        pre ##_subdata;         \
477         struct rtnl_link *      pre ##_link;            \
478         struct rtnl_tc_ops *    pre ##_ops;             \
479         enum rtnl_tc_type       pre ##_type
480
481 struct rtnl_tc
482 {
483         NL_TC_GENERIC(tc);
484 };
485
486 struct rtnl_qdisc
487 {
488         NL_TC_GENERIC(q);
489 };
490
491 struct rtnl_class
492 {
493         NL_TC_GENERIC(c);
494 };
495
496 struct rtnl_cls
497 {
498         NL_TC_GENERIC(c);
499         uint16_t                c_prio;
500         uint16_t                c_protocol;
501 };
502
503 struct rtnl_u32
504 {
505         uint32_t                cu_divisor;
506         uint32_t                cu_hash;
507         uint32_t                cu_classid;
508         uint32_t                cu_link;
509         struct nl_data *        cu_pcnt;
510         struct nl_data *        cu_selector;
511         struct nl_data *        cu_act;
512         struct nl_data *        cu_police;
513         char                    cu_indev[IFNAMSIZ];
514         int                     cu_mask;
515 };
516
517 struct rtnl_cgroup
518 {
519         struct rtnl_ematch_tree *cg_ematch;
520         int                     cg_mask;
521 };
522
523 struct rtnl_fw
524 {
525         uint32_t                cf_classid;
526         struct nl_data *        cf_act;
527         struct nl_data *        cf_police;
528         char                    cf_indev[IFNAMSIZ];
529         uint32_t                cf_fwmask;
530         int                     cf_mask;
531 };
532
533 struct rtnl_ematch
534 {
535         uint16_t                e_id;
536         uint16_t                e_kind;
537         uint16_t                e_flags;
538         uint16_t                e_index;
539         size_t                  e_datalen;
540
541         struct nl_list_head     e_childs;
542         struct nl_list_head     e_list;
543         struct rtnl_ematch_ops *e_ops;
544
545         void *                  e_data;
546 };
547
548 struct rtnl_ematch_tree
549 {
550         uint16_t                et_progid;
551         struct nl_list_head     et_list;
552
553 };
554
555 struct rtnl_dsmark_qdisc
556 {
557         uint16_t        qdm_indices;
558         uint16_t        qdm_default_index;
559         uint32_t        qdm_set_tc_index;
560         uint32_t        qdm_mask;
561 };
562
563 struct rtnl_dsmark_class
564 {
565         uint8_t         cdm_bmask;
566         uint8_t         cdm_value;
567         uint32_t        cdm_mask;
568 };
569
570 struct rtnl_fifo
571 {
572         uint32_t        qf_limit;
573         uint32_t        qf_mask;
574 };
575
576 struct rtnl_prio
577 {
578         uint32_t        qp_bands;
579         uint8_t         qp_priomap[TC_PRIO_MAX+1];
580         uint32_t        qp_mask;
581 };
582
583 struct rtnl_tbf
584 {
585         uint32_t                qt_limit;
586         struct rtnl_ratespec    qt_rate;
587         uint32_t                qt_rate_bucket;
588         uint32_t                qt_rate_txtime;
589         struct rtnl_ratespec    qt_peakrate;
590         uint32_t                qt_peakrate_bucket;
591         uint32_t                qt_peakrate_txtime;
592         uint32_t                qt_mask;
593 };
594
595 struct rtnl_sfq
596 {
597         uint32_t        qs_quantum;
598         uint32_t        qs_perturb;
599         uint32_t        qs_limit;
600         uint32_t        qs_divisor;
601         uint32_t        qs_flows;
602         uint32_t        qs_mask;
603 };
604
605 struct rtnl_netem_corr
606 {
607         uint32_t        nmc_delay;
608         uint32_t        nmc_loss;
609         uint32_t        nmc_duplicate;
610 };
611
612 struct rtnl_netem_reo
613 {
614         uint32_t        nmro_probability;
615         uint32_t        nmro_correlation;
616 };
617
618 struct rtnl_netem_crpt
619 {
620         uint32_t        nmcr_probability;
621         uint32_t        nmcr_correlation;
622 };
623
624 struct rtnl_netem_dist
625 {
626         int16_t *       dist_data;
627         size_t          dist_size;
628 };
629
630 struct rtnl_netem
631 {
632         uint32_t                qnm_latency;
633         uint32_t                qnm_limit;
634         uint32_t                qnm_loss;
635         uint32_t                qnm_gap;
636         uint32_t                qnm_duplicate;
637         uint32_t                qnm_jitter;
638         uint32_t                qnm_mask;
639         struct rtnl_netem_corr  qnm_corr;
640         struct rtnl_netem_reo   qnm_ro;
641         struct rtnl_netem_crpt  qnm_crpt;
642         struct rtnl_netem_dist  qnm_dist;
643 };
644
645 struct rtnl_htb_qdisc
646 {
647         uint32_t                qh_rate2quantum;
648         uint32_t                qh_defcls;
649         uint32_t                qh_mask;
650         uint32_t                qh_direct_pkts;
651 };
652
653 struct rtnl_htb_class
654 {
655         uint32_t                ch_prio;
656         struct rtnl_ratespec    ch_rate;
657         struct rtnl_ratespec    ch_ceil;
658         uint32_t                ch_rbuffer;
659         uint32_t                ch_cbuffer;
660         uint32_t                ch_quantum;
661         uint32_t                ch_mask;
662         uint32_t                ch_level;
663 };
664
665 struct rtnl_cbq
666 {
667         struct tc_cbq_lssopt    cbq_lss;
668         struct tc_ratespec      cbq_rate;
669         struct tc_cbq_wrropt    cbq_wrr;
670         struct tc_cbq_ovl       cbq_ovl;
671         struct tc_cbq_fopt      cbq_fopt;
672         struct tc_cbq_police    cbq_police;
673 };
674
675 struct rtnl_red
676 {
677         uint32_t        qr_limit;
678         uint32_t        qr_qth_min;
679         uint32_t        qr_qth_max;
680         uint8_t         qr_flags;
681         uint8_t         qr_wlog;
682         uint8_t         qr_plog;
683         uint8_t         qr_scell_log;
684         uint32_t        qr_mask;
685 };
686
687 struct rtnl_plug
688 {
689         int             action;
690         uint32_t        limit;
691 };
692
693 struct flnl_request
694 {
695         NLHDR_COMMON
696
697         struct nl_addr *        lr_addr;
698         uint32_t                lr_fwmark;
699         uint8_t                 lr_tos;
700         uint8_t                 lr_scope;
701         uint8_t                 lr_table;
702 };
703
704
705 struct flnl_result
706 {
707         NLHDR_COMMON
708
709         struct flnl_request *   fr_req;
710         uint8_t                 fr_table_id;
711         uint8_t                 fr_prefixlen;
712         uint8_t                 fr_nh_sel;
713         uint8_t                 fr_type;
714         uint8_t                 fr_scope;
715         uint32_t                fr_error;
716 };
717
718 #define GENL_OP_HAS_POLICY      1
719 #define GENL_OP_HAS_DOIT        2
720 #define GENL_OP_HAS_DUMPIT      4
721
722 struct genl_family_op
723 {
724         uint32_t                o_id;
725         uint32_t                o_flags;
726
727         struct nl_list_head     o_list;
728 };
729
730 struct genl_family_grp {
731         struct genl_family      *family;        /* private */
732         struct nl_list_head     list;           /* private */
733         char                    name[GENL_NAMSIZ];
734         u_int32_t               id;
735 };
736
737 struct genl_family
738 {
739         NLHDR_COMMON
740
741         uint16_t                gf_id;
742         char                    gf_name[GENL_NAMSIZ];
743         uint32_t                gf_version;
744         uint32_t                gf_hdrsize;
745         uint32_t                gf_maxattr;
746
747         struct nl_list_head     gf_ops;
748         struct nl_list_head     gf_mc_grps;
749 };
750
751 union nfnl_ct_proto
752 {
753         struct {
754                 uint16_t        src;
755                 uint16_t        dst;
756         } port;
757         struct {
758                 uint16_t        id;
759                 uint8_t         type;
760                 uint8_t         code;
761         } icmp;
762 };
763
764 struct nfnl_ct_dir {
765         struct nl_addr *        src;
766         struct nl_addr *        dst;
767         union nfnl_ct_proto     proto;
768         uint64_t                packets;
769         uint64_t                bytes;
770 };
771
772 union nfnl_ct_protoinfo {
773         struct {
774                 uint8_t         state;
775         } tcp;
776 };
777
778 struct nfnl_ct {
779         NLHDR_COMMON
780
781         uint8_t                 ct_family;
782         uint8_t                 ct_proto;
783         union nfnl_ct_protoinfo ct_protoinfo;
784
785         uint32_t                ct_status;
786         uint32_t                ct_status_mask;
787         uint32_t                ct_timeout;
788         uint32_t                ct_mark;
789         uint32_t                ct_use;
790         uint32_t                ct_id;
791
792         struct nfnl_ct_dir      ct_orig;
793         struct nfnl_ct_dir      ct_repl;
794 };
795
796 union nfnl_exp_protodata {
797         struct {
798                 uint16_t        src;
799                 uint16_t        dst;
800         } port;
801         struct {
802                 uint16_t        id;
803                 uint8_t         type;
804                 uint8_t         code;
805         } icmp;
806 };
807
808 // Allow for different master/expect l4 protocols
809 struct nfnl_exp_proto
810 {
811         uint8_t                                         l4protonum;
812         union nfnl_exp_protodata        l4protodata;
813 };
814
815 struct nfnl_exp_dir {
816         struct nl_addr *                src;
817         struct nl_addr *                dst;
818         struct nfnl_exp_proto   proto;
819 };
820
821 struct nfnl_exp {
822         NLHDR_COMMON
823
824         uint8_t                 exp_family;
825         uint32_t                exp_timeout;
826         uint32_t                exp_id;
827         uint16_t                exp_zone;
828         uint32_t                exp_class;
829         uint32_t                exp_flags;
830         char *                  exp_helper_name;
831         char *                  exp_fn;
832         uint8_t                 exp_nat_dir;
833
834         struct nfnl_exp_dir             exp_expect;
835         struct nfnl_exp_dir             exp_master;
836         struct nfnl_exp_dir             exp_mask;
837         struct nfnl_exp_dir             exp_nat;
838 };
839
840 struct nfnl_log {
841         NLHDR_COMMON
842
843         uint16_t                log_group;
844         uint8_t                 log_copy_mode;
845         uint32_t                log_copy_range;
846         uint32_t                log_flush_timeout;
847         uint32_t                log_alloc_size;
848         uint32_t                log_queue_threshold;
849         uint32_t                log_flags;
850         uint32_t                log_flag_mask;
851 };
852
853 struct nfnl_log_msg {
854         NLHDR_COMMON
855
856         uint8_t                 log_msg_family;
857         uint8_t                 log_msg_hook;
858         uint16_t                log_msg_hwproto;
859         uint32_t                log_msg_mark;
860         struct timeval          log_msg_timestamp;
861         uint32_t                log_msg_indev;
862         uint32_t                log_msg_outdev;
863         uint32_t                log_msg_physindev;
864         uint32_t                log_msg_physoutdev;
865         uint8_t                 log_msg_hwaddr[8];
866         int                     log_msg_hwaddr_len;
867         void *                  log_msg_payload;
868         int                     log_msg_payload_len;
869         char *                  log_msg_prefix;
870         uint32_t                log_msg_uid;
871         uint32_t                log_msg_gid;
872         uint32_t                log_msg_seq;
873         uint32_t                log_msg_seq_global;
874 };
875
876 struct nfnl_queue {
877         NLHDR_COMMON
878
879         uint16_t                queue_group;
880         uint32_t                queue_maxlen;
881         uint32_t                queue_copy_range;
882         uint8_t                 queue_copy_mode;
883 };
884
885 struct nfnl_queue_msg {
886         NLHDR_COMMON
887
888         uint16_t                queue_msg_group;
889         uint8_t                 queue_msg_family;
890         uint8_t                 queue_msg_hook;
891         uint16_t                queue_msg_hwproto;
892         uint32_t                queue_msg_packetid;
893         uint32_t                queue_msg_mark;
894         struct timeval          queue_msg_timestamp;
895         uint32_t                queue_msg_indev;
896         uint32_t                queue_msg_outdev;
897         uint32_t                queue_msg_physindev;
898         uint32_t                queue_msg_physoutdev;
899         uint8_t                 queue_msg_hwaddr[8];
900         int                     queue_msg_hwaddr_len;
901         void *                  queue_msg_payload;
902         int                     queue_msg_payload_len;
903         uint32_t                queue_msg_verdict;
904 };
905
906 struct ematch_quoted {
907         char *  data;
908         size_t  len;
909         int     index;
910 };
911
912 #endif