Home
last modified time | relevance | path

Searched refs:ptun (Results 1 – 24 of 24) sorted by relevance

/dports/net-mgmt/pmacct/pmacct-1.7.5/src/
H A Dacct.c37 struct pkt_tunnel_primitives *ptun = prim_ptrs->ptun; in search_accounting_structure() local
55 if (ptun) hash ^= cache_crc32((unsigned char *)ptun, pt_size); in search_accounting_structure()
83 struct pkt_tunnel_primitives *ptun = prim_ptrs->ptun; in compare_accounting_structure() local
110 if (ptun && elem->ptun) res_tun = memcmp(elem->ptun, ptun, sizeof(struct pkt_tunnel_primitives)); in compare_accounting_structure()
130 struct pkt_tunnel_primitives *ptun = prim_ptrs->ptun; in insert_accounting_structure() local
180 if (ptun) hash ^= cache_crc32((unsigned char *)ptun, pt_size); in insert_accounting_structure()
294 if (ptun) { in insert_accounting_structure()
302 memcpy(elem_acc->ptun, ptun, pt_size); in insert_accounting_structure()
305 if (elem_acc->ptun) free(elem_acc->ptun); in insert_accounting_structure()
433 if (ptun) { in insert_accounting_structure()
[all …]
H A Dplugin_common.c148 struct pkt_tunnel_primitives *ptun = prim_ptrs->ptun; in P_cache_modulo() local
171 struct pkt_tunnel_primitives *ptun = prim_ptrs->ptun; in P_cache_search() local
202 if (ptun) { in P_cache_search()
203 …if (cache_ptr->ptun) res_tun = memcmp(cache_ptr->ptun, ptun, sizeof(struct pkt_tunnel_primitives)); in P_cache_search()
236 struct pkt_tunnel_primitives *ptun = prim_ptrs->ptun; in P_cache_insert() local
327 if (ptun) { in P_cache_insert()
328 …if (cache_ptr->ptun) res_tun = memcmp(cache_ptr->ptun, ptun, sizeof(struct pkt_tunnel_primitives)); in P_cache_insert()
397 if (cache_ptr->ptun) memcpy(cache_ptr->ptun, ptun, sizeof(struct pkt_tunnel_primitives)); in P_cache_insert()
401 if (cache_ptr->ptun) free(cache_ptr->ptun); in P_cache_insert()
612 if (cache_ptr->ptun) free(cache_ptr->ptun); in P_cache_insert_pending()
[all …]
H A Dprint_plugin.c354 struct pkt_tunnel_primitives *ptun = NULL; in P_cache_purge() local
580 if (queue[j]->ptun) ptun = queue[j]->ptun; in P_cache_purge()
581 else ptun = &empty_ptun; in P_cache_purge()
756 etheraddr_string(ptun->tunnel_eth_shost, src_mac); in P_cache_purge()
763 etheraddr_string(ptun->tunnel_eth_dhost, dst_mac); in P_cache_purge()
771 addr_to_str(ip_address, &ptun->tunnel_src_ip); in P_cache_purge()
778 addr_to_str(ip_address, &ptun->tunnel_dst_ip); in P_cache_purge()
788 fprintf(f, "%-10d ", ptun->tunnel_proto); in P_cache_purge()
1132 etheraddr_string(ptun->tunnel_eth_shost, src_mac); in P_cache_purge()
1141 addr_to_str(src_host, &ptun->tunnel_src_ip); in P_cache_purge()
[all …]
H A Dimt_plugin.c68 struct pkt_tunnel_primitives *ptun, empty_ptun; in imt_plugin() local
452ptun = (struct pkt_tunnel_primitives *) ((u_char *)data + extras.off_pkt_tun_primitives); in imt_plugin()
453 else ptun = &empty_ptun; in imt_plugin()
474 prim_ptrs.ptun = ptun; in imt_plugin()
577 if (acc_elem->ptun) { in free_extra_allocs()
578 free(acc_elem->ptun); in free_extra_allocs()
579 acc_elem->ptun = NULL; in free_extra_allocs()
H A Dmongodb_plugin.c294 struct pkt_tunnel_primitives *ptun = NULL; in MongoDB_cache_purge() local
467 if (queue[j]->ptun) ptun = queue[j]->ptun; in MongoDB_cache_purge()
468 else ptun = &empty_ptun; in MongoDB_cache_purge()
755 etheraddr_string(ptun->tunnel_eth_shost, src_mac); in MongoDB_cache_purge()
759 etheraddr_string(ptun->tunnel_eth_dhost, dst_mac); in MongoDB_cache_purge()
763 addr_to_str(src_host, &ptun->tunnel_src_ip); in MongoDB_cache_purge()
767 addr_to_str(dst_host, &ptun->tunnel_dst_ip); in MongoDB_cache_purge()
773 …bson_append_string(bson_elem, "tunnel_ip_proto", ip_proto_print(ptun->tunnel_proto, proto, PROTO_N… in MongoDB_cache_purge()
776 ….what_to_count_2 & COUNT_TUNNEL_IP_TOS) bson_append_int(bson_elem, "tunnel_tos", ptun->tunnel_tos); in MongoDB_cache_purge()
777 …nt_2 & COUNT_TUNNEL_SRC_PORT) bson_append_int(bson_elem, "tunnel_port_src", ptun->tunnel_src_port); in MongoDB_cache_purge()
[all …]
H A Dpmacct.c651 struct pkt_tunnel_primitives *ptun = NULL; in main() local
1951 request.ptun.tunnel_proto = proto; in main()
1955 request.ptun.tunnel_tos = (u_int8_t) tmpnum; in main()
1965 request.ptun.tunnel_id = tmpnum; in main()
2161 else ptun = &empty_ptun; in main()
2692 addr_to_str(ip_address, &ptun->tunnel_src_ip); in main()
2705 addr_to_str(ip_address, &ptun->tunnel_dst_ip); in main()
3597 etheraddr_string(ptun->tunnel_eth_shost, src_mac); in pmc_compose_json()
3602 etheraddr_string(ptun->tunnel_eth_dhost, dst_mac); in pmc_compose_json()
3607 addr_to_str(src_host, &ptun->tunnel_src_ip); in pmc_compose_json()
[all …]
H A Dimt_plugin.h48 struct pkt_tunnel_primitives *ptun; member
88 struct pkt_tunnel_primitives ptun; /* extended tunnel data */ member
H A Dserver.c194 if (extras->off_pkt_tun_primitives && acc_elem->ptun) { in process_query_data()
195 enQueue_elem(sd, &rb, acc_elem->ptun, PtunSz, datasize - extras->off_pkt_tun_primitives); in process_query_data()
260 prim_ptrs.ptun = &request.ptun; in process_query_data()
290 if (extras->off_pkt_tun_primitives && acc_elem->ptun) { in process_query_data()
291 … enQueue_elem(sd, &rb, acc_elem->ptun, PtunSz, datasize - extras->off_pkt_tun_primitives); in process_query_data()
383 !memcmp(&ubuf, &request.ptun, sizeof(struct pkt_tunnel_primitives))) { in process_query_data()
407 if (extras->off_pkt_tun_primitives && acc_elem->ptun) { in process_query_data()
408 … enQueue_elem(sd, &rb, acc_elem->ptun, PtunSz, datasize - extras->off_pkt_tun_primitives); in process_query_data()
499 struct pkt_tunnel_primitives *s6 = src->ptun; in mask_elem()
H A Dsql_handlers.c352 memcpy(ubuf, cache_elem->ptun->tunnel_eth_shost, ETH_ADDR_LEN); in count_tunnel_src_mac_handler()
366 memcpy(ubuf, cache_elem->ptun->tunnel_eth_dhost, ETH_ADDR_LEN); in count_tunnel_dst_mac_handler()
378 addr_to_str(ptr, &cache_elem->ptun->tunnel_src_ip); in count_tunnel_src_ip_handler()
389 addr_to_str(ptr, &cache_elem->ptun->tunnel_dst_ip); in count_tunnel_dst_ip_handler()
409 snprintf(*ptr_where, SPACELEFT(where_clause), where[num].string, cache_elem->ptun->tunnel_proto); in PG_count_tunnel_ip_proto_handler()
417 snprintf(*ptr_where, SPACELEFT(where_clause), where[num].string, cache_elem->ptun->tunnel_tos); in count_tunnel_ip_tos_handler()
418 snprintf(*ptr_values, SPACELEFT(values_clause), values[num].string, cache_elem->ptun->tunnel_tos); in count_tunnel_ip_tos_handler()
441 snprintf(*ptr_where, SPACELEFT(where_clause), where[num].string, cache_elem->ptun->tunnel_id); in count_vxlan_handler()
442 snprintf(*ptr_values, SPACELEFT(values_clause), values[num].string, cache_elem->ptun->tunnel_id); in count_vxlan_handler()
1172 addr_to_str(ptr, &cache_elem->ptun->tunnel_src_ip); in count_tunnel_src_ip_aton_handler()
[all …]
H A Dpkt_handlers.c1289 ptun->tunnel_tos = tos; in tunnel_ip_tos_handler()
1299 ptun->tunnel_src_port = 0; in tunnel_src_port_handler()
1329 ptun->tunnel_id <<= 8; in vxlan_handler()
1331 ptun->tunnel_id <<= 8; in vxlan_handler()
3558 ptun->tunnel_id = *vni_ptr++; in NF_vxlan_handler()
3559 ptun->tunnel_id <<= 8; in NF_vxlan_handler()
3560 ptun->tunnel_id += *vni_ptr++; in NF_vxlan_handler()
3561 ptun->tunnel_id <<= 8; in NF_vxlan_handler()
3562 ptun->tunnel_id += *vni_ptr++; in NF_vxlan_handler()
5241 ptun->tunnel_src_port = 0; in SF_tunnel_src_port_handler()
[all …]
H A Dplugin_cmn_json.c990 etheraddr_string(cc->ptun->tunnel_eth_shost, mac); in compose_json_tunnel_src_mac()
998 etheraddr_string(cc->ptun->tunnel_eth_dhost, mac); in compose_json_tunnel_dst_mac()
1006 addr_to_str(ip_address, &cc->ptun->tunnel_src_ip); in compose_json_tunnel_src_host()
1014 addr_to_str(ip_address, &cc->ptun->tunnel_dst_ip); in compose_json_tunnel_dst_host()
1022 …json_object_set_new_nocheck(obj, "tunnel_ip_proto", json_string(ip_proto_print(cc->ptun->tunnel_pr… in compose_json_tunnel_proto()
1027 json_object_set_new_nocheck(obj, "tunnel_tos", json_integer((json_int_t)cc->ptun->tunnel_tos)); in compose_json_tunnel_tos()
1032 …json_object_set_new_nocheck(obj, "tunnel_port_src", json_integer((json_int_t)cc->ptun->tunnel_src_… in compose_json_tunnel_src_port()
1037 …json_object_set_new_nocheck(obj, "tunnel_port_dst", json_integer((json_int_t)cc->ptun->tunnel_dst_… in compose_json_tunnel_dst_port()
1042 json_object_set_new_nocheck(obj, "vxlan", json_integer((json_int_t)cc->ptun->tunnel_id)); in compose_json_vxlan()
H A Dkafka_plugin.c329 struct pkt_tunnel_primitives *ptun = NULL; in kafka_cache_purge() local
349 (void)ptun; in kafka_cache_purge()
565 if (queue[j]->ptun) ptun = queue[j]->ptun; in kafka_cache_purge()
566 else ptun = &empty_ptun; in kafka_cache_purge()
600 queue[j]->flow_type, &queue[j]->primitives, pbgp, pnat, pmpls, ptun, pcust, in kafka_cache_purge()
H A Damqp_plugin.c359 struct pkt_tunnel_primitives *ptun = NULL; in amqp_cache_purge() local
381 (void)ptun; in amqp_cache_purge()
542 if (queue[j]->ptun) ptun = queue[j]->ptun; in amqp_cache_purge()
543 else ptun = &empty_ptun; in amqp_cache_purge()
569 queue[j]->flow_type, &queue[j]->primitives, pbgp, pnat, pmpls, ptun, pcust, in amqp_cache_purge()
H A Dplugin_cmn_avro.c402 struct pkt_tunnel_primitives *ptun, u_char *pcust, struct pkt_vlen_hdr_primitives *pvlen, in compose_avro_acct_data() argument
864 etheraddr_string(ptun->tunnel_eth_shost, src_mac); in compose_avro_acct_data()
870 etheraddr_string(ptun->tunnel_eth_dhost, dst_mac); in compose_avro_acct_data()
876 addr_to_str(src_host, &ptun->tunnel_src_ip); in compose_avro_acct_data()
882 addr_to_str(dst_host, &ptun->tunnel_dst_ip); in compose_avro_acct_data()
891 …pm_avro_check(avro_value_set_string(&field, ip_proto_print(ptun->tunnel_proto, proto, PROTO_NUM_ST… in compose_avro_acct_data()
896 pm_avro_check(avro_value_set_long(&field, ptun->tunnel_tos)); in compose_avro_acct_data()
901 pm_avro_check(avro_value_set_long(&field, ptun->tunnel_src_port)); in compose_avro_acct_data()
906 pm_avro_check(avro_value_set_long(&field, ptun->tunnel_dst_port)); in compose_avro_acct_data()
911 pm_avro_check(avro_value_set_long(&field, ptun->tunnel_id)); in compose_avro_acct_data()
H A Dplugin_cmn_avro.h58 struct pkt_tunnel_primitives *ptun, u_char *pcust,
H A Dsql_common.c325 struct pkt_tunnel_primitives *ptun = prim_ptrs->ptun; in sql_cache_modulo() local
333 if (ptun) idata->hash ^= cache_crc32((unsigned char *)ptun, pt_size); in sql_cache_modulo()
431 if (SavedCursor.ptun) free(SavedCursor.ptun); in sql_cache_flush_pending()
519 struct pkt_tunnel_primitives *ptun = prim_ptrs->ptun; in sql_cache_search() local
561 if (ptun && Cursor->ptun) { in sql_cache_search()
595 struct pkt_tunnel_primitives *ptun = prim_ptrs->ptun; in sql_cache_insert() local
745 if (ptun && Cursor->ptun) { in sql_cache_insert()
820 if (ptun) { in sql_cache_insert()
825 memcpy(Cursor->ptun, ptun, pt_size); in sql_cache_insert()
828 if (Cursor->ptun) free(Cursor->ptun); in sql_cache_insert()
[all …]
H A Dplugin_common.h70 struct pkt_tunnel_primitives *ptun; member
H A Dsql_common_m.c72 if (Cursor->ptun) free(Cursor->ptun); in RetireElem()
H A Dsql_common.h127 struct pkt_tunnel_primitives *ptun; member
H A Dnetwork.h530 struct pkt_tunnel_primitives *ptun; member
H A Dutil.c2120 prim_ptrs->ptun = (struct pkt_tunnel_primitives *) (base + extras->off_pkt_tun_primitives); in primptrs_set_tun()
/dports/net-mgmt/pmacct/pmacct-1.7.5/examples/custom/
H A Dlibcustom.h45 struct pkt_tunnel_primitives *ptun, char *pcust,
H A Dlibcustom.c54 struct pkt_tunnel_primitives *ptun, char *pcust, in print() argument
/dports/net-mgmt/coovachilli/coova-chilli-1.0.12/src/
H A Dtun.c617 int tun_new(struct tun_t **ptun) { in tun_new() argument
620 if (!(tun = *ptun = calloc(1, sizeof(struct tun_t)))) { in tun_new()