Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!ernie.Berkeley.EDU!sklower From: sklower@ernie.Berkeley.EDU (Keith Sklower) Newsgroups: comp.protocols.iso Subject: Re: looking for OSI protocol address format Message-ID: <31592@ucbvax.BERKELEY.EDU> Date: 29 Sep 89 13:20:08 GMT References: <472@excelan.COM> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: sklower@ernie.Berkeley.EDU.UUCP (Keith Sklower) Organization: University of California, Berkeley Lines: 34 In article <472@excelan.COM> fiona@excelan.com (Fiona Ho) writes: >Can anyone share with me the OSI protocol address format that you use in >your OSI implementation ? I'll apologize in advance for not drawing as neat diagrams as Fiona. (At the moment I'm working from home at 1200 baud). We plan to do something similar (here at Berkeley) except that we'll group all the lengths at the beginning so that you can easily locate the selectors via standard C constructs. Marshall Rose says that you must allow for 64 byte TSEL lengths. Also the 4.4BSD implementation will definitely allow for iso sockaddr's as big as you need; the 32byte structure shown here is a minimum. struct iso_addr { u_char isoa_len; /* length (in bytes) */ char isoa_genaddr[20]; /* general opaque address */ }; struct sockaddr_iso { u_char siso_len; /* total length */ u_char siso_family; /* family */ u_char siso_plen; /* presentation selector length */ u_char siso_slen; /* session selector length */ u_char siso_tlen; /* transport selector length */ struct iso_addr siso_addr; /* network address */ u_char siso_pad[6]; /* space for gosip v2 sels */ }; #define siso_nlen siso_addr.isoa_len #define siso_data siso_addr.isoa_genaddr #define TSEL(s) ((caddr_t)((s)->siso_data + (s)->siso_nlen)) #define SSEL(s) (TSEL(s) + (s)->siso_tlen) #define PSEL(s) (SSEL(s) + (s)->siso_slen)