Changeset 1523
- Timestamp:
- 02/09/10 13:46:08 (3 years ago)
- Location:
- trunk/lib
- Files:
-
- 6 edited
-
link_wireless.c (modified) (2 diffs)
-
linktypes.c (modified) (4 diffs, 1 prop)
-
pcap_dump_flush.c (modified) (2 diffs, 1 prop)
-
pcap_next_ex.c (modified) (2 diffs, 1 prop)
-
pcap_open_dead.c (modified) (2 diffs, 1 prop)
-
strndup.c (modified) (2 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/link_wireless.c
r1319 r1523 2 2 * This file is part of libtrace 3 3 * 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 10 9 * 11 10 * All rights reserved. … … 28 27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 29 28 * 29 * $Id$ 30 * 30 31 */ 31 32 32 33 #include "libtrace.h" 33 34 #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 */ 34 41 35 42 /* Used for Radiotap fields which must be naturally aligned */ -
trunk/lib/linktypes.c
- Property svn:keywords changed from Author Date Id Revision to Id
r1497 r1523 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 1 34 #include "libtrace.h" 2 35 #include "config.h" … … 84 117 85 118 /* Below here are unsupported conversions */ 86 /* D ispite hints to the contrary, there is no DLT119 /* Despite hints to the contrary, there is no DLT 87 120 * for 'raw atm packets that happen to be missing 88 121 * the HEC' or even 'raw atm packets that have a hec'. … … 190 223 } 191 224 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 194 228 * when we have direction tagging information! So this converts the packet 195 229 * to TRACE_TYPE_LINUX_SLL which does support direction tagging. This is a … … 262 296 } 263 297 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. 267 302 */ 268 303 bool demote_packet(libtrace_packet_t *packet) -
trunk/lib/pcap_dump_flush.c
- Property svn:keywords changed from Author Date Id Revision to Id
r1070 r1523 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 1 34 #ifdef HAVE_PCAP 2 35 #include "config.h" … … 10 43 #include <string.h> 11 44 45 /* Custom implementation of pcap_dump_flush, as some versions of PCAP do not 46 * have it */ 47 12 48 int pcap_dump_flush(pcap_dumper_t *p) { 13 49 if (fflush((FILE *)p) == EOF) -
trunk/lib/pcap_next_ex.c
- Property svn:keywords set to Id
r1070 r1523 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 1 35 #ifdef HAVE_PCAP 2 36 #include "config.h" … … 11 45 #include <libtrace.h> 12 46 #include <stdlib.h> 47 48 /* Custom implementation of pcap_next_ex as some versions of PCAP do not have 49 * it */ 13 50 14 51 struct pcap_data_t { -
trunk/lib/pcap_open_dead.c
- Property svn:keywords changed from Author Date Id Revision to Id
r1035 r1523 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 1 35 #ifdef HAVE_PCAP 2 36 #include "config.h" … … 12 46 #include <string.h> 13 47 48 /* Custom implementation of pcap_open_dead as some versions of PCAP do not 49 * have it */ 50 14 51 pcap_t *pcap_open_dead(int linktype, int snaplen) { 15 52 pcap_t *p = NULL; -
trunk/lib/strndup.c
- Property svn:keywords changed from Author Date Id Revision to Id
r698 r1523 1 1 /* 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 * 3 30 */ 31 4 32 #include "config.h" 5 33 … … 9 37 #include <errno.h> 10 38 #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 */ 11 46 12 47 char *strndup(const char *s, size_t size)
Note: See TracChangeset
for help on using the changeset viewer.
