Main Page Modules Data Structures File List Data Fields Globals Related Pages

# Win32-Extensions.h

Go to the documentation of this file.

    00001 /*
    00002  * Copyright (c) 1999 - 2002
    00003  *  Politecnico di Torino.  All rights reserved.
    00004  *
    00005  * Redistribution and use in source and binary forms, with or without
    00006  * modification, are permitted provided that: (1) source code distributions
    00007  * retain the above copyright notice and this paragraph in its entirety, (2)
    00008  * distributions including binary code include the above copyright notice and
    00009  * this paragraph in its entirety in the documentation or other materials
    00010  * provided with the distribution, and (3) all advertising materials mentioning
    00011  * features or use of this software display the following acknowledgement:
    00012  * ``This product includes software developed by the Politecnico
    00013  * di Torino, and its contributors.'' Neither the name of
    00014  * the University nor the names of its contributors may be used to endorse
    00015  * or promote products derived from this software without specific prior
    00016  * written permission.
    00017  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
    00018  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
    00019  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    00020  */
    00021
    00022 /* Definitions */
    00023
    00027 struct pcap_send_queue{
    00028     u_int maxlen;
    00029     u_int len;
    00030     char *buffer;
    00031 };
    00032
    00033 typedef struct pcap_send_queue pcap_send_queue;
    00034
    00035 #define     BPF_MEM_EX_IMM  0xc0
    00036 #define     BPF_MEM_EX_IND  0xe0
    00037
    00038 /*used for ST*/
    00039 #define     BPF_MEM_EX      0xc0
    00040 #define     BPF_TME                 0x08
    00041
    00042 #define     BPF_LOOKUP              0x90
    00043 #define     BPF_EXECUTE             0xa0
    00044 #define     BPF_INIT                0xb0
    00045 #define     BPF_VALIDATE            0xc0
    00046 #define     BPF_SET_ACTIVE          0xd0
    00047 #define     BPF_RESET               0xe0
    00048 #define     BPF_SET_MEMORY          0x80
    00049 #define     BPF_GET_REGISTER_VALUE  0x70
    00050 #define     BPF_SET_REGISTER_VALUE  0x60
    00051 #define     BPF_SET_WORKING         0x50
    00052 #define     BPF_SET_ACTIVE_READ     0x40
    00053 #define     BPF_SET_AUTODELETION    0x30
    00054 #define     BPF_SEPARATION          0xff
    00055
    00056 /* Prototypes */
    00057 pcap_send_queue* pcap_sendqueue_alloc(u_int memsize);
    00058
    00059 void pcap_sendqueue_destroy(pcap_send_queue* queue);
    00060
    00061 int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data);
    00062
    00063 u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync);
    00064
    00065 HANDLE pcap_getevent(pcap_t *p);
    00066
    00067 struct pcap_stat *pcap_stats_ex(pcap_t *p);
    00068
    00069 int pcap_setuserbuffer(pcap_t *p, int size);
    00070
    00071 int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks);
    00072
    00073 int pcap_live_dump_ended(pcap_t *p, int sync);

documentation. Copyright (c) 2002-2003 Politecnico di Torino. All rights reserved.