void capture_ax25_kiss( const guchar *pd, int offset, int len, packet_counts *ld) { int l_offset; guint8 kiss_cmd; if ( ! BYTES_ARE_IN_FRAME( offset, len, KISS_HEADER_SIZE ) ) { ld->other++; return; } l_offset = offset; kiss_cmd = pd[ l_offset ]; l_offset += KISS_HEADER_SIZE; /* step over kiss header */ switch ( kiss_cmd & KISS_CMD_MASK ) { case KISS_DATA_FRAME : capture_ax25( pd, l_offset, len, ld ); break; case KISS_TXDELAY : l_offset += 1; break; case KISS_PERSISTENCE : l_offset += 1; break; case KISS_SLOT_TIME : l_offset += 1; break; case KISS_TXTAIL : l_offset += 1; break; case KISS_FULLDUPLEX : l_offset += 1; break; case KISS_SETHARDWARE : l_offset += 1; break; case KISS_RETURN : break; default : break; } }
void capture_bpq( const guchar *pd, int offset, int len, packet_counts *ld) { int l_offset; if ( ! BYTES_ARE_IN_FRAME( offset, len, BPQ_HEADER_SIZE ) ) { ld->other++; return; } l_offset = offset; l_offset += BPQ_HEADER_SIZE; /* step over bpq header to point at the AX.25 packet*/ capture_ax25( pd, l_offset, len, ld ); }
static void capture_info_packet(packet_counts *counts, gint wtap_linktype, const guchar *pd, guint32 caplen, union wtap_pseudo_header *pseudo_header) { counts->total++; switch (wtap_linktype) { case WTAP_ENCAP_ETHERNET: capture_eth(pd, 0, caplen, counts); break; case WTAP_ENCAP_FDDI: case WTAP_ENCAP_FDDI_BITSWAPPED: capture_fddi(pd, caplen, counts); break; case WTAP_ENCAP_IEEE_802_11_PRISM: capture_prism(pd, 0, caplen, counts); break; case WTAP_ENCAP_TOKEN_RING: capture_tr(pd, 0, caplen, counts); break; case WTAP_ENCAP_NULL: capture_null(pd, caplen, counts); break; case WTAP_ENCAP_PPP: capture_ppp_hdlc(pd, 0, caplen, counts); break; case WTAP_ENCAP_RAW_IP: capture_raw(pd, caplen, counts); break; case WTAP_ENCAP_SLL: capture_sll(pd, caplen, counts); break; case WTAP_ENCAP_LINUX_ATM_CLIP: capture_clip(pd, caplen, counts); break; case WTAP_ENCAP_IEEE_802_11: case WTAP_ENCAP_IEEE_802_11_WITH_RADIO: capture_ieee80211(pd, 0, caplen, counts); break; case WTAP_ENCAP_IEEE_802_11_RADIOTAP: capture_radiotap(pd, 0, caplen, counts); break; case WTAP_ENCAP_IEEE_802_11_AVS: capture_wlancap(pd, 0, caplen, counts); break; case WTAP_ENCAP_CHDLC: capture_chdlc(pd, 0, caplen, counts); break; case WTAP_ENCAP_LOCALTALK: capture_llap(counts); break; case WTAP_ENCAP_ATM_PDUS: capture_atm(pseudo_header, pd, caplen, counts); break; case WTAP_ENCAP_IP_OVER_FC: capture_ipfc(pd, caplen, counts); break; case WTAP_ENCAP_ARCNET: capture_arcnet(pd, caplen, counts, FALSE, TRUE); break; case WTAP_ENCAP_ARCNET_LINUX: capture_arcnet(pd, caplen, counts, TRUE, FALSE); break; case WTAP_ENCAP_APPLE_IP_OVER_IEEE1394: capture_ap1394(pd, 0, caplen, counts); break; case WTAP_ENCAP_FRELAY: case WTAP_ENCAP_FRELAY_WITH_PHDR: capture_fr(pd, 0, caplen, counts); break; case WTAP_ENCAP_ENC: capture_enc(pd, caplen, counts); break; case WTAP_ENCAP_PPI: capture_ppi(pd, caplen, counts); break; case WTAP_ENCAP_I2C: capture_i2c(pseudo_header, counts); break; case WTAP_ENCAP_AX25_KISS: capture_ax25_kiss(pd, 0, caplen, counts); break; case WTAP_ENCAP_AX25: capture_ax25(pd, 0, caplen, counts); break; /* XXX - some ATM drivers on FreeBSD might prepend a 4-byte ATM pseudo-header to DLT_ATM_RFC1483, with LLC header following; we might have to implement that at some point. */ } }