Sha256: a521188ba68c83adfb32fa77eb15e0460494520600fd7125007c45f2e771c5ae

Contents?: true

Size: 1.6 KB

Versions: 10

Compression:

Stored size: 1.6 KB

Contents

/*
 * Queue implementation for keeping pcap formatted packets.
 * 
 * Author: Yasunori Nakazawa, Yasunobu Chiba
 *
 * Copyright (C) 2008-2012 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

10 entries across 10 versions & 1 rubygems

Version Path
trema-0.2.5 src/tremashark/pcap_queue.h
trema-0.2.4 src/tremashark/pcap_queue.h
trema-0.2.3 src/tremashark/pcap_queue.h
trema-0.2.2.1 src/tremashark/pcap_queue.h
trema-0.2.2 src/tremashark/pcap_queue.h
trema-0.2.1 src/tremashark/pcap_queue.h
trema-0.2.0 src/tremashark/pcap_queue.h
trema-0.1.3.2 src/tremashark/pcap_queue.h
trema-0.1.3.1 src/tremashark/pcap_queue.h
trema-0.1.3 src/tremashark/pcap_queue.h