\hypertarget{ng__async_8h_source}{}\doxysection{ng\+\_\+async.\+h}
\label{ng__async_8h_source}\index{netgraph/ng\_async.h@{netgraph/ng\_async.h}}
\mbox{\hyperlink{ng__async_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00001}00001 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00002}00002 \textcolor{comment}{ * ng\_async.h}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00003}00003 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00004}00004 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00005}00005 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00006}00006 \textcolor{comment}{ * Copyright (c) 1996-\/1999 Whistle Communications, Inc.}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00007}00007 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00008}00008 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00009}00009 \textcolor{comment}{ * Subject to the following obligations and disclaimer of warranty, use and}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00010}00010 \textcolor{comment}{ * redistribution of this software, in source or object code forms, with or}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00011}00011 \textcolor{comment}{ * without modifications are expressly permitted by Whistle Communications;}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00012}00012 \textcolor{comment}{ * provided, however, that:}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00013}00013 \textcolor{comment}{ * 1. Any and all reproductions of the source or object code must include the}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00014}00014 \textcolor{comment}{ *    copyright notice above and the following disclaimer of warranties; and}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00015}00015 \textcolor{comment}{ * 2. No rights are granted, in any manner or form, to use Whistle}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00016}00016 \textcolor{comment}{ *    Communications, Inc. trademarks, including the mark "{}WHISTLE}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00017}00017 \textcolor{comment}{ *    COMMUNICATIONS"{} on advertising, endorsements, or otherwise except as}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00018}00018 \textcolor{comment}{ *    such appears in the above copyright notice or in the software.}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00019}00019 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00020}00020 \textcolor{comment}{ * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "{}AS IS"{}, AND}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00021}00021 \textcolor{comment}{ * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00022}00022 \textcolor{comment}{ * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00023}00023 \textcolor{comment}{ * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00024}00024 \textcolor{comment}{ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-\/INFRINGEMENT.}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00025}00025 \textcolor{comment}{ * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00026}00026 \textcolor{comment}{ * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00027}00027 \textcolor{comment}{ * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00028}00028 \textcolor{comment}{ * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00029}00029 \textcolor{comment}{ * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00030}00030 \textcolor{comment}{ * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00031}00031 \textcolor{comment}{ * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00032}00032 \textcolor{comment}{ * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00033}00033 \textcolor{comment}{ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00034}00034 \textcolor{comment}{ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00035}00035 \textcolor{comment}{ * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00036}00036 \textcolor{comment}{ * OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00037}00037 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00038}00038 \textcolor{comment}{ * Author: Archie Cobbs <archie@freebsd.org>}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00039}00039 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00040}00040 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00041}00041 \textcolor{comment}{ * \$Whistle: ng\_async.h,v 1.5 1999/01/25 01:17:14 archie Exp \$}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00042}00042 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00044}00044 \textcolor{preprocessor}{\#ifndef \_NETGRAPH\_NG\_ASYNC\_H\_}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00045}00045 \textcolor{preprocessor}{\#define \_NETGRAPH\_NG\_ASYNC\_H\_}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00047}00047 \textcolor{comment}{/* Type name and cookie */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00048}\mbox{\hyperlink{ng__async_8h_a32152504e56f50fe627768f6534f95b0}{00048}} \textcolor{preprocessor}{\#define NG\_ASYNC\_NODE\_TYPE      "{}async"{}}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00049}\mbox{\hyperlink{ng__async_8h_a417a91569715b2bd8dab73ad0681aa59}{00049}} \textcolor{preprocessor}{\#define NGM\_ASYNC\_COOKIE        886473717}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00051}00051 \textcolor{comment}{/* Hook names */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00052}\mbox{\hyperlink{ng__async_8h_a929c5c46a38a169bc899e273324f4b97}{00052}} \textcolor{preprocessor}{\#define NG\_ASYNC\_HOOK\_SYNC      "{}sync"{}}  \textcolor{comment}{/* Sync frames */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00053}\mbox{\hyperlink{ng__async_8h_a71dd377a0352dee96c75dc13d2e95ea5}{00053}} \textcolor{preprocessor}{\#define NG\_ASYNC\_HOOK\_ASYNC     "{}async"{}} \textcolor{comment}{/* Async-\/encoded frames */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00055}00055 \textcolor{comment}{/* Maximum receive size bounds (for both sync and async sides) */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00056}\mbox{\hyperlink{ng__async_8h_a2adfc13cc3c9aa6aa538ebb3b782c2c9}{00056}} \textcolor{preprocessor}{\#define NG\_ASYNC\_MIN\_MRU        1}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00057}\mbox{\hyperlink{ng__async_8h_a65c0e2ceb07e6998fe0b9ee10daa1cd5}{00057}} \textcolor{preprocessor}{\#define NG\_ASYNC\_MAX\_MRU        8192}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00058}\mbox{\hyperlink{ng__async_8h_a1fac3025ae2e4e9d244b6702cc64f9e4}{00058}} \textcolor{preprocessor}{\#define NG\_ASYNC\_DEFAULT\_MRU    1600}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00060}00060 \textcolor{comment}{/* Frame statistics */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00061}\mbox{\hyperlink{structng__async__stat}{00061}} \textcolor{keyword}{struct }\mbox{\hyperlink{structng__async__stat}{ng\_async\_stat}} \{}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00062}\mbox{\hyperlink{structng__async__stat_a35d13c1b872c78f4506402bc524d9a91}{00062}}         u\_int32\_t       \mbox{\hyperlink{structng__async__stat_a35d13c1b872c78f4506402bc524d9a91}{syncOctets}};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00063}\mbox{\hyperlink{structng__async__stat_a9e36075a389ededf118258b71cafde90}{00063}}         u\_int32\_t       \mbox{\hyperlink{structng__async__stat_a9e36075a389ededf118258b71cafde90}{syncFrames}};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00064}\mbox{\hyperlink{structng__async__stat_ac6fe469301566328de371e637c809570}{00064}}         u\_int32\_t       \mbox{\hyperlink{structng__async__stat_ac6fe469301566328de371e637c809570}{syncOverflows}};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00065}\mbox{\hyperlink{structng__async__stat_a81e85f36a5dd79f2ec94b68a767c1f44}{00065}}         u\_int32\_t       \mbox{\hyperlink{structng__async__stat_a81e85f36a5dd79f2ec94b68a767c1f44}{asyncOctets}};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00066}\mbox{\hyperlink{structng__async__stat_a5193b24b4b7efabdd12c0c8c5fa3778a}{00066}}         u\_int32\_t       \mbox{\hyperlink{structng__async__stat_a5193b24b4b7efabdd12c0c8c5fa3778a}{asyncFrames}};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00067}\mbox{\hyperlink{structng__async__stat_a538d6dcdf152d5e7934313c460b2ccb1}{00067}}         u\_int32\_t       \mbox{\hyperlink{structng__async__stat_a538d6dcdf152d5e7934313c460b2ccb1}{asyncRunts}};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00068}\mbox{\hyperlink{structng__async__stat_ac79c7ad189ee60d8161c19f02d232708}{00068}}         u\_int32\_t       \mbox{\hyperlink{structng__async__stat_ac79c7ad189ee60d8161c19f02d232708}{asyncOverflows}};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00069}\mbox{\hyperlink{structng__async__stat_aa574c5369bbf0de39ccd6d882253c1a1}{00069}}         u\_int32\_t       \mbox{\hyperlink{structng__async__stat_aa574c5369bbf0de39ccd6d882253c1a1}{asyncBadCheckSums}};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00070}00070 \};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00072}00072 \textcolor{comment}{/* Keep this in sync with the above structure definition */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00073}\mbox{\hyperlink{ng__async_8h_aff9c9fae5e5d4c7d6b7f4e5d87d30c96}{00073}} \textcolor{preprocessor}{\#define NG\_ASYNC\_STATS\_TYPE\_INFO        \{                       \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00074}00074 \textcolor{preprocessor}{          \{ "{}syncOctets"{}},       \&ng\_parse\_uint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00075}00075           \{ "{}syncFrames"{},       \&ng\_parse\_uint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00076}00076           \{ "{}syncOverflows"{},    \&ng\_parse\_uint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00077}00077           \{ "{}asyncOctets"{},      \&ng\_parse\_uint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00078}00078           \{ "{}asyncFrames"{},      \&ng\_parse\_uint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00079}00079           \{ "{}asyncRunts"{},       \&ng\_parse\_uint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00080}00080           \{ "{}asyncOverflows"{},   \&ng\_parse\_uint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00081}00081           \{ "{}asyncBadCheckSums"{},\&ng\_parse\_uint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00082}00082           \{ NULL \}                                              \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00083}00083 \}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00085}00085 \textcolor{comment}{/* Configuration for this node */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00086}\mbox{\hyperlink{structng__async__cfg}{00086}} \textcolor{keyword}{struct }\mbox{\hyperlink{structng__async__cfg}{ng\_async\_cfg}} \{}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00087}\mbox{\hyperlink{structng__async__cfg_a49f0a13ec3390d608fe9a1f63f73b968}{00087}}         u\_char          \mbox{\hyperlink{structng__async__cfg_a49f0a13ec3390d608fe9a1f63f73b968}{enabled}}; \textcolor{comment}{/* Turn encoding on/off */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00088}\mbox{\hyperlink{structng__async__cfg_a104d10091a7bf978d1f24ae894636c79}{00088}}         u\_int16\_t       \mbox{\hyperlink{structng__async__cfg_a104d10091a7bf978d1f24ae894636c79}{amru}};               \textcolor{comment}{/* Max receive async frame length */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00089}\mbox{\hyperlink{structng__async__cfg_aa59045762f62c1c9914c9fa583d11d50}{00089}}         u\_int16\_t       \mbox{\hyperlink{structng__async__cfg_aa59045762f62c1c9914c9fa583d11d50}{smru}};               \textcolor{comment}{/* Max receive sync frame length */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00090}\mbox{\hyperlink{structng__async__cfg_a55e7d402e16837132608a6c71e23817a}{00090}}         u\_int32\_t       \mbox{\hyperlink{structng__async__cfg_a55e7d402e16837132608a6c71e23817a}{accm}};               \textcolor{comment}{/* ACCM encoding */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00091}00091 \};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00093}00093 \textcolor{comment}{/* Keep this in sync with the above structure definition */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00094}\mbox{\hyperlink{ng__async_8h_a0649223e2a66c7c199c5e7c410edef05}{00094}} \textcolor{preprocessor}{\#define NG\_ASYNC\_CONFIG\_TYPE\_INFO       \{                       \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00095}00095 \textcolor{preprocessor}{          \{ "{}enabled"{}},          \&ng\_parse\_int8\_type     \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00096}00096           \{ "{}amru"{},             \&ng\_parse\_uint16\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00097}00097           \{ "{}smru"{},             \&ng\_parse\_uint16\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00098}00098           \{ "{}accm"{},             \&ng\_parse\_hint32\_type   \},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00099}00099           \{ NULL \}                                              \(\backslash\)}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00100}00100 \}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00102}00102 \textcolor{comment}{/* Commands */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00103}00103 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00104}\mbox{\hyperlink{ng__async_8h_aabfcbcb5ac86a1edac4035264bc7d2b8aae9367cee64c76f467da01c50d4f47b8}{00104}}         \mbox{\hyperlink{ng__async_8h_aabfcbcb5ac86a1edac4035264bc7d2b8aae9367cee64c76f467da01c50d4f47b8}{NGM\_ASYNC\_CMD\_GET\_STATS}} = 1,     \textcolor{comment}{/* returns struct ng\_async\_stat */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00105}\mbox{\hyperlink{ng__async_8h_aabfcbcb5ac86a1edac4035264bc7d2b8a97f0f086a3e7776ae2dd545fe0890fa6}{00105}}         \mbox{\hyperlink{ng__async_8h_aabfcbcb5ac86a1edac4035264bc7d2b8a97f0f086a3e7776ae2dd545fe0890fa6}{NGM\_ASYNC\_CMD\_CLR\_STATS}},}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00106}\mbox{\hyperlink{ng__async_8h_aabfcbcb5ac86a1edac4035264bc7d2b8a8b8ab31bb58602feaee1eaf00afe44a2}{00106}}         \mbox{\hyperlink{ng__async_8h_aabfcbcb5ac86a1edac4035264bc7d2b8a8b8ab31bb58602feaee1eaf00afe44a2}{NGM\_ASYNC\_CMD\_SET\_CONFIG}},       \textcolor{comment}{/* takes struct ng\_async\_cfg */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00107}\mbox{\hyperlink{ng__async_8h_aabfcbcb5ac86a1edac4035264bc7d2b8a7076dfdbefe7d636ae94ea58788a1444}{00107}}         \mbox{\hyperlink{ng__async_8h_aabfcbcb5ac86a1edac4035264bc7d2b8a7076dfdbefe7d636ae94ea58788a1444}{NGM\_ASYNC\_CMD\_GET\_CONFIG}},       \textcolor{comment}{/* returns struct ng\_async\_cfg */}}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00108}00108 \};}
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{ng__async_8h_source_l00110}00110 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_NETGRAPH\_NG\_ASYNC\_H\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
