Lines Matching refs:pkt
470 static void bpf_dump_pkt(uint8_t *pkt, uint32_t pkt_caplen, uint32_t pkt_len) in bpf_dump_pkt() argument
477 hex_dump(pkt, pkt_caplen); in bpf_dump_pkt()
603 static uint32_t extract_u32(uint8_t *pkt, uint32_t off) in extract_u32() argument
607 memcpy(&r, &pkt[off], sizeof(r)); in extract_u32()
612 static uint16_t extract_u16(uint8_t *pkt, uint32_t off) in extract_u16() argument
616 memcpy(&r, &pkt[off], sizeof(r)); in extract_u16()
621 static uint8_t extract_u8(uint8_t *pkt, uint32_t off) in extract_u8() argument
623 return pkt[off]; in extract_u8()
633 uint8_t *pkt, uint32_t pkt_caplen, in bpf_single_step() argument
667 r->A = extract_u32(pkt, K); in bpf_single_step()
674 r->A = extract_u16(pkt, K); in bpf_single_step()
681 r->A = extract_u8(pkt, K); in bpf_single_step()
688 r->A = extract_u32(pkt, r->X + K); in bpf_single_step()
693 r->A = extract_u16(pkt, r->X + K); in bpf_single_step()
700 r->A = extract_u8(pkt, r->X + K); in bpf_single_step()
707 r->X = extract_u8(pkt, K); in bpf_single_step()
855 uint8_t *pkt, uint32_t pkt_caplen, in bpf_handle_breakpoint() argument
861 bpf_dump_pkt(pkt, pkt_caplen, pkt_len); in bpf_handle_breakpoint()
866 static int bpf_run_all(struct sock_filter *f, uint16_t bpf_len, uint8_t *pkt, in bpf_run_all() argument
875 stop = bpf_handle_breakpoint(&bpf_curr, f, pkt, in bpf_run_all()
878 bpf_single_step(&bpf_curr, &f[bpf_curr.Pc], pkt, pkt_caplen, in bpf_run_all()
887 uint8_t *pkt, uint32_t pkt_caplen, in bpf_run_stepping() argument
897 stop = bpf_handle_breakpoint(&bpf_curr, f, pkt, in bpf_run_stepping()
900 bpf_single_step(&bpf_curr, &f[bpf_curr.Pc], pkt, pkt_caplen, in bpf_run_stepping()