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-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

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

Cache object: 76012aa723f2bd16abaac94bd089ad73


[ 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.