diff options
author | Michael Brown | 2007-04-30 03:23:01 +0200 |
---|---|---|
committer | Michael Brown | 2007-04-30 03:23:01 +0200 |
commit | 0898b0b3b1a63a3e95a1c73ebee02d5cf0532607 (patch) | |
tree | f7fcbadacdeca88956cce89eb7da3ed81bcc21b6 /src/core/interface.c | |
parent | Add (and use) generic reference counter, to improve signal:noise ratio (diff) | |
download | ipxe-0898b0b3b1a63a3e95a1c73ebee02d5cf0532607.tar.gz ipxe-0898b0b3b1a63a3e95a1c73ebee02d5cf0532607.tar.xz ipxe-0898b0b3b1a63a3e95a1c73ebee02d5cf0532607.zip |
Added plug_plug()
Diffstat (limited to 'src/core/interface.c')
-rw-r--r-- | src/core/interface.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/interface.c b/src/core/interface.c index 8498425c..0f4cd55f 100644 --- a/src/core/interface.c +++ b/src/core/interface.c @@ -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 ); +} |