\hypertarget{ng__sample_8h_source}{}\doxysection{ng\+\_\+sample.\+h}
\label{ng__sample_8h_source}\index{netgraph/ng\_sample.h@{netgraph/ng\_sample.h}}
\mbox{\hyperlink{ng__sample_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00001}00001 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00002}00002 \textcolor{comment}{ * ng\_sample.h}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00003}00003 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00004}00004 }
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00005}00005 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00006}00006 \textcolor{comment}{ * Copyright (c) 1996-\/1999 Whistle Communications, Inc.}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00007}00007 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00008}00008 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00009}00009 \textcolor{comment}{ * Subject to the following obligations and disclaimer of warranty, use and}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00010}00010 \textcolor{comment}{ * redistribution of this software, in source or object code forms, with or}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00011}00011 \textcolor{comment}{ * without modifications are expressly permitted by Whistle Communications;}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00012}00012 \textcolor{comment}{ * provided, however, that:}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00013}00013 \textcolor{comment}{ * 1. Any and all reproductions of the source or object code must include the}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00014}00014 \textcolor{comment}{ *    copyright notice above and the following disclaimer of warranties; and}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00015}00015 \textcolor{comment}{ * 2. No rights are granted, in any manner or form, to use Whistle}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00016}00016 \textcolor{comment}{ *    Communications, Inc. trademarks, including the mark "{}WHISTLE}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00017}00017 \textcolor{comment}{ *    COMMUNICATIONS"{} on advertising, endorsements, or otherwise except as}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00018}00018 \textcolor{comment}{ *    such appears in the above copyright notice or in the software.}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00019}00019 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00020}00020 \textcolor{comment}{ * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "{}AS IS"{}, AND}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00021}00021 \textcolor{comment}{ * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00022}00022 \textcolor{comment}{ * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00023}00023 \textcolor{comment}{ * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00024}00024 \textcolor{comment}{ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-\/INFRINGEMENT.}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00025}00025 \textcolor{comment}{ * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00026}00026 \textcolor{comment}{ * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00027}00027 \textcolor{comment}{ * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00028}00028 \textcolor{comment}{ * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00029}00029 \textcolor{comment}{ * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00030}00030 \textcolor{comment}{ * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00031}00031 \textcolor{comment}{ * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00032}00032 \textcolor{comment}{ * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00033}00033 \textcolor{comment}{ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00034}00034 \textcolor{comment}{ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00035}00035 \textcolor{comment}{ * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00036}00036 \textcolor{comment}{ * OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00037}00037 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00038}00038 \textcolor{comment}{ * Author: Julian Elischer <julian@freebsd.org>}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00039}00039 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00040}00040 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00041}00041 \textcolor{comment}{ * \$Whistle: ng\_sample.h,v 1.3 1999/01/20 00:22:14 archie Exp \$}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00042}00042 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00044}00044 \textcolor{preprocessor}{\#ifndef \_NETGRAPH\_NG\_SAMPLE\_H\_}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00045}00045 \textcolor{preprocessor}{\#define \_NETGRAPH\_NG\_SAMPLE\_H\_}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00047}00047 \textcolor{comment}{/* Node type name. This should be unique among all netgraph node types */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00048}\mbox{\hyperlink{ng__sample_8h_ad7dc2775ee272652c54d65a69ce2182a}{00048}} \textcolor{preprocessor}{\#define NG\_XXX\_NODE\_TYPE        "{}sample"{}}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00050}00050 \textcolor{comment}{/* Node type cookie. Should also be unique. This value MUST change whenever}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00051}00051 \textcolor{comment}{   an incompatible change is made to this header file, to insure consistency.}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00052}00052 \textcolor{comment}{   The de facto method for generating cookies is to take the output of the}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00053}00053 \textcolor{comment}{   date command: date -\/u +'\%s' */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00054}\mbox{\hyperlink{ng__sample_8h_ac4ef89457e021328519fbaaabc3d6e6c}{00054}} \textcolor{preprocessor}{\#define NGM\_XXX\_COOKIE          915491374}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00056}00056 \textcolor{comment}{/* Number of active DLCI's we can handle */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00057}\mbox{\hyperlink{ng__sample_8h_a231d518d0c0a6a51c8fff617ff17d53c}{00057}} \textcolor{preprocessor}{\#define XXX\_NUM\_DLCIS           16}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00059}00059 \textcolor{comment}{/* Hook names */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00060}\mbox{\hyperlink{ng__sample_8h_abadd5c9aec45a9e6e18b336a044e858f}{00060}} \textcolor{preprocessor}{\#define NG\_XXX\_HOOK\_DLCI\_LEADIN "{}dlci"{}}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00061}\mbox{\hyperlink{ng__sample_8h_a56149d4f62b974e98d32534026becd68}{00061}} \textcolor{preprocessor}{\#define NG\_XXX\_HOOK\_DOWNSTREAM  "{}downstream"{}}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00062}\mbox{\hyperlink{ng__sample_8h_a15647c18f2d081242e0b47cbc3a858af}{00062}} \textcolor{preprocessor}{\#define NG\_XXX\_HOOK\_DEBUG       "{}debug"{}}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00064}00064 \textcolor{comment}{/* Netgraph commands understood by this node type */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00065}00065 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00066}\mbox{\hyperlink{ng__sample_8h_a531c35e38ede3ea4e5ba5afb24b29493affab0fd7f68276f1252ceff537923fca}{00066}}         \mbox{\hyperlink{ng__sample_8h_a531c35e38ede3ea4e5ba5afb24b29493affab0fd7f68276f1252ceff537923fca}{NGM\_XXX\_SET\_FLAG}} = 1,}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00067}\mbox{\hyperlink{ng__sample_8h_a531c35e38ede3ea4e5ba5afb24b29493a8e528066ff492cd4e7b2147bdfbabc5d}{00067}}         \mbox{\hyperlink{ng__sample_8h_a531c35e38ede3ea4e5ba5afb24b29493a8e528066ff492cd4e7b2147bdfbabc5d}{NGM\_XXX\_GET\_STATUS}},}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00068}00068 \};}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00070}00070 \textcolor{comment}{/* This structure is returned by the NGM\_XXX\_GET\_STATUS command */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00071}\mbox{\hyperlink{structngxxxstat}{00071}} \textcolor{keyword}{struct }\mbox{\hyperlink{structngxxxstat}{ngxxxstat}} \{}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00072}\mbox{\hyperlink{structngxxxstat_a743057f2f9c1d77e9e4bff2a70eb99ab}{00072}}         u\_int32\_t   \mbox{\hyperlink{structngxxxstat_a743057f2f9c1d77e9e4bff2a70eb99ab}{packets\_in}};               \textcolor{comment}{/* packets in from downstream */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00073}\mbox{\hyperlink{structngxxxstat_abbc11fea74d3beb42bfa006f9e04dc89}{00073}}         u\_int32\_t   \mbox{\hyperlink{structngxxxstat_abbc11fea74d3beb42bfa006f9e04dc89}{packets\_out}};     \textcolor{comment}{/* packets out towards downstream */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00074}00074 \};}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00076}00076 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00077}00077 \textcolor{comment}{ * This is used to define the 'parse type' for a struct ngxxxstat, which}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00078}00078 \textcolor{comment}{ * is bascially a description of how to convert a binary struct ngxxxstat}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00079}00079 \textcolor{comment}{ * to an ASCII string and back.  See ng\_parse.h for more info.}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00080}00080 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00081}00081 \textcolor{comment}{ * This needs to be kept in sync with the above structure definition}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00082}00082 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00083}\mbox{\hyperlink{ng__sample_8h_a807c684ad8e3c457b6815745f6125778}{00083}} \textcolor{preprocessor}{\#define NG\_XXX\_STATS\_TYPE\_INFO  \{                               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00084}00084 \textcolor{preprocessor}{          \{ "{}packets\_in"{}},       \&ng\_parse\_uint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00085}00085           \{ "{}packets\_out"{},      \&ng\_parse\_uint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00086}00086           \{ NULL \}                                              \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00087}00087 \}}
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{ng__sample_8h_source_l00089}00089 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_NETGRAPH\_NG\_SAMPLE\_H\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
