siftr.c (220560) | siftr.c (220592) |
---|---|
1/*- 2 * Copyright (c) 2007-2009 3 * Swinburne University of Technology, Melbourne, Australia. 4 * Copyright (c) 2009-2010, The FreeBSD Foundation 5 * All rights reserved. 6 * 7 * Portions of this software were developed at the Centre for Advanced 8 * Internet Architectures, Swinburne University of Technology, Melbourne, --- 45 unchanged lines hidden (view full) --- 54 * Lawrence Stewart is the current maintainer, and all contact regarding 55 * SIFTR should be directed to him via email: lastewart@swin.edu.au 56 * 57 * Initial release date: June 2007 58 * Most recent update: September 2010 59 ******************************************************/ 60 61#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2007-2009 3 * Swinburne University of Technology, Melbourne, Australia. 4 * Copyright (c) 2009-2010, The FreeBSD Foundation 5 * All rights reserved. 6 * 7 * Portions of this software were developed at the Centre for Advanced 8 * Internet Architectures, Swinburne University of Technology, Melbourne, --- 45 unchanged lines hidden (view full) --- 54 * Lawrence Stewart is the current maintainer, and all contact regarding 55 * SIFTR should be directed to him via email: lastewart@swin.edu.au 56 * 57 * Initial release date: June 2007 58 * Most recent update: September 2010 59 ******************************************************/ 60 61#include <sys/cdefs.h> |
62__FBSDID("$FreeBSD: head/sys/netinet/siftr.c 220560 2011-04-12 08:13:18Z lstewart $"); | 62__FBSDID("$FreeBSD: head/sys/netinet/siftr.c 220592 2011-04-13 11:28:46Z pluknet $"); |
63 64#include <sys/param.h> 65#include <sys/alq.h> 66#include <sys/errno.h> 67#include <sys/hash.h> 68#include <sys/kernel.h> 69#include <sys/kthread.h> 70#include <sys/lock.h> --- 80 unchanged lines hidden (view full) --- 151#define UPPER_SHORT(X) (((X) & 0xFFFF0000) >> 16) 152#define LOWER_SHORT(X) ((X) & 0x0000FFFF) 153 154#define FIRST_OCTET(X) (((X) & 0xFF000000) >> 24) 155#define SECOND_OCTET(X) (((X) & 0x00FF0000) >> 16) 156#define THIRD_OCTET(X) (((X) & 0x0000FF00) >> 8) 157#define FOURTH_OCTET(X) ((X) & 0x000000FF) 158 | 63 64#include <sys/param.h> 65#include <sys/alq.h> 66#include <sys/errno.h> 67#include <sys/hash.h> 68#include <sys/kernel.h> 69#include <sys/kthread.h> 70#include <sys/lock.h> --- 80 unchanged lines hidden (view full) --- 151#define UPPER_SHORT(X) (((X) & 0xFFFF0000) >> 16) 152#define LOWER_SHORT(X) ((X) & 0x0000FFFF) 153 154#define FIRST_OCTET(X) (((X) & 0xFF000000) >> 24) 155#define SECOND_OCTET(X) (((X) & 0x00FF0000) >> 16) 156#define THIRD_OCTET(X) (((X) & 0x0000FF00) >> 8) 157#define FOURTH_OCTET(X) ((X) & 0x000000FF) 158 |
159MALLOC_DECLARE(M_SIFTR); 160MALLOC_DEFINE(M_SIFTR, "siftr", "dynamic memory used by SIFTR"); | 159static MALLOC_DEFINE(M_SIFTR, "siftr", "dynamic memory used by SIFTR"); 160static MALLOC_DEFINE(M_SIFTR_PKTNODE, "siftr_pktnode", 161 "SIFTR pkt_node struct"); 162static MALLOC_DEFINE(M_SIFTR_HASHNODE, "siftr_hashnode", 163 "SIFTR flow_hash_node struct"); |
161 | 164 |
162MALLOC_DECLARE(M_SIFTR_PKTNODE); 163MALLOC_DEFINE(M_SIFTR_PKTNODE, "siftr_pktnode", "SIFTR pkt_node struct"); 164 165MALLOC_DECLARE(M_SIFTR_HASHNODE); 166MALLOC_DEFINE(M_SIFTR_HASHNODE, "siftr_hashnode", "SIFTR flow_hash_node struct"); 167 | |
168/* Used as links in the pkt manager queue. */ 169struct pkt_node { 170 /* Timestamp of pkt as noted in the pfil hook. */ 171 struct timeval tval; 172 /* Direction pkt is travelling; either PFIL_IN or PFIL_OUT. */ 173 uint8_t direction; 174 /* IP version pkt_node relates to; either INP_IPV4 or INP_IPV6. */ 175 uint8_t ipver; --- 1382 unchanged lines hidden --- | 165/* Used as links in the pkt manager queue. */ 166struct pkt_node { 167 /* Timestamp of pkt as noted in the pfil hook. */ 168 struct timeval tval; 169 /* Direction pkt is travelling; either PFIL_IN or PFIL_OUT. */ 170 uint8_t direction; 171 /* IP version pkt_node relates to; either INP_IPV4 or INP_IPV6. */ 172 uint8_t ipver; --- 1382 unchanged lines hidden --- |