<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>libnl: nla_policy Struct Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">libnl <span id="projectnumber">1.1</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-attribs">Data Fields</a> </div> <div class="headertitle"> <h1>nla_policy Struct Reference<div class="ingroups"><a class="el" href="group__attr.html">Attributes</a></div></h1> </div> </div> <div class="contents"> <!-- doxytag: class="nla_policy" --> <p>attribute validation policy <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="attr_8h_source.html">attr.h</a>></code></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-attribs"></a> Data Fields</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa36c9d1e298fc9e4ee16a8fb553b32a"></a><!-- doxytag: member="nla_policy::type" ref="aaa36c9d1e298fc9e4ee16a8fb553b32a" args="" --> uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structnla__policy.html#aaa36c9d1e298fc9e4ee16a8fb553b32a">type</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Type of attribute or NLA_UNSPEC. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a70310d3332cb82c390754bd70b1cb7dd"></a><!-- doxytag: member="nla_policy::minlen" ref="a70310d3332cb82c390754bd70b1cb7dd" args="" --> uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structnla__policy.html#a70310d3332cb82c390754bd70b1cb7dd">minlen</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Minimal length of payload required to be available. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a408814d16c0dbeb4137e76b36776583d"></a><!-- doxytag: member="nla_policy::maxlen" ref="a408814d16c0dbeb4137e76b36776583d" args="" --> uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structnla__policy.html#a408814d16c0dbeb4137e76b36776583d">maxlen</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Maximal length of payload required to be available. <br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Policies are defined as arrays of this struct, the array must be accessible by attribute type up to the highest identifier to be expected.</p> <p>Example: </p> <div class="fragment"><pre class="fragment"> <span class="keyword">static</span> <span class="keyword">struct </span><a class="code" href="structnla__policy.html" title="attribute validation policy">nla_policy</a> my_policy[ATTR_MAX+1] __read_mostly = { [ATTR_FOO] = { .<a class="code" href="structnla__policy.html#aaa36c9d1e298fc9e4ee16a8fb553b32a" title="Type of attribute or NLA_UNSPEC.">type</a> = <a class="code" href="group__attr.html#gga06fc87d81c62e9abb8790b6e5713c55ba8ca718be156e8f388cbcbc4c3d1d874d" title="16bit integer">NLA_U16</a> }, [ATTR_BAR] = { .type = <a class="code" href="group__attr.html#gga06fc87d81c62e9abb8790b6e5713c55ba284d1eafd6d5d99cedaff3cd5f5a8378" title="character string">NLA_STRING</a> }, [ATTR_BAZ] = { .minlen = <span class="keyword">sizeof</span>(<span class="keyword">struct </span>mystruct) }, }; </pre></div> <p>Definition at line <a class="el" href="attr_8h_source.html#l00073">73</a> of file <a class="el" href="attr_8h_source.html">attr.h</a>.</p> </div></div> <hr class="footer"/><address class="footer"><small>Generated on Mon Mar 21 2011 for libnl by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>