Changeset 9c6aa95 for lib/format_pcap.c


Ignore:
Timestamp:
10/07/05 17:31:17 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
9daf398
Parents:
5c88a60
Message:

cleaned up after compiling with -Wall -W

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcap.c

    rb69afb1 r9c6aa95  
    4646#include <assert.h>
    4747#include <stdio.h>
     48#include <stdlib.h>
     49#include <string.h>
    4850
    4951#if HAVE_PCAP_BPF_H
     
    157159
    158160static int pcap_init_output(struct libtrace_out_t *libtrace) {
    159         char errbuf[PCAP_ERRBUF_SIZE];
    160         struct stat buf;
    161161        libtrace->format_data = (struct libtrace_format_data_out_t *)
    162162                malloc(sizeof(struct libtrace_format_data_out_t));
     
    185185}
    186186
    187 static int pcapint_init_output(struct libtrace_out_t *libtrace) {
     187static int pcapint_init_output(struct libtrace_out_t *libtrace __attribute__((unused))) {
    188188        return -1;
    189189}
     
    201201}
    202202
    203 static int pcapint_fin_output(struct libtrace_out_t *libtrace) {
     203static int pcapint_fin_output(struct libtrace_out_t *libtrace __attribute__((unused))) {
    204204        return -1;
    205205}
     
    218218
    219219static int pcap_read_packet(struct libtrace_t *libtrace, struct libtrace_packet_t *packet) {
    220         const u_char *pcappkt;
    221220        int pcapbytes = 0;
    222221
     
    260259}
    261260
    262 static int pcapint_write_packet(struct libtrace_out_t *libtrace, struct libtrace_packet_t *packet) {
    263         void *link = trace_get_link(packet);
    264 
     261static int pcapint_write_packet(struct libtrace_out_t *libtrace __attribute__((unused)), struct libtrace_packet_t *packet __attribute__((unused))) {
     262//      void *link = trace_get_link(packet);
     263
     264        return 0;
    265265}
    266266
     
    379379}
    380380
    381 static int pcap_get_fd(struct libtrace_packet_t *packet) {
     381static int pcap_get_fd(const struct libtrace_packet_t *packet) {
    382382        return pcap_fileno(packet->trace->format_data->input.pcap);
    383383}
Note: See TracChangeset for help on using the changeset viewer.