Sha256: d27cf799f7d66e3f2f004773e132d00152dced487d5f16c46c2af1a8f4867e65

Contents?: true

Size: 1.55 KB

Versions: 20

Compression:

Stored size: 1.55 KB

Contents

/*
 * Queue implementation for keeping pcap formatted packets.
 *
 * Copyright (C) 2008-2013 NEC Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License, version 2, as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */


#ifndef PCAP_QUEUE_H
#define PCAP_QUEUE_H


#include "trema.h"


typedef enum {
  QUEUE_SUCCESS,
  QUEUE_FULL,
  QUEUE_EMPTY
} queue_status;


bool create_pcap_queue( void );
bool delete_pcap_queue( void );
buffer *create_pcap_packet( void *pcap_header, size_t pcap_len, void *dump_header, size_t dump_len, void *data, size_t data_len );
bool delete_pcap_packet( buffer *packet );
queue_status enqueue_pcap_packet( buffer *packet );
queue_status peek_pcap_packet( buffer **packet );
queue_status dequeue_pcap_packet( buffer **packet );
bool sort_pcap_queue( void );
void set_max_pcap_queue_length( int length );
int get_pcap_queue_length( void );
void foreach_pcap_queue( void function( buffer *data ) );


#endif // PCAP_QUEUE_H


/*
 * Local variables:
 * c-basic-offset: 2
 * indent-tabs-mode: nil
 * End:
 */

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
trema-0.4.7 src/tremashark/pcap_queue.h
trema-0.4.6 src/tremashark/pcap_queue.h
trema-0.4.5 src/tremashark/pcap_queue.h
trema-0.4.4 src/tremashark/pcap_queue.h
trema-0.4.3 src/tremashark/pcap_queue.h
trema-0.4.2 src/tremashark/pcap_queue.h
trema-0.4.1 src/tremashark/pcap_queue.h
trema-0.4.0 src/tremashark/pcap_queue.h
trema-0.3.21 src/tremashark/pcap_queue.h
trema-0.3.20 src/tremashark/pcap_queue.h
trema-0.3.19 src/tremashark/pcap_queue.h
trema-0.3.18 src/tremashark/pcap_queue.h
trema-0.3.17 src/tremashark/pcap_queue.h
trema-0.3.16 src/tremashark/pcap_queue.h
trema-0.3.15 src/tremashark/pcap_queue.h
trema-0.3.14 src/tremashark/pcap_queue.h
trema-0.3.13 src/tremashark/pcap_queue.h
trema-0.3.12 src/tremashark/pcap_queue.h
trema-0.3.11 src/tremashark/pcap_queue.h
trema-0.3.10 src/tremashark/pcap_queue.h