linux/net/core/netevent.c
<<
/opt2.6/spalue 2.6/formue 2.6a /opt2. href="../linux+v3 1/net/core/netevent.c">/opt2.6img src="../.static/gfx/right.png" alt=">>">/o6/spalue/o6spal class="lxr_search">/opt/opt2.6input typ hidden" nam navtarget" > ">/opt2.6input typ text" nam search" id search">/opt2.6butt3" typ submit">Search/opt2.Prefse 2.6/a>/o6/spaluept2. .6/divuept2. .6form ac val="ajax+*" method="post" onsubmit="return false;">/o6input typ hidden" nam ajax_lookup" id ajax_lookup" > ">/pt2. .6/formue/pt2. .6div class="headingbott3m">. .16/a>6spal class="comment"u/*6/spalue. .26/a>6spal class="comment"u *pt2. .Network event notifiers6/spalue. .36/a>6spal class="comment"u *6/spalue. .46/a>6spal class="comment"u *pt2. .Authors:6/spalue. .56/a>6spal class="comment"u *pt2. .Tom Tucker <t3m@opengridcomputing.com>6/spalue. .66/a>6spal class="comment"u *pt2. .Steve Wise <swise@opengridcomputing.com>6/spalue. .76/a>6spal class="comment"u *6/spalue. .86/a>6spal class="comment"u *pt2. .This program is free software; you cal redistribute it and/or6/spalue. .96/a>6spal class="comment"u *pt2. .modify it under the terms of the GNU General Public License6/spalue. on va>6spal class="comment"u *pt2. .as published by the Free Software Founda val; either versval6/spalue. 116/a>6spal class="comment"u *pt2. .2 of the License, or (at your on val) any later versval.6/spalue. 126/a>6spal class="comment"u *6/spalue. 136/a>6spal class="comment"u *pt2. .Fixes:6/spalue. 146/a>6spal class="comment"u */6/spalue. 156/a>e. 166/a>#include <linux/rtnetlink.h6/a>>e. 176/a>#include <linux/notifier.h6/a>>e. 186/a>#include <linux/export.h6/a>>e. 196/a>#include <net/netevent.h6/a>>e. 206/a>e. 216/a>static.6a href="+code=ATOMIC_NOTIFIER_HEAD" class="sref">ATOMIC_NOTIFIER_HEAD6/a>(6a href="+code=netevent_notif_chain" class="sref">netevent_notif_chain6/a>);e. 226/a>e. 236/a>6spal class="comment"u/**6/spalue. 246/a>6spal class="comment"u *pt2. .register_netevent_notifier -.register a netevent notifier block6/spalue. 256/a>6spal class="comment"u *pt2. .@nb: notifier6/spalue. 266/a>6spal class="comment"u *6/spalue. 276/a>6spal class="comment"u *pt2. .Register a notifier to be called when a netevent occurs.6/spalue. 286/a>6spal class="comment"u *pt2. .The notifier passed is linked into the kernel structures and must6/spalue. 296/a>6spal class="comment"u *pt2. .not be reused until it has been unregistered. A negative errno code6/spalue. 3n va>6spal class="comment"u *pt2. .is returned on a failure.6/spalue. 316/a>6spal class="comment"u */6/spalue. 326/a>int.6a href="+code=register_netevent_notifier" class="sref">register_netevent_notifier6/a>(struct.6a href="+code=notifier_block" class="sref">notifier_block6/a> *6a href="+code=nb" class="sref">nb6/a>)e. 336/a>{e. 346/a> int.6a href="+code=err" class="sref">err6/a>;e. 356/a>e. 366/a> 6a href="+code=err" class="sref">err6/a> = 6a href="+code=atomic_notifier_chain_register" class="sref">atomic_notifier_chain_register6/a>(&6a href="+code=netevent_notif_chain" class="sref">netevent_notif_chain6/a>,.6a href="+code=nb" class="sref">nb6/a>);e. 376/a> return 6a href="+code=err" class="sref">err6/a>;e. 386/a>}e. 396/a>6a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL6/a>(6a href="+code=register_netevent_notifier" class="sref">register_netevent_notifier6/a>);e. 406/a>e. 416/a>6spal class="comment"u/**6/spalue. 426/a>6spal class="comment"u *pt2. .netevent_unregister_notifier -.unregister a netevent notifier block6/spalue. 436/a>6spal class="comment"u *pt2. .@nb: notifier6/spalue. 446/a>6spal class="comment"u *6/spalue. 456/a>6spal class="comment"u *pt2. .Unregister a notifier previously registered by6/spalue. 466/a>6spal class="comment"u *pt2. .register_neigh_notifier()..The notifier is unlinked into the6/spalue. 476/a>6spal class="comment"u *pt2. .kernel structures and may then be reused. A negative errno code6/spalue. 486/a>6spal class="comment"u *pt2. .is returned on a failure.6/spalue. 496/a>6spal class="comment"u */6/spalue. 506/a>e. 516/a>int.6a href="+code=unregister_netevent_notifier" class="sref">unregister_netevent_notifier6/a>(struct.6a href="+code=notifier_block" class="sref">notifier_block6/a> *6a href="+code=nb" class="sref">nb6/a>)e. 526/a>{e. 536/a> return 6a href="+code=atomic_notifier_chain_unregister" class="sref">atomic_notifier_chain_unregister6/a>(&6a href="+code=netevent_notif_chain" class="sref">netevent_notif_chain6/a>,.6a href="+code=nb" class="sref">nb6/a>);e. 546/a>}e. 556/a>6a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL6/a>(6a href="+code=unregister_netevent_notifier" class="sref">unregister_netevent_notifier6/a>);e. 566/a>e. 576/a>6spal class="comment"u/**6/spalue. 586/a>6spal class="comment"u *pt2. .call_netevent_notifiers -.call all netevent notifier blocks6/spalue. 596/a>6spal class="comment"u *pt2. .@val: > passed unmodified to notifier func val6/spalue. 6n va>6spal class="comment"u *pt2. .@v:. .pointer passed unmodified to notifier func val6/spalue. 616/a>6spal class="comment"u *6/spalue. 626/a>6spal class="comment"u *pt2. .Call all neighbour notifier blocks. Param ters and return > 6/spalue. 636/a>6spal class="comment"u *pt2. .are as for notifier_call_chain().6/spalue. 646/a>6spal class="comment"u */6/spalue. 656/a>e. 666/a>int.6a href="+code=call_netevent_notifiers" class="sref">call_netevent_notifiers6/a>(unsigned long.6a href="+code= " class="sref"> 6/a>,.void *6a href="+code=v" class="sref"> 6/a>)e. 676/a>{e. 686/a> return 6a href="+code=atomic_notifier_call_chain" class="sref">atomic_notifier_call_chain6/a>(&6a href="+code=netevent_notif_chain" class="sref">netevent_notif_chain6/a>,.6a href="+code= " class="sref"> 6/a>,.6a href="+code=v" class="sref"> 6/a>);e. 696/a>}e. 706/a>6a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL6/a>(6a href="+code=call_netevent_notifiers" class="sref">call_netevent_notifiers6/a>);e. 716/a>6/pre> The original LXR software by the LXR community6/a>,.this experimental versval by lxr@linux.no6/a>. 6/divue6div class="subfooter"> lxr.linux.no kindly hosted by Redpill Linpro AS6/a>,.provider of Linux consulting.and opera vals services since 1995. 6/divue 6/bodyue6/htmlue