summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/interface.h
blob: 6ec9b1463738a18a92a0abb8f7d1668d91f9d71b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef _GPXE_INTERFACE_H
#define _GPXE_INTERFACE_H

/** @file
 *
 * Object communication interfaces
 *
 */

#include <gpxe/refcnt.h>

/** An object communication interface */
struct interface {
	/** Destination interface
	 *
	 * When messages are sent via this interface, they will be
	 * delivered to the destination interface.
	 *
	 * This pointer may never be NULL.  When the interface is
	 * unplugged, it should point to a null interface.
	 */
	struct interface *dest;
	/** Reference counter
	 *
	 * If this interface is not part of a reference-counted
	 * object, this field may be NULL.
	 */
	struct refcnt *refcnt;
};

extern void plug ( struct interface *intf, struct interface *dest );

#endif /* _GPXE_INTERFACE_H */