2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-24 04:01:33 +00:00

Added plug_plug()

This commit is contained in:
Michael Brown 2007-04-30 01:23:01 +00:00
parent d40761d725
commit 0898b0b3b1
2 changed files with 16 additions and 0 deletions

View File

@ -42,3 +42,18 @@ void plug ( struct interface *intf, struct interface *dest ) {
ref_get ( dest->refcnt );
intf->dest = dest;
}
/**
* Plug two interfaces together
*
* @v a Interface A
* @v b Interface B
*
* Plugs interface A into interface B, and interface B into interface
* A. (The basic plug() function is unidirectional; this function is
* merely a shorthand for two calls to plug(), hence the name.)
*/
void plug_plug ( struct interface *a, struct interface *b ) {
plug ( a, b );
plug ( b, a );
}

View File

@ -29,5 +29,6 @@ struct interface {
};
extern void plug ( struct interface *intf, struct interface *dest );
extern void plug_plug ( struct interface *a, struct interface *b );
#endif /* _GPXE_INTERFACE_H */