Changeset ebf8071 for lib


Ignore:
Timestamp:
02/09/10 13:46:08 (12 years ago)
Author:
Shane Alcock <salcock@…>
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:
eda2def
Parents:
f6730d8
Message:
  • Updated licensing and documentation for another set of source files
Location:
lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • lib/link_wireless.c

    rf3f3558 rebf8071  
    22 * This file is part of libtrace
    33 *
    4  * link_wireless.c
    5  * Implements the trace_get_wireless_* methods defined in libtrace.h
    6  *
    7  * Copyright (c) 2007,2008 The University of Waikato, Hamilton, New Zealand.
    8  * Authors: Scott Raynel
    9  *          Perry Lorier
     4 * Copyright (c) 2007,2008,2009,2010 The University of Waikato, Hamilton,
     5 * New Zealand.
     6 *
     7 * Authors: Scott Raynel
     8 *          Perry Lorier
    109 *         
    1110 * All rights reserved.
     
    2827 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2928 *
     29 * $Id$
     30 *
    3031 */
    3132
    3233#include "libtrace.h"
    3334#include "libtrace_int.h"
     35
     36/* The file contains all the functions necessary to access various measurement
     37 * values that are specific to wireless MACs ( RadioTap in particular ).
     38 *
     39 * Credit for all this code goes to Scott Raynel.
     40 */
    3441
    3542/* Used for Radiotap fields which must be naturally aligned */
  • lib/linktypes.c

    rfc710bf rebf8071  
     1/*
     2 * This file is part of libtrace
     3 *
     4 * Copyright (c) 2007,2008,2009,2010 The University of Waikato, Hamilton,
     5 * New Zealand.
     6 *
     7 * Authors: Daniel Lawson
     8 *          Perry Lorier
     9 *          Shane Alcock
     10 *         
     11 * All rights reserved.
     12 *
     13 * This code has been developed by the University of Waikato WAND
     14 * research group. For further information please see http://www.wand.net.nz/
     15 *
     16 * libtrace is free software; you can redistribute it and/or modify
     17 * it under the terms of the GNU General Public License as published by
     18 * the Free Software Foundation; either version 2 of the License, or
     19 * (at your option) any later version.
     20 *
     21 * libtrace is distributed in the hope that it will be useful,
     22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     24 * GNU General Public License for more details.
     25 *
     26 * You should have received a copy of the GNU General Public License
     27 * along with libtrace; if not, write to the Free Software
     28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     29 *
     30 * $Id$
     31 *
     32 */
     33
    134#include "libtrace.h"
    235#include "config.h"
     
    84117
    85118                /* Below here are unsupported conversions */
    86                 /* Dispite hints to the contrary, there is no DLT
     119                /* Despite hints to the contrary, there is no DLT
    87120                 * for 'raw atm packets that happen to be missing
    88121                 * the HEC' or even 'raw atm packets that have a hec'.
     
    190223}
    191224
    192 /** Tinker with a packet
    193  * packets that don't support direction tagging are annoying, especially
     225/** Prepends a Linux SLL header to the packet.
     226 *
     227 * Packets that don't support direction tagging are annoying, especially
    194228 * when we have direction tagging information!  So this converts the packet
    195229 * to TRACE_TYPE_LINUX_SLL which does support direction tagging.  This is a
     
    262296}
    263297
    264 /* Try and simplify the packet one step, kinda the opposite to promote_packet
    265  *
    266  * returns true if demotion was possible, false if not.
     298/* Try and remove any extraneous encapsulation that may have been added to
     299 * a packet. Effectively the opposite to promote_packet.
     300 *
     301 * Returns true if demotion was possible, false if not.
    267302 */
    268303bool demote_packet(libtrace_packet_t *packet)
  • lib/pcap_dump_flush.c

    r5551415 rebf8071  
     1/*
     2 * This file is part of libtrace
     3 *
     4 * Copyright (c) 2007,2008,2009,2010 The University of Waikato, Hamilton,
     5 * New Zealand.
     6 *
     7 * Authors: Daniel Lawson
     8 *          Perry Lorier
     9 *          Shane Alcock
     10 *         
     11 * All rights reserved.
     12 *
     13 * This code has been developed by the University of Waikato WAND
     14 * research group. For further information please see http://www.wand.net.nz/
     15 *
     16 * libtrace is free software; you can redistribute it and/or modify
     17 * it under the terms of the GNU General Public License as published by
     18 * the Free Software Foundation; either version 2 of the License, or
     19 * (at your option) any later version.
     20 *
     21 * libtrace is distributed in the hope that it will be useful,
     22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     24 * GNU General Public License for more details.
     25 *
     26 * You should have received a copy of the GNU General Public License
     27 * along with libtrace; if not, write to the Free Software
     28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     29 *
     30 * $Id$
     31 *
     32 */
     33
    134#ifdef HAVE_PCAP
    235#include "config.h"
     
    1043#include <string.h>
    1144
     45/* Custom implementation of pcap_dump_flush, as some versions of PCAP do not
     46 * have it */
     47
    1248int pcap_dump_flush(pcap_dumper_t *p) {
    1349        if (fflush((FILE *)p) == EOF)
  • lib/pcap_next_ex.c

    r5551415 rebf8071  
     1/*
     2 * This file is part of libtrace
     3 *
     4 * Copyright (c) 2007,2008,2009,2010 The University of Waikato, Hamilton,
     5 * New Zealand.
     6 *
     7 * Authors: Daniel Lawson
     8 *          Perry Lorier
     9 *          Shane Alcock
     10 *         
     11 * All rights reserved.
     12 *
     13 * This code has been developed by the University of Waikato WAND
     14 * research group. For further information please see http://www.wand.net.nz/
     15 *
     16 * libtrace is free software; you can redistribute it and/or modify
     17 * it under the terms of the GNU General Public License as published by
     18 * the Free Software Foundation; either version 2 of the License, or
     19 * (at your option) any later version.
     20 *
     21 * libtrace is distributed in the hope that it will be useful,
     22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     24 * GNU General Public License for more details.
     25 *
     26 * You should have received a copy of the GNU General Public License
     27 * along with libtrace; if not, write to the Free Software
     28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     29 *
     30 * $Id$
     31 *
     32 */
     33
     34
    135#ifdef HAVE_PCAP
    236#include "config.h"
     
    1145#include <libtrace.h>
    1246#include <stdlib.h>
     47
     48/* Custom implementation of pcap_next_ex as some versions of PCAP do not have
     49 * it */
    1350
    1451struct pcap_data_t {
  • lib/pcap_open_dead.c

    ra21af3d rebf8071  
     1/*
     2 * This file is part of libtrace
     3 *
     4 * Copyright (c) 2007,2008,2009,2010 The University of Waikato, Hamilton,
     5 * New Zealand.
     6 *
     7 * Authors: Daniel Lawson
     8 *          Perry Lorier
     9 *          Shane Alcock
     10 *         
     11 * All rights reserved.
     12 *
     13 * This code has been developed by the University of Waikato WAND
     14 * research group. For further information please see http://www.wand.net.nz/
     15 *
     16 * libtrace is free software; you can redistribute it and/or modify
     17 * it under the terms of the GNU General Public License as published by
     18 * the Free Software Foundation; either version 2 of the License, or
     19 * (at your option) any later version.
     20 *
     21 * libtrace is distributed in the hope that it will be useful,
     22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     24 * GNU General Public License for more details.
     25 *
     26 * You should have received a copy of the GNU General Public License
     27 * along with libtrace; if not, write to the Free Software
     28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     29 *
     30 * $Id$
     31 *
     32 */
     33
     34
    135#ifdef HAVE_PCAP
    236#include "config.h"
     
    1246#include <string.h>
    1347
     48/* Custom implementation of pcap_open_dead as some versions of PCAP do not
     49 * have it */
     50
    1451pcap_t *pcap_open_dead(int linktype, int snaplen) {
    1552    pcap_t *p = NULL;
  • lib/strndup.c

    rf2f47a7 rebf8071  
    11/*
    2  * Written by mjl. Needs attributation?
     2 * This file is part of libtrace
     3 *
     4 * Copyright (c) 2007,2008,2009,2010 The University of Waikato, Hamilton,
     5 * New Zealand.
     6 *
     7 * Authors: Matthew Luckie
     8 *         
     9 * All rights reserved.
     10 *
     11 * This code has been developed by the University of Waikato WAND
     12 * research group. For further information please see http://www.wand.net.nz/
     13 *
     14 * libtrace is free software; you can redistribute it and/or modify
     15 * it under the terms of the GNU General Public License as published by
     16 * the Free Software Foundation; either version 2 of the License, or
     17 * (at your option) any later version.
     18 *
     19 * libtrace is distributed in the hope that it will be useful,
     20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     22 * GNU General Public License for more details.
     23 *
     24 * You should have received a copy of the GNU General Public License
     25 * along with libtrace; if not, write to the Free Software
     26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     27 *
     28 * $Id$
     29 *
    330 */
     31
    432#include "config.h"
    533
     
    937#include <errno.h>
    1038#include <string.h>
     39
     40/* Some systems don't include strndup as part of their standard C library, so
     41 * we need to provide our own version.
     42 *
     43 * Full credit to Matthew Luckie, who wrote this particular version and allowed
     44 * us to borrow it.
     45 */
    1146
    1247char *strndup(const char *s, size_t size)
Note: See TracChangeset for help on using the changeset viewer.