if.h revision 1ca4a6ab3f30cc1d00058a1a23e62bb267016ea1
0N/A/*
2362N/A * Copyright (c) 1995 Danny Gasparovski.
0N/A *
0N/A * Please read the file COPYRIGHT for the
0N/A * terms and conditions of the copyright.
0N/A */
2362N/A
0N/A#ifndef _IF_H_
2362N/A#define _IF_H_
0N/A
0N/A#define IF_COMPRESS 0x01 /* We want compression */
0N/A#define IF_NOCOMPRESS 0x02 /* Do not do compression */
0N/A#define IF_AUTOCOMP 0x04 /* Autodetect (default) */
0N/A#define IF_NOCIDCOMP 0x08 /* CID compression */
0N/A
0N/A/* Needed for FreeBSD */
0N/A#undef if_mtu
0N/Aextern int if_mtu;
0N/Aextern int if_mru; /* MTU and MRU */
0N/Aextern int if_comp; /* Flags for compression */
2362N/Aextern int if_maxlinkhdr;
2362N/Aextern int if_queued; /* Number of packets queued so far */
2362N/Aextern int if_thresh; /* Number of packets queued before we start sending
0N/A * (to prevent allocing too many mbufs) */
0N/A
0N/Aextern struct mbuf if_fastq; /* fast queue (for interactive data) */
0N/Aextern struct mbuf if_batchq; /* queue for non-interactive data */
0N/Aextern struct mbuf *next_m;
0N/A
0N/A#define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm))
0N/A
0N/A/* Interface statistics */
0N/Astruct slirp_ifstats {
0N/A u_int out_pkts; /* Output packets */
0N/A u_int out_bytes; /* Output bytes */
0N/A u_int out_errpkts; /* Output Error Packets */
0N/A u_int out_errbytes; /* Output Error Bytes */
0N/A u_int in_pkts; /* Input packets */
0N/A u_int in_bytes; /* Input bytes */
0N/A u_int in_errpkts; /* Input Error Packets */
0N/A u_int in_errbytes; /* Input Error Bytes */
0N/A
0N/A u_int bytes_saved; /* Number of bytes that compression "saved" */
0N/A /* ie: number of bytes that didn't need to be sent over the link
0N/A * because of compression */
0N/A
0N/A u_int in_mbad; /* Bad incoming packets */
0N/A};
0N/A
0N/A#endif
0N/A