Lines Matching refs:packet

76 common_classify(ipgpc_packet_t *packet, ht_match_t *fid_table,  in common_classify()  argument
83 ipgpc_findfilters(IPGPC_TABLE_DIR, packet->direction, fid_table); in common_classify()
91 ipgpc_findfilters(IPGPC_TABLE_IF, packet->if_index, fid_table); in common_classify()
99 ipgpc_findfilters(IPGPC_BA_DSID, packet->dsfield, fid_table); in common_classify()
107 ipgpc_findfilters(IPGPC_TABLE_UID, packet->uid, fid_table); in common_classify()
115 ipgpc_findfilters(IPGPC_TABLE_PROJID, packet->projid, fid_table); in common_classify()
122 if (packet->proto > 0) { in common_classify()
124 packet->proto, fid_table); in common_classify()
136 if (packet->sport > 0) { in common_classify()
138 packet->sport, fid_table); in common_classify()
150 if (packet->dport > 0) { in common_classify()
152 packet->dport, fid_table); in common_classify()
225 ipgpc_classify(int af, ipgpc_packet_t *packet) in ipgpc_classify() argument
237 update_stats(ipgpc_def_class_id, packet->len); in ipgpc_classify()
250 rc = common_classify(packet, fid_table, &slctrs_srchd); in ipgpc_classify()
255 update_stats(ipgpc_def_class_id, packet->len); in ipgpc_classify()
266 V4_PART_OF_V6(packet->saddr), fid_table); in ipgpc_classify()
273 update_stats(ipgpc_def_class_id, packet->len); in ipgpc_classify()
282 V4_PART_OF_V6(packet->daddr), fid_table); in ipgpc_classify()
289 update_stats(ipgpc_def_class_id, packet->len); in ipgpc_classify()
300 packet->saddr, fid_table); in ipgpc_classify()
307 update_stats(ipgpc_def_class_id, packet->len); in ipgpc_classify()
316 packet->daddr, fid_table); in ipgpc_classify()
323 update_stats(ipgpc_def_class_id, packet->len); in ipgpc_classify()
344 update_stats(ipgpc_def_class_id, packet->len); in ipgpc_classify()
353 update_stats(class_id, packet->len); in ipgpc_classify()
487 get_port_info(ipgpc_packet_t *packet, void *iph, int af, mblk_t *mp) in get_port_info() argument
503 packet->sport = (uint16_t)*up++; in get_port_info()
504 packet->dport = (uint16_t)*up; in get_port_info()
555 packet->proto = *nexthdrp; in get_port_info()
557 packet->sport = (uint16_t)*up++; in get_port_info()
558 packet->dport = (uint16_t)*up; in get_port_info()
565 packet->proto = *nexthdrp; in get_port_info()
588 find_ids(ipgpc_packet_t *packet, mblk_t *mp) in find_ids() argument
594 packet->uid = crgetuid(cr); in find_ids()
595 packet->projid = crgetprojid(cr); in find_ids()
597 packet->uid = (uid_t)-1; in find_ids()
598 packet->projid = -1; in find_ids()
608 parse_packet(ipgpc_packet_t *packet, mblk_t *mp) in parse_packet() argument
614 V4_PART_OF_V6(packet->saddr) = (int32_t)ipha->ipha_src; in parse_packet()
615 V4_PART_OF_V6(packet->daddr) = (int32_t)ipha->ipha_dst; in parse_packet()
616 packet->dsfield = ipha->ipha_type_of_service; in parse_packet()
617 packet->proto = ipha->ipha_protocol; in parse_packet()
618 packet->sport = 0; in parse_packet()
619 packet->dport = 0; in parse_packet()
620 find_ids(packet, mp); in parse_packet()
621 packet->len = msgdsize(mp); in parse_packet()
623 if ((packet->proto == IPPROTO_TCP) || (packet->proto == IPPROTO_UDP) || in parse_packet()
624 (packet->proto == IPPROTO_SCTP)) { in parse_packet()
625 get_port_info(packet, ipha, AF_INET, mp); in parse_packet()
635 parse_packet6(ipgpc_packet_t *packet, mblk_t *mp) in parse_packet6() argument
640 bcopy(ip6h->ip6_src.s6_addr32, packet->saddr.s6_addr32, in parse_packet6()
642 bcopy(ip6h->ip6_dst.s6_addr32, packet->daddr.s6_addr32, in parse_packet6()
645 packet->proto = ip6h->ip6_nxt; in parse_packet6()
646 packet->dsfield = __IPV6_TCLASS_FROM_FLOW(ip6h->ip6_vcf); in parse_packet6()
647 find_ids(packet, mp); in parse_packet6()
648 packet->len = msgdsize(mp); in parse_packet6()
649 packet->sport = 0; in parse_packet6()
650 packet->dport = 0; in parse_packet6()
660 get_port_info(packet, ip6h, AF_INET6, mp); in parse_packet6()