1 /*
2     pmacct (Promiscuous mode IP Accounting package)
3     pmacct is Copyright (C) 2003-2020 by Paolo Lucente
4 */
5 
6 /*
7     This program is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by
9     the Free Software Foundation; either version 2 of the License, or
10     (at your option) any later version.
11 
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.
16 
17     You should have received a copy of the GNU General Public License
18     along with this program; if not, write to the Free Software
19     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 */
21 #ifndef NFACCTD_H
22 #define NFACCTD_H
23 
24 /*  NetFlow Export Version 5 Header Format  */
25 struct struct_header_v5 {
26   u_int16_t version;		/* Version = 5 */
27   u_int16_t count;		/* The number of records in PDU. */
28   u_int32_t SysUptime;		/* Current time in msecs since router booted */
29   u_int32_t unix_secs;		/* Current seconds since 0000 UTC 1970 */
30   u_int32_t unix_nsecs;		/* Residual nanoseconds since 0000 UTC 1970 */
31   u_int32_t flow_sequence;	/* Sequence number of total flows seen */
32   unsigned char engine_type;    /* Type of flow switching engine (RP,VIP,etc.) */
33   unsigned char engine_id;      /* Slot number of the flow switching engine */
34   u_int16_t sampling;
35 };
36 
37 /*  NetFlow Export Version 9 Header Format  */
38 struct struct_header_v9 {
39   u_int16_t version;		/* version = 9 */
40   u_int16_t count;		/* The number of records in PDU. */
41   u_int32_t SysUptime;		/* Current time in msecs since router booted */
42   u_int32_t unix_secs;		/* Current seconds since 0000 UTC 1970 */
43   u_int32_t flow_sequence;	/* Sequence number of total flows seen */
44   u_int32_t source_id;		/* Source id */
45 };
46 
47 struct struct_header_ipfix {
48   u_int16_t version;            /* version = 10 */
49   u_int16_t len;                /* Total length of the IPFIX Message */
50   u_int32_t unix_secs;          /* Current seconds since 0000 UTC 1970 */
51   u_int32_t flow_sequence;      /* Sequence number of total flows seen */
52   u_int32_t source_id;          /* Source id */
53 };
54 
55 /* NetFlow Export version 5 */
56 struct struct_export_v5 {
57   struct in_addr srcaddr;       /* Source IP Address */
58   struct in_addr dstaddr;       /* Destination IP Address */
59   struct in_addr nexthop;       /* Next hop router's IP Address */
60   u_int16_t input;   		/* Input interface index */
61   u_int16_t output;  		/* Output interface index */
62   u_int32_t dPkts;    		/* Packets sent in Duration (milliseconds between 1st & last packet in this flow) */
63   u_int32_t dOctets;  		/* Octets sent in Duration (milliseconds between 1st & last packet in this flow) */
64   u_int32_t First;    		/* SysUptime at start of flow */
65   u_int32_t Last;     		/* and of last packet of the flow */
66   u_int16_t srcport; 		/* TCP/UDP source port number (.e.g, FTP, Telnet, etc.,or equivalent) */
67   u_int16_t dstport; 		/* TCP/UDP destination port number (.e.g, FTP, Telnet, etc.,or equivalent) */
68   unsigned char pad;          	/* pad to word boundary */
69   unsigned char tcp_flags;    	/* Cumulative OR of tcp flags */
70   unsigned char prot;         	/* IP protocol, e.g., 6=TCP, 17=UDP, etc... */
71   unsigned char tos;          	/* IP Type-of-Service */
72   u_int16_t src_as;  		/* source peer/origin Autonomous System */
73   u_int16_t dst_as;  		/* dst peer/origin Autonomous System */
74   unsigned char src_mask;       /* source route's mask bits */
75   unsigned char dst_mask;       /* destination route's mask bits */
76   u_int16_t pad_1;   		/* pad to word boundary */
77 };
78 
79 /* NetFlow Export version 9 */
80 struct template_field_v9 {
81   u_int16_t type;
82   u_int16_t len;
83 };
84 
85 struct template_hdr_v9 {
86   u_int16_t template_id;
87   u_int16_t num;
88 };
89 
90 struct options_template_hdr_v9 {
91   u_int16_t template_id;
92   u_int16_t scope_len;
93   u_int16_t option_len;
94 };
95 
96 /* IPFIX: option field count and scope field count apparently inverted compared to NetFlow v9 */
97 struct options_template_hdr_ipfix {
98   u_int16_t template_id;
99   u_int16_t option_count;
100   u_int16_t scope_count;
101 };
102 
103 struct data_hdr_v9 {
104   u_int16_t flow_id; /* == 0: template; == 1: options template; >= 256: data */
105   u_int16_t flow_len;
106 };
107 
108 /* defines */
109 #define DEFAULT_NFACCTD_PORT 2100
110 #define NETFLOW_MSG_SIZE PKT_MSG_SIZE
111 #define V5_MAXFLOWS 30  /* max records in V5 packet */
112 #define TEMPLATE_CACHE_ENTRIES 1021
113 
114 #define NF_TIME_MSECS 0 /* times are in msecs */
115 #define NF_TIME_SECS 1 /* times are in secs */
116 #define NF_TIME_NEW 2 /* ignore netflow engine times and generate new ones */
117 
118 #define IPFIX_TPL_EBIT                  0x8000 /* IPFIX telmplate enterprise bit */
119 #define IPFIX_VARIABLE_LENGTH           65535
120 #define PMACCT_PEN                      43874
121 
122 /* NetFlow V9 stuff */
123 #define NF9_TEMPLATE_FLOWSET_ID         0
124 #define NF9_OPTIONS_FLOWSET_ID          1
125 #define NF9_MIN_RECORD_FLOWSET_ID       256
126 #define NF9_MAX_DEFINED_FIELD		384
127 
128 #define IES_PER_TPL_EXT_DB_ENTRY        32
129 #define TPL_EXT_DB_ENTRIES              8
130 #define TPL_LIST_ENTRIES                256
131 #define TPL_TYPE_LEGACY                 0
132 #define TPL_TYPE_EXT_DB                 1
133 
134 /* Flowset record types the we care about */
135 #define NF9_IN_BYTES			1
136 #define NF9_IN_PACKETS			2
137 #define NF9_FLOWS			3
138 #define NF9_L4_PROTOCOL			4
139 #define NF9_SRC_TOS                     5
140 #define NF9_TCP_FLAGS                   6
141 #define NF9_L4_SRC_PORT                 7
142 #define NF9_IPV4_SRC_ADDR               8
143 #define NF9_SRC_MASK                    9
144 #define NF9_INPUT_SNMP                  10
145 #define NF9_L4_DST_PORT                 11
146 #define NF9_IPV4_DST_ADDR               12
147 #define NF9_DST_MASK                    13
148 #define NF9_OUTPUT_SNMP                 14
149 #define NF9_IPV4_NEXT_HOP               15
150 #define NF9_SRC_AS                      16
151 #define NF9_DST_AS                      17
152 #define NF9_BGP_IPV4_NEXT_HOP		18
153 #define NF9_MUL_DST_PKTS                19
154 #define NF9_MUL_DST_BYTES               20
155 /* ... */
156 #define NF9_LAST_SWITCHED               21
157 #define NF9_FIRST_SWITCHED              22
158 #define NF9_OUT_BYTES			23
159 #define NF9_OUT_PACKETS			24
160 /* ... */
161 #define NF9_IPV6_SRC_ADDR               27
162 #define NF9_IPV6_DST_ADDR               28
163 #define NF9_IPV6_SRC_MASK               29
164 #define NF9_IPV6_DST_MASK               30
165 #define NF9_ICMP_TYPE                   32
166 /* ... */
167 #define NF9_ENGINE_TYPE                 38
168 #define NF9_ENGINE_ID                   39
169 /* ... */
170 #define NF9_IPV4_SRC_PREFIX		44
171 #define NF9_IPV4_DST_PREFIX		45
172 /* ... */
173 #define NF9_MPLS_TOP_LABEL_ADDR		47
174 /* ... */
175 #define NF9_IN_SRC_MAC                  56
176 #define NF9_OUT_DST_MAC                 57
177 #define NF9_IN_VLAN                     58
178 #define NF9_OUT_VLAN                    59
179 #define NF9_IP_PROTOCOL_VERSION         60
180 #define NF9_DIRECTION                   61
181 #define NF9_IPV6_NEXT_HOP		62
182 #define NF9_BGP_IPV6_NEXT_HOP		63
183 /* ... */
184 #define NF9_MPLS_LABEL_1		70
185 #define NF9_MPLS_LABEL_2		71
186 #define NF9_MPLS_LABEL_3		72
187 #define NF9_MPLS_LABEL_4		73
188 #define NF9_MPLS_LABEL_5		74
189 #define NF9_MPLS_LABEL_6		75
190 #define NF9_MPLS_LABEL_7		76
191 #define NF9_MPLS_LABEL_8		77
192 #define NF9_MPLS_LABEL_9		78
193 #define NF9_MPLS_LABEL_10		79
194 #define NF9_IN_DST_MAC			80
195 #define NF9_OUT_SRC_MAC			81
196 /* ... */
197 #define NF9_FLOW_BYTES			85
198 #define NF9_FLOW_PACKETS		86
199 
200 #define NF9_FORWARDING_STATUS           89
201 /* ... */
202 #define NF9_PEER_DST_AS			128
203 #define NF9_PEER_SRC_AS			129
204 #define NF9_EXPORTER_IPV4_ADDRESS	130
205 #define NF9_EXPORTER_IPV6_ADDRESS	131
206 /* ... */
207 #define NF9_MPLS_TOP_LABEL_IPV6_ADDR	140
208 /* ... */
209 #define NF9_FIRST_SWITCHED_SEC		150
210 #define NF9_LAST_SWITCHED_SEC		151
211 #define NF9_FIRST_SWITCHED_MSEC		152
212 #define NF9_LAST_SWITCHED_MSEC		153
213 #define NF9_FIRST_SWITCHED_USEC		154
214 #define NF9_LAST_SWITCHED_USEC		155
215 /* ... */
216 #define NF9_FIRST_SWITCHED_DELTA_MICRO	158
217 #define NF9_LAST_SWITCHED_DELTA_MICRO	159
218 #define NF9_SYS_UPTIME_MSEC		160
219 /* ... */
220 #define NF9_IPV6_DST_PREFIX		169
221 #define NF9_IPV6_SRC_PREFIX		170
222 /* ... */
223 #define NF9_UDP_SRC_PORT                180
224 #define NF9_UDP_DST_PORT                181
225 #define NF9_TCP_SRC_PORT                182
226 #define NF9_TCP_DST_PORT                183
227 /* ... */
228 #define NF9_POST_NAT_IPV4_SRC_ADDR	225
229 #define NF9_POST_NAT_IPV4_DST_ADDR	226
230 #define NF9_POST_NAT_IPV4_SRC_PORT	227
231 #define NF9_POST_NAT_IPV4_DST_PORT	228
232 /* ... */
233 #define NF9_NAT_EVENT			230
234 /* ... */
235 #define NF9_INITIATOR_OCTETS		231
236 #define NF9_RESPONDER_OCTETS		232
237 /* ... */
238 #define NF9_INGRESS_VRFID		234
239 #define NF9_EGRESS_VRFID		235
240 /* ... */
241 #define NF9_DOT1QVLANID			243
242 #define NF9_DOT1QPRIORITY		244
243 #define NF9_DOT1QCVLANID		245
244 /* ... */
245 #define NF9_PSEUDOWIREID		249
246 /* ... */
247 #define NF9_INPUT_PHYSINT		252
248 #define NF9_OUTPUT_PHYSINT		253
249 #define NF9_POST_DOT1QVLANID		254
250 #define NF9_POST_DOT1QCVLANID		255
251 #define NF9_ETHERTYPE			256
252 /* ... */
253 #define NF9_DATALINK_FRAME_SECTION	315
254 /* ... */
255 #define NF9_OBSERVATION_TIME_SEC	322
256 #define NF9_OBSERVATION_TIME_MSEC	323
257 /* ... */
258 #define NF9_LAYER2_SEGMENT_ID		351
259 #define NF9_LAYER2OCTETDELTACOUNT	352
260 /* ... */
261 #define NF9_DATALINK_FRAME_TYPE		408
262 /* ... */
263 #define NF9_ASA_XLATE_IPV4_SRC_ADDR	40001
264 #define NF9_ASA_XLATE_IPV4_DST_ADDR	40002
265 #define NF9_ASA_XLATE_L4_SRC_PORT	40003
266 #define NF9_ASA_XLATE_L4_DST_PORT	40004
267 #define NF9_ASA_XLATE_EVENT		40005
268 
269 /* Sampling */
270 #define NF9_SAMPLING_INTERVAL		34
271 #define NF9_SAMPLING_ALGORITHM		35
272 #define NF9_FLOW_SAMPLER_ID		48
273 #define NF9_FLOW_SAMPLER_MODE		49
274 #define NF9_FLOW_SAMPLER_INTERVAL	50
275 #define NF9_SELECTOR_ID			302
276 #define NF9_SELECTOR_ALGORITHM		304
277 #define NF9_SAMPLING_PKT_INTERVAL	305
278 #define NF9_SAMPLING_PKT_SPACE		306
279 
280 /* Classification */
281 #define NF9_APPLICATION_DESC		94
282 #define NF9_APPLICATION_ID		95
283 #define NF9_APPLICATION_NAME		96
284 
285 /* Options scoping: NetFlow v9 */
286 #define NF9_OPT_SCOPE_SYSTEM		1
287 #define NF9_OPT_SCOPE_IF		2
288 #define NF9_OPT_SCOPE_LC		3
289 #define NF9_OPT_SCOPE_CACHE		4
290 #define NF9_OPT_SCOPE_TPL		5
291 
292 /* Options scoping: IPFIX */
293 #define IPFIX_SCOPE_OBS_POINT_ID	138
294 #define IPFIX_SCOPE_LINECARD_ID		141
295 #define IPFIX_SCOPE_PORT_ID		142
296 #define IPFIX_SCOPE_METER_PROCESS_ID	143
297 #define IPFIX_SCOPE_EXPORT_PROCESS_ID	144
298 #define IPFIX_SCOPE_TEMPLATE_ID 	145
299 #define IPFIX_SCOPE_OBS_DOMAIN_ID	149
300 
301 /* dataLinkFrameType */
302 #define NF9_DL_F_TYPE_UNKNOWN		0
303 #define NF9_DL_F_TYPE_ETHERNET		1
304 #define NF9_DL_F_TYPE_802DOT11		2
305 
306 /* layer2SegmentId */
307 #define NF9_L2_SID_RESERVED		0x00
308 #define NF9_L2_SID_VXLAN		0x01
309 #define NF9_L2_SID_NVGRE		0x02
310 
311 /* CUSTOM TYPES START HERE: supported in IPFIX only with pmacct PEN */
312 #define NF9_CUST_TAG                    1
313 #define NF9_CUST_TAG2                   2
314 #define NF9_CUST_LABEL			3
315 /* CUSTOM TYPES END HERE */
316 
317 #define MAX_TPL_DESC_LIST 89
318 static char __attribute__((unused)) *tpl_desc_list[] = {
319   "",
320   "in bytes",
321   "in packets",
322   "flows",
323   "L4 protocol",
324   "tos",
325   "tcp flags",
326   "L4 src port",
327   "IPv4 src addr",
328   "IPv4 src mask",
329   "input snmp",
330   "L4 dst port",
331   "IPv4 dst addr",
332   "IPv4 dst mask",
333   "output snmp",
334   "IPv4 next hop",
335   "src as",
336   "dst as",
337   "BGP IPv4 next hop",
338   "", "",
339   "last switched",
340   "first switched",
341   "out bytes",
342   "out packets",
343   "", "",
344   "IPv6 src addr",
345   "IPv6 dst addr",
346   "IPv6 src mask",
347   "IPv6 dst mask",
348   "",
349   "icmp type",
350   "",
351   "sampling interval",
352   "sampling algorithm",
353   "",
354   "", "", "", "",
355   "", "", "", "",
356   "", "", "",
357   "sampler ID",
358   "sampler mode",
359   "sampler interval",
360   "", "", "", "",
361   "",
362   "in src mac",
363   "out dst mac",
364   "", "",
365   "ip version",
366   "direction",
367   "IPv6 next hop",
368   "IPv6 BGP next hop",
369   "",
370   "", "", "", "",
371   "",
372   "mpls label 1",
373   "mpls label 2",
374   "mpls label 3",
375   "mpls label 4",
376   "mpls label 5",
377   "mpls label 6",
378   "mpls label 7",
379   "mpls label 8",
380   "mpls label 9",
381   "mpls label 10",
382   "in dst mac",
383   "out src mac",
384   "", "", "", "",
385   "", "", "",
386   "forwarding status",
387 };
388 
389 #define MAX_OPT_TPL_DESC_LIST 100
390 static char __attribute__((unused)) *opt_tpl_desc_list[] = {
391   "",
392   "scope", "", "",
393   "", "", "",
394   "", "", "",
395   "", "", "",
396   "", "", "",
397   "", "", "",
398   "", "", "",
399   "", "", "",
400   "", "", "",
401   "", "", "",
402   "", "", "",
403   "", "", "",
404   "", "", "",
405   "", "", "",
406   "", "", "",
407   "", "", "sampler ID",
408   "sampler algorithm", "sampler interval", "",
409   "", "", "",
410   "", "", "",
411   "", "", "",
412   "", "", "",
413   "", "", "",
414   "", "", "",
415   "", "", "",
416   "", "", "",
417   "", "", "",
418   "", "", "",
419   "", "", "sampler name",
420   "", "", "",
421   "", "", "",
422   "", "", "",
423   "app desc", "app id", "app name",
424   "", "", "",
425   ""
426 };
427 
428 /* Ordered Template field */
429 struct otpl_field {
430   u_int16_t off;
431   u_int16_t len;
432   u_int16_t tpl_len;
433 };
434 
435 /* Unsorted Template field */
436 struct utpl_field {
437   u_int32_t pen;
438   u_int16_t type;
439   u_int16_t off;
440   u_int16_t len;
441   u_int16_t tpl_len;
442   u_int8_t repeat_id;
443 };
444 
445 /* Template field database */
446 struct tpl_field_db {
447   struct utpl_field ie[IES_PER_TPL_EXT_DB_ENTRY];
448 };
449 
450 /* Template field ordered list */
451 struct tpl_field_list {
452   u_int8_t type;
453   char *ptr;
454 };
455 
456 struct template_cache_entry {
457   struct host_addr agent;               /* NetFlow Exporter agent */
458   u_int32_t source_id;                  /* Exporter Observation Domain */
459   u_int16_t template_id;                /* template ID */
460   u_int16_t template_type;              /* Data = 0, Options = 1 */
461   u_int16_t num;                        /* number of fields described into template */
462   u_int16_t len;                        /* total length of the described flowset */
463   u_int8_t vlen;                        /* flag for variable-length fields */
464   struct otpl_field tpl[NF9_MAX_DEFINED_FIELD];
465   struct tpl_field_db ext_db[TPL_EXT_DB_ENTRIES];
466   struct tpl_field_list list[TPL_LIST_ENTRIES];
467   struct template_cache_entry *next;
468 };
469 
470 struct template_cache {
471   u_int16_t num;
472   struct template_cache_entry *c[TEMPLATE_CACHE_ENTRIES];
473 };
474 
475 struct NF_dissect {
476   u_int8_t hdrVersion;
477   u_int16_t hdrCount; /* NetFlow v5 and v5 and v5 and v5 and v5 and v9 */
478   u_char *hdrBasePtr;
479   u_char *hdrEndPtr;
480   u_int32_t hdrLen;
481   u_char *flowSetBasePtr;
482   u_char *flowSetEndPtr;
483   u_int32_t flowSetLen;
484   u_char *elemBasePtr;
485   u_char *elemEndPtr;
486   u_int32_t elemLen;
487 };
488 
489 /* functions */
490 extern void process_v5_packet(unsigned char *, u_int16_t, struct packet_ptrs *, struct plugin_requests *, u_int16_t, struct NF_dissect *);
491 extern void process_v9_packet(unsigned char *, u_int16_t, struct packet_ptrs_vector *, struct plugin_requests *, u_int16_t, struct NF_dissect *, int *);
492 extern void process_raw_packet(unsigned char *, u_int16_t, struct packet_ptrs_vector *, struct plugin_requests *);
493 extern u_int8_t NF_evaluate_flow_type(struct template_cache_entry *, struct packet_ptrs *);
494 extern u_int16_t NF_evaluate_direction(struct template_cache_entry *, struct packet_ptrs *);
495 extern pm_class_t NF_evaluate_classifiers(struct xflow_status_entry_class *, pm_class_t *, struct xflow_status_entry *);
496 extern void reset_mac(struct packet_ptrs *);
497 extern void reset_mac_vlan(struct packet_ptrs *);
498 extern void reset_ip4(struct packet_ptrs *);
499 extern void reset_ip6(struct packet_ptrs *);
500 extern void reset_dummy_v4(struct packet_ptrs *, u_char *);
501 extern void notify_malf_packet(short int, char *, char *, struct sockaddr *, u_int32_t);
502 extern int NF_find_id(struct id_table *, struct packet_ptrs *, pm_id_t *, pm_id_t *);
503 extern void NF_compute_once();
504 
505 extern struct xflow_status_entry *nfv5_check_status(struct packet_ptrs *);
506 extern struct xflow_status_entry *nfv9_check_status(struct packet_ptrs *, u_int32_t, u_int32_t, u_int32_t, u_int8_t);
507 extern void nfv9_datalink_frame_section_handler(struct packet_ptrs *);
508 
509 extern struct template_cache tpl_cache;
510 extern struct host_addr debug_a;
511 extern char debug_agent_addr[50];
512 extern u_int16_t debug_agent_port;
513 
514 extern u_int16_t modulo_template(u_int16_t, struct sockaddr *, u_int16_t);
515 extern struct template_cache_entry *handle_template(struct template_hdr_v9 *, struct packet_ptrs *, u_int16_t, u_int32_t, u_int16_t *, u_int16_t, u_int32_t);
516 extern struct template_cache_entry *find_template(u_int16_t, struct sockaddr *, u_int16_t, u_int32_t);
517 extern struct template_cache_entry *insert_template(struct template_hdr_v9 *, struct packet_ptrs *, u_int16_t, u_int32_t, u_int16_t *, u_int8_t, u_int16_t, u_int32_t);
518 extern struct template_cache_entry *refresh_template(struct template_hdr_v9 *, struct template_cache_entry *, struct packet_ptrs *, u_int16_t, u_int32_t, u_int16_t *, u_int8_t, u_int16_t, u_int32_t);
519 extern void log_template_header(struct template_cache_entry *, struct packet_ptrs *, u_int16_t, u_int32_t, u_int8_t);
520 extern void log_opt_template_field(u_int8_t, u_int32_t *, u_int16_t, u_int16_t, u_int16_t, u_int8_t);
521 extern void log_template_field(u_int8_t, u_int32_t *, u_int16_t, u_int16_t, u_int16_t, u_int8_t);
522 extern void log_template_footer(struct template_cache_entry *, u_int16_t, u_int8_t);
523 extern struct template_cache_entry *insert_opt_template(void *, struct packet_ptrs *, u_int16_t, u_int32_t, u_int16_t *, u_int8_t, u_int16_t, u_int32_t);
524 extern struct template_cache_entry *refresh_opt_template(void *, struct template_cache_entry *, struct packet_ptrs *, u_int16_t, u_int32_t, u_int16_t *, u_int8_t, u_int16_t, u_int32_t);
525 extern struct utpl_field *ext_db_get_ie(struct template_cache_entry *, u_int32_t, u_int16_t, u_int8_t);
526 extern struct utpl_field *ext_db_get_next_ie(struct template_cache_entry *, u_int16_t, u_int8_t *);
527 
528 extern int resolve_vlen_template(u_char *, u_int16_t, struct template_cache_entry *);
529 extern int get_ipfix_vlen(u_char *, u_int16_t, u_int16_t *);
530 
531 extern struct template_cache_entry *nfacctd_offline_read_json_template(char *, char *, int);
532 extern void load_templates_from_file(char *);
533 extern void save_template(struct template_cache_entry *, char *);
534 
535 #ifdef WITH_KAFKA
536 extern void NF_init_kafka_host(void *);
537 #endif
538 
539 #ifdef WITH_ZMQ
540 extern void NF_init_zmq_host(void *, int *);
541 #endif
542 
543 extern struct utpl_field *(*get_ext_db_ie_by_type)(struct template_cache_entry *, u_int32_t, u_int16_t, u_int8_t);
544 #endif //NFACCTD_H
545