Lines Matching refs:pflowif
255 struct pflow_softc *pflowif; in pflow_create() local
258 pflowif = malloc(sizeof(*pflowif), M_DEVBUF, M_WAITOK|M_ZERO); in pflow_create()
259 mtx_init(&pflowif->sc_lock, "pflowlk", NULL, MTX_DEF); in pflow_create()
260 pflowif->sc_version = PFLOW_PROTO_DEFAULT; in pflow_create()
261 pflowif->sc_observation_dom = PFLOW_ENGINE_TYPE; in pflow_create()
264 bzero(&pflowif->sc_tmpl_ipfix,sizeof(pflowif->sc_tmpl_ipfix)); in pflow_create()
265 pflowif->sc_tmpl_ipfix.set_header.set_id = in pflow_create()
267 pflowif->sc_tmpl_ipfix.set_header.set_length = in pflow_create()
271 pflowif->sc_tmpl_ipfix.ipv4_tmpl.h.tmpl_id = in pflow_create()
273 pflowif->sc_tmpl_ipfix.ipv4_tmpl.h.field_count in pflow_create()
275 pflowif->sc_tmpl_ipfix.ipv4_tmpl.src_ip.field_id = in pflow_create()
277 pflowif->sc_tmpl_ipfix.ipv4_tmpl.src_ip.len = htons(4); in pflow_create()
278 pflowif->sc_tmpl_ipfix.ipv4_tmpl.dest_ip.field_id = in pflow_create()
280 pflowif->sc_tmpl_ipfix.ipv4_tmpl.dest_ip.len = htons(4); in pflow_create()
281 pflowif->sc_tmpl_ipfix.ipv4_tmpl.if_index_in.field_id = in pflow_create()
283 pflowif->sc_tmpl_ipfix.ipv4_tmpl.if_index_in.len = htons(4); in pflow_create()
284 pflowif->sc_tmpl_ipfix.ipv4_tmpl.if_index_out.field_id = in pflow_create()
286 pflowif->sc_tmpl_ipfix.ipv4_tmpl.if_index_out.len = htons(4); in pflow_create()
287 pflowif->sc_tmpl_ipfix.ipv4_tmpl.packets.field_id = in pflow_create()
289 pflowif->sc_tmpl_ipfix.ipv4_tmpl.packets.len = htons(8); in pflow_create()
290 pflowif->sc_tmpl_ipfix.ipv4_tmpl.octets.field_id = in pflow_create()
292 pflowif->sc_tmpl_ipfix.ipv4_tmpl.octets.len = htons(8); in pflow_create()
293 pflowif->sc_tmpl_ipfix.ipv4_tmpl.start.field_id = in pflow_create()
295 pflowif->sc_tmpl_ipfix.ipv4_tmpl.start.len = htons(8); in pflow_create()
296 pflowif->sc_tmpl_ipfix.ipv4_tmpl.finish.field_id = in pflow_create()
298 pflowif->sc_tmpl_ipfix.ipv4_tmpl.finish.len = htons(8); in pflow_create()
299 pflowif->sc_tmpl_ipfix.ipv4_tmpl.src_port.field_id = in pflow_create()
301 pflowif->sc_tmpl_ipfix.ipv4_tmpl.src_port.len = htons(2); in pflow_create()
302 pflowif->sc_tmpl_ipfix.ipv4_tmpl.dest_port.field_id = in pflow_create()
304 pflowif->sc_tmpl_ipfix.ipv4_tmpl.dest_port.len = htons(2); in pflow_create()
305 pflowif->sc_tmpl_ipfix.ipv4_tmpl.tos.field_id = in pflow_create()
307 pflowif->sc_tmpl_ipfix.ipv4_tmpl.tos.len = htons(1); in pflow_create()
308 pflowif->sc_tmpl_ipfix.ipv4_tmpl.protocol.field_id = in pflow_create()
310 pflowif->sc_tmpl_ipfix.ipv4_tmpl.protocol.len = htons(1); in pflow_create()
313 pflowif->sc_tmpl_ipfix.ipv6_tmpl.h.tmpl_id = in pflow_create()
315 pflowif->sc_tmpl_ipfix.ipv6_tmpl.h.field_count = in pflow_create()
317 pflowif->sc_tmpl_ipfix.ipv6_tmpl.src_ip.field_id = in pflow_create()
319 pflowif->sc_tmpl_ipfix.ipv6_tmpl.src_ip.len = htons(16); in pflow_create()
320 pflowif->sc_tmpl_ipfix.ipv6_tmpl.dest_ip.field_id = in pflow_create()
322 pflowif->sc_tmpl_ipfix.ipv6_tmpl.dest_ip.len = htons(16); in pflow_create()
323 pflowif->sc_tmpl_ipfix.ipv6_tmpl.if_index_in.field_id = in pflow_create()
325 pflowif->sc_tmpl_ipfix.ipv6_tmpl.if_index_in.len = htons(4); in pflow_create()
326 pflowif->sc_tmpl_ipfix.ipv6_tmpl.if_index_out.field_id = in pflow_create()
328 pflowif->sc_tmpl_ipfix.ipv6_tmpl.if_index_out.len = htons(4); in pflow_create()
329 pflowif->sc_tmpl_ipfix.ipv6_tmpl.packets.field_id = in pflow_create()
331 pflowif->sc_tmpl_ipfix.ipv6_tmpl.packets.len = htons(8); in pflow_create()
332 pflowif->sc_tmpl_ipfix.ipv6_tmpl.octets.field_id = in pflow_create()
334 pflowif->sc_tmpl_ipfix.ipv6_tmpl.octets.len = htons(8); in pflow_create()
335 pflowif->sc_tmpl_ipfix.ipv6_tmpl.start.field_id = in pflow_create()
337 pflowif->sc_tmpl_ipfix.ipv6_tmpl.start.len = htons(8); in pflow_create()
338 pflowif->sc_tmpl_ipfix.ipv6_tmpl.finish.field_id = in pflow_create()
340 pflowif->sc_tmpl_ipfix.ipv6_tmpl.finish.len = htons(8); in pflow_create()
341 pflowif->sc_tmpl_ipfix.ipv6_tmpl.src_port.field_id = in pflow_create()
343 pflowif->sc_tmpl_ipfix.ipv6_tmpl.src_port.len = htons(2); in pflow_create()
344 pflowif->sc_tmpl_ipfix.ipv6_tmpl.dest_port.field_id = in pflow_create()
346 pflowif->sc_tmpl_ipfix.ipv6_tmpl.dest_port.len = htons(2); in pflow_create()
347 pflowif->sc_tmpl_ipfix.ipv6_tmpl.tos.field_id = in pflow_create()
349 pflowif->sc_tmpl_ipfix.ipv6_tmpl.tos.len = htons(1); in pflow_create()
350 pflowif->sc_tmpl_ipfix.ipv6_tmpl.protocol.field_id = in pflow_create()
352 pflowif->sc_tmpl_ipfix.ipv6_tmpl.protocol.len = htons(1); in pflow_create()
355 pflowif->sc_tmpl_ipfix.nat44_tmpl.h.tmpl_id = in pflow_create()
357 pflowif->sc_tmpl_ipfix.nat44_tmpl.h.field_count = in pflow_create()
359 pflowif->sc_tmpl_ipfix.nat44_tmpl.timestamp.field_id = in pflow_create()
361 pflowif->sc_tmpl_ipfix.nat44_tmpl.timestamp.len = in pflow_create()
363 pflowif->sc_tmpl_ipfix.nat44_tmpl.nat_event.field_id = in pflow_create()
365 pflowif->sc_tmpl_ipfix.nat44_tmpl.nat_event.len = in pflow_create()
367 pflowif->sc_tmpl_ipfix.nat44_tmpl.protocol.field_id = in pflow_create()
369 pflowif->sc_tmpl_ipfix.nat44_tmpl.protocol.len = htons(1); in pflow_create()
370 pflowif->sc_tmpl_ipfix.nat44_tmpl.src_ip.field_id = in pflow_create()
372 pflowif->sc_tmpl_ipfix.nat44_tmpl.src_ip.len = in pflow_create()
374 pflowif->sc_tmpl_ipfix.nat44_tmpl.src_port.field_id = in pflow_create()
376 pflowif->sc_tmpl_ipfix.nat44_tmpl.src_port.len = htons(2); in pflow_create()
377 pflowif->sc_tmpl_ipfix.nat44_tmpl.postnat_src_ip.field_id = in pflow_create()
379 pflowif->sc_tmpl_ipfix.nat44_tmpl.postnat_src_ip.len = in pflow_create()
381 pflowif->sc_tmpl_ipfix.nat44_tmpl.postnat_src_port.field_id = in pflow_create()
383 pflowif->sc_tmpl_ipfix.nat44_tmpl.postnat_src_port.len = in pflow_create()
385 pflowif->sc_tmpl_ipfix.nat44_tmpl.dst_ip.field_id = in pflow_create()
387 pflowif->sc_tmpl_ipfix.nat44_tmpl.dst_ip.len = in pflow_create()
389 pflowif->sc_tmpl_ipfix.nat44_tmpl.dst_port.field_id = in pflow_create()
391 pflowif->sc_tmpl_ipfix.nat44_tmpl.dst_port.len = htons(2); in pflow_create()
392 pflowif->sc_tmpl_ipfix.nat44_tmpl.postnat_dst_ip.field_id = in pflow_create()
394 pflowif->sc_tmpl_ipfix.nat44_tmpl.postnat_dst_ip.len = in pflow_create()
396 pflowif->sc_tmpl_ipfix.nat44_tmpl.postnat_dst_port.field_id = in pflow_create()
398 pflowif->sc_tmpl_ipfix.nat44_tmpl.postnat_dst_port.len = in pflow_create()
401 pflowif->sc_id = unit; in pflow_create()
402 pflowif->sc_vnet = curvnet; in pflow_create()
404 mbufq_init(&pflowif->sc_outputqueue, 8192); in pflow_create()
405 pflow_setmtu(pflowif, ETHERMTU); in pflow_create()
407 callout_init_mtx(&pflowif->sc_tmo, &pflowif->sc_lock, 0); in pflow_create()
408 callout_init_mtx(&pflowif->sc_tmo6, &pflowif->sc_lock, 0); in pflow_create()
409 callout_init_mtx(&pflowif->sc_tmo_nat4, &pflowif->sc_lock, 0); in pflow_create()
410 callout_init_mtx(&pflowif->sc_tmo_tmpl, &pflowif->sc_lock, 0); in pflow_create()
412 error = swi_add(&pflowif->sc_swi_ie, pflowname, pflow_output_process, in pflow_create()
413 pflowif, SWI_NET, INTR_MPSAFE, &pflowif->sc_swi_cookie); in pflow_create()
415 free(pflowif, M_DEVBUF); in pflow_create()
421 CK_LIST_INSERT_HEAD(&V_pflowif_list, pflowif, sc_next); in pflow_create()