The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/netgraph/ng_source.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * ng_source.h
    3  *
    4  * Copyright 2002 Sandvine Inc.
    5  * All rights reserved.
    6  *
    7  * Subject to the following obligations and disclaimer of warranty, use and
    8  * redistribution of this software, in source or object code forms, with or
    9  * without modifications are expressly permitted by Sandvine Inc.;
   10 provided,
   11  * however, that:
   12  * 1. Any and all reproductions of the source or object code must include
   13 the
   14  *    copyright notice above and the following disclaimer of warranties;
   15 and
   16  * 2. No rights are granted, in any manner or form, to use Sandvine Inc.
   17  *    trademarks, including the mark "SANDVINE" on advertising,
   18 endorsements,
   19  *    or otherwise except as such appears in the above copyright notice or
   20 in
   21  *    the software.
   22  *
   23  * THIS SOFTWARE IS BEING PROVIDED BY SANDVINE "AS IS", AND TO THE MAXIMUM
   24  * EXTENT PERMITTED BY LAW, SANDVINE MAKES NO REPRESENTATIONS OR
   25 WARRANTIES,
   26  * EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, INCLUDING WITHOUT
   27 LIMITATION,
   28  * ANY AND ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
   29 PARTICULAR
   30  * PURPOSE, OR NON-INFRINGEMENT.  SANDVINE DOES NOT WARRANT, GUARANTEE, OR
   31  * MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE
   32  * USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY
   33  * OR OTHERWISE.  IN NO EVENT SHALL SANDVINE BE LIABLE FOR ANY DAMAGES
   34  * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
   35  * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
   36 EXEMPLARY,
   37  * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
   38  * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
   39  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   40  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   41  * THIS SOFTWARE, EVEN IF SANDVINE IS ADVISED OF THE POSSIBILITY OF SUCH
   42  * DAMAGE.
   43  *
   44  * Author: Dave Chapeskie <dchapeskie@sandvine.com>
   45  *
   46  * $FreeBSD: releng/5.1/sys/netgraph/ng_source.h 106266 2002-10-31 23:03:09Z julian $
   47  */
   48 
   49 #ifndef _NETGRAPH_SOURCE_H_
   50 #define _NETGRAPH_SOURCE_H_
   51 
   52 /* Node type name and magic cookie */
   53 #define NG_SOURCE_NODE_TYPE     "source"
   54 #define NGM_SOURCE_COOKIE       1034346805
   55 
   56 /* Hook names */
   57 #define NG_SOURCE_HOOK_INPUT    "input"
   58 #define NG_SOURCE_HOOK_OUTPUT   "output"
   59 
   60 /* Statistics structure returned by NGM_SOURCE_GET_STATS */
   61 struct ng_source_stats {
   62         u_int64_t       outOctets;
   63         u_int64_t       outFrames;
   64         u_int32_t       queueOctets;
   65         u_int32_t       queueFrames;
   66         struct timeval  startTime;
   67         struct timeval  endTime;
   68         struct timeval  elapsedTime;
   69 };
   70 
   71 extern const struct ng_parse_type ng_source_timeval_type;
   72 /* Keep this in sync with the above structure definition */
   73 #define NG_SOURCE_STATS_TYPE_INFO       {                       \
   74           { "outOctets",        &ng_parse_uint64_type   },      \
   75           { "outFrames",        &ng_parse_uint64_type   },      \
   76           { "queueOctets",      &ng_parse_uint32_type   },      \
   77           { "queueFrames",      &ng_parse_uint32_type   },      \
   78           { "startTime",        &ng_source_timeval_type },      \
   79           { "endTime",          &ng_source_timeval_type },      \
   80           { "elapsedTime",      &ng_source_timeval_type },      \
   81           { NULL }                                              \
   82 }
   83 
   84 /* Netgraph commands */
   85 enum {
   86         NGM_SOURCE_GET_STATS = 1,       /* get stats */
   87         NGM_SOURCE_CLR_STATS,           /* clear stats */
   88         NGM_SOURCE_GETCLR_STATS,        /* atomically get and clear stats */
   89         NGM_SOURCE_START,               /* start sending queued data */
   90         NGM_SOURCE_STOP,                /* stop sending queued data */
   91         NGM_SOURCE_CLR_DATA,            /* clear the queued data */
   92 };
   93 
   94 #endif /* _NETGRAPH_SOURCE_H_ */

Cache object: 4251543e2dc9366ae5123c12b8ab65ca


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.