() (****************************************************************) () (Copyright (c) 1992, Carnegie Mellon University) () (All Rights Reserved) () (Permission is hereby granted to use, copy, modify, and) (distribute this software provided that the above copyright) (notice appears in all copies and that any distribution be for) (noncommercial purposes.) () (Carnegie Mellon University disclaims all warranties with regard) (to this software. In no event shall Carnegie Mellon University) (be liable for any special, indirect, or consequential damages) (or any damages whatsoever resulting from loss of use, data, or) (profits arising out of or in connection with the use or) (performance of this software.) () (****************************************************************) () (This file processed with symbol generator: 27-MAY-1991 17:21:36.37.) (Designing a Transport\Transport_Appendix)

There are three thing to to keep in mind when designing an IP transport for CMU-OpenVMS/IP: (UNNUMBERED) The structure of the transport image The transport entry points delivery of incoming datagrams (TRANSPORT STRUCTURE\CMUIP_TRAN_1)

IP transports for CMU-OpenVMS/IP are implemented as run-time loadable images. They must provide one VMS entrypoint, for transport initialization, which is labeled with a global symbol called DRV$TRANSPORT_INIT. The IPACP passes control to this entry point with the SYS$CALLG system service. After doing whatever it has to do, the DRV$TRANSPORT_INIT routine must return the address of an ititalized Device_Info_Structure.

See the (VMS Linker Utility Manual) for an in depth discussion of shareable run-time loadable images. (TRANSPORT ENTRY POINTS\CMUIP_TRAN_2)

The transport must provide four transport routines: (DI$Init\CMUIP_TRAN_3)

This routine is called when the IPACP is started. DI$Init ( Dev_config , IPACP_Int , max_retry , MPBS )

Where: (UNNUMBERED) (Dev_config) is the address of the device configuration entry for this interface. This structure is described in (dev_config_sect). (IPACP_Int) is the address of the IPACP's information block. This block, which contains entry point's back into the IPACP, is described in (IPACP_Int_sect). (max_retry) is the maximum number of time which the transport should rety a network read before restarting the controller. (max_retry) is passed by value. (MPBS) is the Maximum Physical Buffer Size. This is the size of the largest segment that the IPACP will transmit or receive. (DI$Xmit\CMUIP_TRAN_4)

This routine is called by the IPACP to transmit an IP datagram. DI$Xmit ( Dev_config )

Where: (UNNUMBERED) (Dev_config) is the address of the device configuration entry for this interface. This structure is described in (dev_config_sect). (DI$Dump\CMUIP_TRAN_5)

Provide the IPACP with device-specific information (eg. an ARP cache). DI$Dump ( Dev_config , funct , arg , buffer , sizeAdrs )

Where: (UNNUMBERED) (Dev_config) is the address of the device configuration entry for this interface. This structure is described in (dev_config_sect). (funct) is a device-specific argument describing the type of information requested. The transport may interpret this argument any way it likes. (arg) is an additional device-specific argument which acts as a parameter to the function described by the (funct) argument. (buffer) is the address of a buffer into which the transport must dump it's information. (sizeAdrs) is the address of a longword which contains the size of the data buffer. The dump routine, before exiting, must fill this longword with the number of bytes it has written into the buffer. (DI$Check\CMUIP_TRAN_6)

This routine is called when the device is offline and shouldn't be. If the device is still offline, this routine should return a 0. Otherwise it should return a -1. DI$Check ( Dev_config , funct , arg , buffer , sizeAdrs )

Where: (UNNUMBERED) (Dev_config) is the address of the device configuration entry for this interface. This structure is described in (dev_config_sect). (Delivery of incoming data\CMUIP_TRAN_7)

The transport should call this routine whenever it receives an IP datagram from the physical medium. IP_Receive ( Buf , Buf_size , IPHdr , devlen , dev_config )

Where: (UNNUMBERED) (Buf) is the address of a buffer which holds the IP datagram to be delivered. The IP header is not necessaril located at the beginning of the buffer. Frequently, (Buf) was allocated from the IPACP and used to read in the physical network header in addition to the IP datagram. (Buf_size) is the length, in bytes, of the buffer. This parameter is used to deallocate the buffer. (Buf_size) is not necessarily the number of bytes read off the physical network. (IPHdr) is the address of the IP datagram contained within the buffer. (devlen) is the number of bytes in the buffer which were generated by the transport. (Dev_config) is the address of the device configuration entry for this interface. This structure is described in (dev_config_sect). (IP transport data structures\CMUIP_TRAN_8) (Device_Info_Structure\CMUIP_TRAN_9)

This structure is used by the transport to inform the IPACP of it's entry points. Normally it is declared as part of the image's data segment and it's address, after it's been filled in, is returned by the transport's DRV$TRANSPORT_INIT routine. The structure is shown in (TRANS_DIS). (Device_Info_Structure\TRANS_DIS) (4\20\5\6) (Field\Len\Off\Use) (DI$Init\32\0\Set up to communicate) (DI$Xmit\32\4\Transmit a datagram) (DI$Dump\32\8\Return device-specific information) (DI$Check\32\12\Check if operating) (IPACP Information block\IPACP_Int_sect)

This structure is assembled by the IPACP to describe itself to other modules who wish to interact with it. It consists of entry points, literals, and pointers to global parameters. The structure is shown in (STRUCTS_IPACPINFO).

Defined in NETCONFIG.REQ (Network Device Configuration blockvector Entry Fields.\dev_config_sect)

This structure represents the IPACP's link with an IP transport and is shown in (STRUCTS_NDCE).

Defined in NETCONFIG.REQ (Ethernet transport control block\CMUIP_TRAN_14)

This structure represents the EtherNet transport's side of the Ethernet interface. It is provided as an example of a device-specific transport control block. The structure is shown in (STRUCTS_XEIS).