1 .\" $NetBSD: esis_design.nr,v 1.2 1998/01/09 06:34:45 perry Exp $
3 .NC "The Design of the ARGO Network Layer"
4 .sh 1 "End System to Intermediate System Routing Protocol"
6 The following sections describe the design of the End System to Intermediate
7 System (ES-IS) Routing Exchange Protocol.
10 - protocol involves sending/receiving hello pdus.
12 - when to send information
13 - when to discard information
14 - want to keep as much of the work outside of kernel
15 - only put functions and tables in kernel when necessary
16 .sh 2 "Supported Features (brief overview of each)"
17 - report configuration (both ES and IS)
18 - record configuration (both ES and IS)
19 - flush configuration (both ES and IS)
20 - query configuration (ES only)
21 - configuration response (ES only)
22 - request redirect (IS only)
23 - record redirect (ES only)
24 - flush old redirect (ES only)
25 - multicast vs. broadcast (using broadcast only)
26 .sh 2 "Kernel Resident Features"
27 .sh 3 "Support for PDU Transmission"
28 - need mechanism to send/receive PDUs
29 - use ES-IS socket (like raw socket)
30 - socket(AF_ISO, SOCK_DGRAM, ISOPROTO_ESIS)
32 - sendmsg() used for transmitting PDUS
33 - data will be pre-formed ES-IS PDU
34 - no checks will be made on the pdu format
35 - addr_snpa is the destination (to)
36 - before sending, socket must be associated with a particular interface
37 this is done via setsockopt():
38 ESISOPT_SETIF - option
39 buffer is name of interface, ie. "un0"
40 .sh 4 "Receiving PDUs"
41 - recvmsg() used for receiving PDUs
44 #define ESIS_CONFIG_RESP
45 #define ESIS_REDIR_REQ
46 struct esis_indication {
47 short ei_type; /* type of indication */
54 - no checks will be made on the pdu format
55 - addr_snpa is the source (from)
57 - ES-IS PDUs are sent to SNPA.
58 - addresses used are SN addresses, not NSAP addresses
59 - format of msg_name (part of msghdr) struct sockaddr_iso
60 afi = 0 /* means special snpa address */
61 isoa_u is struct addr_snpa
63 char sn_addr[7]; /* snpa addr */
65 isoa_len is number of bytes of sn_addr that are valid
67 - sn_addr may be a unicast or multicast address
68 - multicast addresses will be faked via broadcast addresses
69 .sh 3 "NSAP to SNPA translation"
70 - translation from NSAP to SNAP required for every CLNP PDU sent
71 - function provided by iso_nsap_to_snpa
73 iso_nsap_to_snpa(ifp, m, nsap, snpa)
74 struct ifnet *ifp; /* outgoing interface */
75 struct mbuf *m; /* pkt */
76 struct sockaddr_iso *nsap; /* destination address */
77 char *snpa; /* RESULT: snpa address */
79 if (nsap.afi == AFI_SNPAADDR) {
80 copy snpa addr from nsap into snpa
83 scan RIB for (RIB.nsap == nsap)
85 copy RIB.snpa into snpa
88 scan RIB for (RIB.type == IS) && (RIB.ifp = ifp)
90 copy RIB.snpa into snpa
93 if (ifp allows multicast) {
94 /* invoke query configuration function */
95 copy ifp.ifaddr.ifa_all_es into snpa
103 - NSAP to SNPA table resides in kernel so CLNP has quick access
104 - entries added/timed-out of table via user level ES-IS daemon
105 .sh 3 "Query Configuration Functon"
106 - invoked when iso_nsap_to_snpa
108 - does not find a match for dest nsap, and
109 - does not find a match for Any IS.
110 - clnp packet is sent to address "all ES" as specified in ifnet structure
111 (for now, this is just the broadcast address)
112 .sh 3 "Configuration Response Function"
113 - invoked by clnp_input(), after determining that the packet received is
114 destined for one of its NSAPs
115 - checks if sn_dst == "all ES" (for now, this is all hex ffs)
116 - if true, a copy of packet is made, and passed up to esis_input()