next up previous contents index
Next: Forwarding Control Operations Up: Control Operations Previous: Standard Control Operations

Protocol-Specific Control Operations

 

While all protocols support the control operations enumerated above, it is not uncommon for any given protocol to also support a collection of protocol-specific opcodes. These opcodes can be associated with either both the protocol's session and protocol objects, or with just its session objects. These opcodes are defined relative to an identifier that has been assigned to each protocol (in the file include/upi.h). For example, the protocol ARP has been assigned the id ARP_CTL. Individual opcodes are then defined (in arp.h) as:

 
		#define ARP_INSTALL      		(ARP_CTL*MAXOPS + 0)

#define ARP_IPINTERFACES (ARP_CTL*MAXOPS + 1)

#define ARP_IPADDRS (ARP_CTL*MAXOPS + 2)

This scheme is used to ensure that all control opcodes are unique. By convention, protocol-specific opcodes defined by protocol XYZ are prefixed with XYZ_. Also, until an identifier has been assigned to a protocol being written (i.e., until it's been defined in upi.h), a set of temporary ids, TMP0_CTL, TMP1_CTL, ... TMP4_CTL, can be used.

Protocol-specific control operations are described in the manual page for each protocol in Appendix A.



Larry Peterson
Tue Jul 1 14:50:34 MST 1997