*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> natm (4)              



NAME    [Toc]    [Back]

     natm -- Native Mode ATM protocol layer

DESCRIPTION    [Toc]    [Back]

     The BSD ATM software comes with a native mode ATM protocol layer which
     provides socket level access to AAL0 and AAL5 virtual circuits.  To
     enable this protocol layer, add
	   options NATM
     to your kernel configuration file and re-make the kernel (don't forget to
     do ``make clean'').

NATM API    [Toc]    [Back]

     The NATM layer uses a struct sockaddr_natm to specify a virtual circuit:

	   struct sockaddr_natm {
	     u_int8_t	   snatm_len;		   /* length */
	     u_int8_t	   snatm_family;	   /* AF_NATM */
	     char	   snatm_if[IFNAMSIZ];	   /* interface name */
	     u_int16_t	   snatm_vci;		   /* vci */
	     u_int8_t	   snatm_vpi;		   /* vpi */

     To create an AAL5 connection to a virtual circuit with VPI 0, VCI 201 one
     would use the following:

	     struct sockaddr_natm snatm;
	     int s, r;
				  /* note: PROTO_NATMAAL0 is AAL0 */
	     if (s < 0) { perror("socket"); exit(1); }
	     bzero(&snatm, sizeof(snatm));
	     snatm.snatm_len = sizeof(snatm);
	     snatm.snatm_family = AF_NATM;
	     sprintf(snatm.snatm_if, "en0");
	     snatm.snatm_vci = 201;
	     snatm.snatm_vpi = 0;
	     r = connect(s, (struct sockaddr *)&snatm, sizeof(snatm));
	     if (r < 0) { perror("connect"); exit(1); }
	     /* s now connected to ATM! */

     The socket() call simply creates an unconnected NATM socket.  The
     connect() call associates an unconnected NATM socket with a virtual circuit
 and tells the driver to enable that virtual circuit for receiving
     data.  After the connect() call one can read() or write() to the socket
     to perform ATM I/O.

Internal NATM operation    [Toc]    [Back]

     Internally, the NATM protocol layer keeps a list of all active virtual
     circuits on the system in natm_pcbs.  This includes circuits currently
     being used for IP to prevent NATM and IP from clashing over virtual circuit

     When a virtual circuit is enabled for receiving data, the NATM protocol
     layer passes the address of the protocol control block down to the driver
     as a receive ``handle''.  When inbound data arrives, the driver passes
     the data back with the appropriate receive handle.  The NATM layer uses
     this to avoid the overhead of a protocol control block lookup.  This
     allows us to take advantage of the fact that ATM has already demultiplexed
 the data for us.

CAVEAT    [Toc]    [Back]

     The NATM protocol support is subject to change as the ATM protocols
     develop.  Users should not depend on details of the current implementation,
 but rather the services exported.

SEE ALSO    [Toc]    [Back]

     en(4), fatm(4), hatm(4), natmip(4), patm(4)

AUTHORS    [Toc]    [Back]

     Chuck Cranor of Washington University implemented the NATM protocol layer
     along with the EN ATM driver in 1996 for NetBSD.

FreeBSD 5.2.1		       December 29, 1997		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
sppp OpenBSD point to point protocol network layer for synchronous lines
sppp FreeBSD point to point protocol network layer for synchronous lines
sbp_targ FreeBSD Serial Bus Protocol 2 (SBP-2) Target Mode devices driver
keyboard Tru64 Using keyboards for different native languages
naaagt HP-UX Native Agent Adapter (NAA)
nl_types IRIX native language data types
wdutil HP-UX manipulate Native Language I/O word dictionary
doublebuffer IRIX sets the display mode to double buffer mode
cmode IRIX sets color map mode as the current mode.
unicode_stop Linux put the console out of unicode mode (ie. in 8-bit mode).
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service