1
2 #ifndef _IEEE1394_GUID_H
3 #define _IEEE1394_GUID_H
4
5
6 /*
7 * General information: Finding out which GUID belongs to which node is done by
8 * sending packets and therefore waiting for the answers. Wherever it is
9 * mentioned that a node is inaccessible this could just as well mean that we
10 * just don't know yet (usually, bus reset handlers can't rely on GUIDs being
11 * associated with current nodes).
12 */
13
14 struct guid_entry;
15 typedef struct guid_entry *hpsb_guid_t;
16
17
18 /*
19 * Returns a guid handle (which has its reference count incremented) or NULL if
20 * there is the GUID in question is not known of. Getting a valid handle does
21 * not mean that the node with this GUID is currently accessible (might not be
22 * plugged in or powered down).
23 */
24 hpsb_guid_t hpsb_guid_get_handle(u64 guid);
25
26 /*
27 * If the handle refers to a local host, this function will return the pointer
28 * to the hpsb_host structure. It will return NULL otherwise. Once you have
29 * established it is a local host, you can use that knowledge from then on (the
30 * GUID won't wander to an external node).
31 *
32 * Note that the local GUID currently isn't collected, so this will always
33 * return NULL.
34 */
35 struct hpsb_host *hpsb_guid_localhost(hpsb_guid_t handle);
36
37 /*
38 * This will fill in the given, pre-initialised hpsb_packet with the current
39 * information from the GUID handle (host, node ID, generation number). It will
40 * return false if the node owning the GUID is not accessible (and not modify the
41 * hpsb_packet) and return true otherwise.
42 *
43 * Note that packet sending may still fail in hpsb_send_packet if a bus reset
44 * happens while you are trying to set up the packet (due to obsolete generation
45 * number). It will at least reliably fail so that you don't accidentally and
46 * unknowingly send your packet to the wrong node.
47 */
48 int hpsb_guid_fill_packet(hpsb_guid_t handle, struct hpsb_packet *pkt);
49
50
51 void init_ieee1394_guid(void);
52
53
54 #endif /* _IEEE1394_GUID_H */
55
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.