⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 if_sm.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/if_sm.html - generated by refgen from if_sm.c --> <title> if_sm </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Libraries</i></a></p></blockquote><h1>if_sm</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>if_sm</strong> - shared memory backplane network interface driver </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./if_sm.html#smIfAttach">smIfAttach</a></i>(&nbsp;)</b>  -  publish the <b>sm</b> interface and initialize the driver and device<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This module implements the VxWorks shared memory backplane networkinterface driver.  <p>This driver is designed to be moderately generic, operating unmodifiedacross the range of hosts and targets supported by VxWorks.  To achieve this, the driver must be given several target-specific parameters, and some external support routines must be provided.  These parameters are detailed below.<p>The only user-callable routine is <b><i><a href="./if_sm.html#smIfAttach">smIfAttach</a></i>(&nbsp;)</b>, whichpublishes the <b>sm</b> interface and initializes the driver and device.<p>This driver is layered between the shared memory packet library and the network modules.  The backplane driver gives CPUs residing on a common backplane the ability to communicate using IP (via shared memory).<p>This driver is used both under VxWorks and other host operating systems, e.g.,SunOs.<p></blockquote><h4>BOARD LAYOUT</h4><blockquote><p>This device is "software only."  There is no jumpering diagram required.<p></blockquote><h4>TARGET-SPECIFIC PARAMETERS</h4><blockquote><p><dl><dt>local address of anchor<dd>This parameter is passed to the driver by <b><i><a href="./if_sm.html#smIfAttach">smIfAttach</a></i>(&nbsp;)</b>.It is the local address by which the local CPU accesses the shared memoryanchor.<p><dt>maximum number of input packets<dd>This parameter is passed to the driver by <b><i><a href="./if_sm.html#smIfAttach">smIfAttach</a></i>(&nbsp;)</b>.It specifies the maximum number of incoming shared memory packets that can bequeued to this CPU at one time.<p><dt>method of notification<dd>These parameters are passed to the driver by <b><i><a href="./if_sm.html#smIfAttach">smIfAttach</a></i>(&nbsp;)</b>.Four parameters can be used to allow a CPU to announce the method by which itis to be notified of input packets that have been queued to it.<p><dt>heartbeat frequency<dd>This parameter is passed to the driver by <b><i><a href="./if_sm.html#smIfAttach">smIfAttach</a></i>(&nbsp;)</b>.It specifies the frequency of the shared memory anchor's heartbeat, which isexpressed in terms of the number of CPU ticks on the local CPU correspondingto one heartbeat period.<p><dt>number of buffers to loan<dd>This parameter is passed to the driver by <b><i><a href="./if_sm.html#smIfAttach">smIfAttach</a></i>(&nbsp;)</b>.When the value is non-zero, this parameter specifies the number of sharedmemory packets available to be loaned out. </dl><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./if_sm.html#top">if_sm</a></b>, <b><a href="./ifLib.html#top">ifLib</a></b>, <b><a href="./smNetLib.html#top">smNetLib</a></b><hr><a name="smIfAttach"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>smIfAttach</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>smIfAttach</i>(&nbsp;)</strong> - publish the <b>sm</b> interface and initialize the driver and device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS smIfAttach    (    int         unit,         /* interface unit number */    SM_ANCHOR * pAnchor,      /* local addr of anchor */    int         maxInputPkts, /* max no. of input pkts */    int         intType,      /* method of notif. */    int         intArg1,      /* interrupt argument #1 */    int         intArg2,      /* interrupt argument #2 */    int         intArg3,      /* interrupt argument #3 */    int         ticksPerBeat, /* heartbeat freq. */    int         numLoan       /* no. of buffers to loan */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine attaches an <b>sm</b> Ethernet interface to the network, if theinterface exists.  This routine makes the interface available by filling inthe network interface record.  The system will initialize the interfacewhen it is ready to accept packets.<p>The shared memory region must have been initialized, via <b><i>smPktSetup</i>(&nbsp;)</b>, priorto calling this routine (typically by an OS-specific initialization routine).The <b><i><a href="./if_sm.html#smIfAttach">smIfAttach</a></i>(&nbsp;)</b> routine can be called only once per unit number.<p>The <i>pAnchor</i> parameter is the local address by which the local CPU mayaccess the shared memory anchor.<p>The <i>maxInputPkts</i> parameter specifies the maximum number of incomingshared memory packets which may be queued to this CPU at one time.<p>The <i>intType</i>, <i>intArg1</i>, <i>intArg2</i>, and <i>intArg3</i> parameters allow aCPU to announce the method by which it is to be notified of input packetswhich have been queued to it.<p>The <i>ticksPerBeat</i> parameter specifies the frequency of the shared memoryanchor's heartbeat.  The frequency is expressed in terms of the number of CPUticks on the local CPU corresponding to one heartbeat period.<p>If <i>numLoan</i> is non-zero, it specifies the number of shared memory packets available to be loaned out.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./if_sm.html#top">if_sm</a></b></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -