1GETRENT(2)                    LAM NETWORK LIBRARY                   GETRENT(2)
2
3
4

NAME

6       getrent,  getrentc,  getroute,  getroute2,  getrtype  -  Get  LAM route
7       information.
8

C SYNOPSIS

10       #include <net.h>
11       #include <rreq.h>
12       #include <events.h>
13
14       int getrent (struct route *rent);
15       int getrentc (struct route *rent);
16       int getroute (struct nmsg *nhead);
17       int getroute2 (struct nmsg *nhead);
18       int getrtype (int nodeid);
19

FORTRAN SYNOPSIS

21       integer function IGRTP (nodeid)
22       integer nodeid
23

DESCRIPTION

25       These functions return information obtained from the local  route  dae‐
26       mon,  a  modular component of the LAM daemon.  getrent() and getrentc()
27       accept a pointer to a route structure, defined in <rreq.h>:
28
29            struct route {
30                 int  r_nodeid;
31                 int  r_event;
32                 int  r_link;
33                 int  r_event2;
34                 int  r_link2;
35                 int  r_nodetype;
36            };
37
38       The structure fields hold the following information.
39
40       r_nodeid    destination node ID
41
42       r_event     forwarding event, representing the best suggested route  to
43                   the destination node
44
45       r_link      forwarding  link  associated  with r_event, if r_event is a
46                   datalink output process
47
48       r_event2    secondary forwarding event, representing a non-reconvergent
49                   route  (primarily  used  for  multicasting) with respect to
50                   other destinations
51
52       r_link2     forwarding link associated with r_event2, if r_event2 is  a
53                   datalink output process
54
55       r_nodetype  node type of destination node (see getntype(2))
56
57       getrent()  sends  a  request for route information to the route daemon.
58       The r_nodeid field must be set by the caller to the nodeid of the  des‐
59       tination  node  whose  route table entry is required.  All other fields
60       are filled by the function.
61
62       getrentc() has the exact functionality of  getrent(),  except  that  it
63       caches  the recently accessed route table entries.  Later access to the
64       same entries are faster.  getrentc() first checks  the  cache  for  the
65       route  entry of the given nodeid.  If the entry is found, the requested
66       information is returned.  Otherwise, getrent() is called,  returning  a
67       copy  of  the  route  table entry from the route daemon.  This entry is
68       then stored in the cache.
69
70       The remaining functions are wrappers for  getrentc().   getroute()  ac‐
71       cepts  a network message descriptor with the destination node and event
72       fields set and fills in the forwarding fields.  getroute2() is  similar
73       to getroute() except that the secondary routing information is used.
74
75       getrtype() accepts a node identifier and returns the type of that node.
76

C RETURN VALUE

78       Upon  successful  completion  of  getrent(), getrentc(), getroute(), or
79       getroute2(), 0 is returned.  Otherwise, -1 is returned and global error
80       variable  errno  is  set  accordingly.  getrtype() returns a valid node
81       type when successful.  NOTNODETYPE (defined in <net.h>) is returned  if
82       an  error occurs.  When an error occurs, these functions set the global
83       variable errno to the appropriate error code.
84

FORTRAN RETURN VALUE

86       IGRTP() returns a valid node type when  successful.   NOTNODETYPE  (see
87       CONSTANTS(5)) is returned if an error occurs.
88

ERRORS

90       EBADNODE    The supplied node identifier does not exist.
91

SEE ALSO

93       getntype(2), rrsetrents(2), CONSTANTS(5)
94
95
96
97LAM 7.1.2                         March, 2006                       GETRENT(2)
Impressum