Lines Matching defs:header
20 "@(#) $Header: /tcpdump/master/libpcap/pcap-dag.c,v 1.39 2008-04-14 20:40:58 guy Exp $ (LBL)";
64 * A header containing additional MTP information.
69 #define MTP2_HDR_LEN 4 /* length of the header */
75 /* SunATM pseudo header */
234 /* get the header type */
317 dag_record_t *header = (dag_record_t *)(pd->dag_mem_bottom);
319 dag_record_t *header = (dag_record_t *)(pd->dag_mem_base + pd->dag_mem_bottom);
322 u_char *dp = ((u_char *)header); /* + dag_record_size; */
338 rlen = ntohs(header->rlen);
347 switch((header->type & 0x7f)) {
359 if (header->lctr) {
360 if (pd->stat.ps_drop > (UINT_MAX - ntohs(header->lctr))) {
363 pd->stat.ps_drop += ntohs(header->lctr);
368 if ((header->type & 0x7f) == TYPE_PAD) {
376 * and will be handled as a pseudo header by the decoding application.
377 * The information carried in the ERF header and in the optional subheader (if present)
380 * o the length of the packet on the link (header->wlen),
381 * o plus the length of the ERF header (dag_record_size), as the length of the
382 * pseudo header will be adjusted during the decoding,
385 * The capture length is header.rlen and the byte stuffing for alignment will be dropped
389 packet_len = ntohs(header->wlen) + dag_record_size;
391 switch ((header->type & 0x7f)) {
399 packet_len += 4; /* MC header */
406 packet_len += 2; /* ETH header */
417 /* Other kind of encapsulation according to the header Type */
419 /* Skip over generic ERF header */
424 switch((header->type & 0x7f)) {
427 if (header->type == TYPE_AAL5) {
428 packet_len = ntohs(header->wlen);
432 if (header->type == TYPE_MC_ATM) {
437 if (header->type == TYPE_MC_AAL5) {
438 packet_len = ntohs(header->wlen);
442 if (header->type == TYPE_ATM) {
452 sunatm->flags = ((header->flags.iface & 1) ? 0x80 : 0x00) |
470 packet_len = ntohs(header->wlen);
483 packet_len = ntohs(header->wlen);
493 packet_len = ntohs(header->wlen);
503 /* Add the MTP2 Pseudo Header */
509 *(TempPkt+MTP2_LINK_NUMBER_OFFSET) = ((header->rec.mc_hdlc.mc_header>>16)&0x01);
510 *(TempPkt+MTP2_LINK_NUMBER_OFFSET+1) = ((header->rec.mc_hdlc.mc_header>>24)&0xff);
519 packet_len = ntohs(header->wlen);
556 ts = SWAPLL(header->ts);
558 ts = header->ts;
570 /* Fill in our own header data */
1153 * doesn't put an Ethernet header onto the wire, it puts raw