10SN/A/*- 210123Sgoetz * Copyright (c) 1996-2000 Whistle Communications, Inc. 30SN/A * All rights reserved. 40SN/A * 50SN/A * Subject to the following obligations and disclaimer of warranty, use and 60SN/A * redistribution of this software, in source or object code forms, with or 70SN/A * without modifications are expressly permitted by Whistle Communications; 80SN/A * provided, however, that: 90SN/A * 1. Any and all reproductions of the source or object code must include the 100SN/A * copyright notice above and the following disclaimer of warranties; and 110SN/A * 2. No rights are granted, in any manner or form, to use Whistle 120SN/A * Communications, Inc. trademarks, including the mark "WHISTLE 130SN/A * COMMUNICATIONS" on advertising, endorsements, or otherwise except as 140SN/A * such appears in the above copyright notice or in the software. 150SN/A * 160SN/A * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND 170SN/A * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO 180SN/A * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, 191472SN/A * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF 201472SN/A * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 211472SN/A * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY 220SN/A * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS 230SN/A * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. 240SN/A * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES 258413Spliden * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING 268413Spliden * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 271879SN/A * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 288413Spliden * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 298413Spliden * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 308413Spliden * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 311879SN/A * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 321879SN/A * OF SUCH DAMAGE. 331879SN/A * 341879SN/A * This file was derived from src/sys/netgraph/ng_sample.h, revision 1.1 351879SN/A * written by Julian Elischer, Whistle Communications. 364107SN/A * 371879SN/A * $FreeBSD: releng/11.0/sys/dev/usb/misc/udbp.h 196219 2009-08-14 20:03:53Z jhb $ 380SN/A */ 390SN/A 400SN/A#ifndef _NETGRAPH_UDBP_H_ 410SN/A#define _NETGRAPH_UDBP_H_ 420SN/A 430SN/A/* Node type name. This should be unique among all netgraph node types */ 440SN/A#define NG_UDBP_NODE_TYPE "udbp" 450SN/A 460SN/A/* Node type cookie. Should also be unique. This value MUST change whenever 470SN/A an incompatible change is made to this header file, to insure consistency. 480SN/A The de facto method for generating cookies is to take the output of the 490SN/A date command: date -u +'%s' */ 500SN/A#define NGM_UDBP_COOKIE 944609300 510SN/A 520SN/A 530SN/A#define NG_UDBP_HOOK_NAME "data" 540SN/A 550SN/A/* Netgraph commands understood by this node type */ 560SN/Aenum { 570SN/A NGM_UDBP_SET_FLAG = 1, 580SN/A NGM_UDBP_GET_STATUS, 590SN/A}; 600SN/A 610SN/A/* This structure is returned by the NGM_UDBP_GET_STATUS command */ 623465SN/Astruct ngudbpstat { 630SN/A uint32_t packets_in; /* packets in from downstream */ 640SN/A uint32_t packets_out; /* packets out towards downstream */ 650SN/A}; 660SN/A 670SN/A/* 680SN/A * This is used to define the 'parse type' for a struct ngudbpstat, which 690SN/A * is bascially a description of how to convert a binary struct ngudbpstat 700SN/A * to an ASCII string and back. See ng_parse.h for more info. 710SN/A * 720SN/A * This needs to be kept in sync with the above structure definition 730SN/A */ 740SN/A#define NG_UDBP_STATS_TYPE_INFO { \ 750SN/A { "packets_in", &ng_parse_int32_type }, \ 760SN/A { "packets_out", &ng_parse_int32_type }, \ 777470SN/A { NULL }, \ 780SN/A} 790SN/A 800SN/A#endif /* _NETGRAPH_UDBP_H_ */ 810SN/A