File: getrtype.2

package info (click to toggle)
lam 7.1.4-8
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 56,404 kB
  • sloc: ansic: 156,541; sh: 9,991; cpp: 7,699; makefile: 5,621; perl: 488; fortran: 260; asm: 83
file content (128 lines) | stat: -rw-r--r-- 3,213 bytes parent folder | download | duplicates (42)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
.TH GETRENT 2 "July, 2007" "LAM 7.1.4" "LAM NETWORK LIBRARY"
.hy 0
.SH NAME
getrent, getrentc, getroute, getroute2, getrtype 
\- Get LAM route information.
.SH C SYNOPSIS
.hy 1
.nf
#include <net.h>
#include <rreq.h>
#include <events.h>

int getrent (struct route *rent);
int getrentc (struct route *rent);
int getroute (struct nmsg *nhead);
int getroute2 (struct nmsg *nhead);
int getrtype (int nodeid);
.fi
.SH FORTRAN SYNOPSIS
.nf
integer function IGRTP (nodeid)
integer nodeid
.fi
.SH DESCRIPTION
These functions return information obtained from the local route daemon,
a modular component of the LAM daemon.
.I getrent()
and
.I getrentc()
accept a pointer to a route structure, defined in <rreq.h>:
.LP
.nf
.ta .5i 1i 1.5i
	struct route {
		int	r_nodeid;
		int	r_event;
		int	r_link;
		int	r_event2;
		int	r_link2;
		int	r_nodetype;
	};
.fi
.LP
The structure fields hold the following information.
.PP
.TP 12
r_nodeid
destination node ID
.TP
r_event
forwarding event, representing the best suggested route to the
destination node
.TP
r_link
forwarding link associated with r_event, if r_event is a datalink
output process
.TP
r_event2
secondary forwarding event, representing a non-reconvergent route
(primarily used for multicasting) with respect to other destinations
.TP
r_link2
forwarding link associated with r_event2, if r_event2 is a datalink
output process
.TP
r_nodetype
node type of destination node (see getntype(2))
.PP
.I getrent()
sends a request for route information to the route daemon.
The
.I r_nodeid
field must be set by the caller to the nodeid of the
destination node whose route table entry is required.
All other fields are filled by the function.
.PP
.I getrentc()
has the exact functionality of
.IR getrent() ,
except that it caches the recently accessed route table entries.
Later access to the same entries are faster.
.I getrentc()
first checks the cache for the route entry of the given nodeid.
If the entry is found, the requested information is returned.
Otherwise,
.I getrent()
is called, returning a copy of the route table entry from the route daemon.
This entry is then stored in the cache.
.PP
The remaining functions are wrappers for
.IR getrentc() .
.I getroute()
accepts a network message descriptor with the destination node and
event fields set and fills in the forwarding fields.
.I getroute2()
is similar to
.I getroute()
except that the secondary routing information is used.
.PP
.I getrtype()
accepts a node identifier and returns the type of that node.
.SH C RETURN VALUE
Upon successful completion of
.IR getrent() ,
.IR getrentc() ,
.IR getroute() ,
or
.IR getroute2() ,
0 is returned.
Otherwise, \-1 is returned and global error variable
.I errno
is set accordingly.
.I getrtype()
returns a valid node type when successful.
NOTNODETYPE (defined in <net.h>) is returned if an error occurs.
When an error occurs, these functions set the global variable
.I errno
to the appropriate error code.
.SH FORTRAN RETURN VALUE
.I IGRTP()
returns a valid node type when successful.
NOTNODETYPE (see CONSTANTS(5)) is returned if an error occurs.
.SH ERRORS
.TP 12
EBADNODE
The supplied node identifier does not exist.
.SH SEE ALSO
getntype(2), rrsetrents(2), CONSTANTS(5)