Browse Source

Added plug_plug()

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
0898b0b3b1
2 changed files with 16 additions and 0 deletions
  1. 15
    0
      src/core/interface.c
  2. 1
    0
      src/include/gpxe/interface.h

+ 15
- 0
src/core/interface.c View File

@@ -42,3 +42,18 @@ void plug ( struct interface *intf, struct interface *dest ) {
42 42
 	ref_get ( dest->refcnt );
43 43
 	intf->dest = dest;
44 44
 }
45
+
46
+/**
47
+ * Plug two interfaces together
48
+ *
49
+ * @v a			Interface A
50
+ * @v b			Interface B
51
+ *
52
+ * Plugs interface A into interface B, and interface B into interface
53
+ * A.  (The basic plug() function is unidirectional; this function is
54
+ * merely a shorthand for two calls to plug(), hence the name.)
55
+ */
56
+void plug_plug ( struct interface *a, struct interface *b ) {
57
+	plug ( a, b );
58
+	plug ( b, a );
59
+}

+ 1
- 0
src/include/gpxe/interface.h View File

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

Loading…
Cancel
Save