|
|
1.1 ! root 1: % run this through LaTeX with the appropriate wrapper ! 2: ! 3: \chapter {Defining New Services}\label{services} ! 4: There are several components which are manipulated when a service is invoked. ! 5: Briefly, ! 6: let us consider how to define a new service. ! 7: There are three databases to be managed: ! 8: \begin{describe} ! 9: \item[isoentities:] which maintains the mappings between application-entity ! 10: information and presentation addresses ! 11: (described in Chapter~\ref{isoentities}); ! 12: ! 13: \item[isobjects:] which maintains the mappings between object descriptors and ! 14: object identifiers ! 15: (described in Chapter~\ref{isobjects}); ! 16: and, ! 17: ! 18: \item[isoservices:] which maintains the mappings between textual descriptions ! 19: of services, service selectors, and local programs ! 20: (described in Chapter~\ref{isoservices} of \voltwo/). ! 21: \end{describe} ! 22: ! 23: For the remainder of this chapter, ! 24: consider any fictitious service ! 25: with suffix \verb"servicestore" ! 26: (e.g., for the host \verb"gremlin", ! 27: the service might be known as \verb"gremlin-servicestore"), ! 28: and with an application context name of \verb*"local service". ! 29: ! 30: There are many ways in which the mappings can be performed. ! 31: Two approaches are described in this chapter. ! 32: If you wish to use a different variation, ! 33: then presumably you know enough about what you are doing not to need ! 34: additional documentation here! ! 35: ! 36: \section {Standard Services}\label{service:standard} ! 37: The ``standard'' approach is the simplest and most straight-forward mapping ! 38: strategy. ! 39: ! 40: First, ! 41: the abstract syntax {\em presentation context information\/} (PCI) of ! 42: the service, ! 43: along with the {\em application context\/} of the service should be defined. ! 44: These are object identifiers (as described in Section~\ref{psap:oid} on ! 45: page~\pageref{psap:oid}). ! 46: The object identifier tree \verb"1.17.2" has been usurped for ! 47: defining local services using {\em The ISO Development Environment}. ! 48: Choose \verb"n", ! 49: where \verb"n" is the lowest unassigned number in the \verb"1.17.2.n" subtree, ! 50: for use by the service ! 51: (\verb"n" should be an integer greater than \verb"0"). ! 52: Now edit the \man isobjects(5) file thusly: ! 53: \begin{quote}\small\begin{verbatim} ! 54: "local service pci" 1.17.2.n.1 ! 55: "local service" 1.17.2.n.2 ! 56: \end{verbatim}\end{quote} ! 57: ! 58: Next, ! 59: the template for the {\em application-entity information\/} and ! 60: {\em presentation address\/} of the service should be defined. ! 61: These are used for outgoing connections. ! 62: The application-entity information portion is currently an object identifier, ! 63: from the \verb"1.17.4.1" subtree. ! 64: The presentation address portion is a presentation selector, ! 65: a session selector, a transport selector, and a set of network addresses. ! 66: Currently, the convention is to use empty presentation and session selectors, ! 67: a unique transport selector, ! 68: and a simple default template for the network addresses ! 69: (the templates will be filled-in during connection establishment). ! 70: The choice of a transport selector is troublesome; ! 71: for the present, ! 72: a 16--bit binary selector space is suggested. ! 73: Choose \verb"p", ! 74: where \verb"p" is the lowest unassigned TSAP ID between \verb"1024" and ! 75: \verb"2047" inclusive. ! 76: Now edit the \man isoentities(5) file thusly: ! 77: \begin{quote}\small\begin{verbatim} ! 78: default servicestore 1.17.4.1.n "" "" #p/ ! 79: \end{verbatim}\end{quote} ! 80: ! 81: Finally, ! 82: the program on the local system implementing the service should be defined. ! 83: This is used for incoming connections. ! 84: Given the strategy used for allocating presentation addresses above, ! 85: one need only map between a transport selector and a program. ! 86: Edit the \man isoservices(5) thusly: ! 87: \begin{quote}\small\begin{verbatim} ! 88: "tsap/servicestore" #p program arg1 arg2 ... argN ! 89: \end{verbatim}\end{quote} ! 90: ! 91: \section {GOSIP Services}\label{service:gosip} ! 92: The U.S.~Government OSI Profile\cite{US.GOSIP} specifies a somewhat different ! 93: mapping strategy. ! 94: Rather than list the differences, ! 95: the entire process is described here. ! 96: ! 97: First, ! 98: the abstract syntax {\em presentation context information\/} (PCI) of the ! 99: service, ! 100: along with the {\em application context\/} of the service should be defined. ! 101: These are object identifiers (as described in Section~\ref{psap:oid} on ! 102: page~\pageref{psap:oid}). ! 103: As previously described, ! 104: the object identifier tree \verb"1.17.2" is used to define local services. ! 105: Choose \verb"n", ! 106: where \verb"n" is the lowest unassigned number in the \verb"1.17.2.n" subtree, ! 107: for use by the service ! 108: (\verb"n" should be an integer greater than \verb"0"). ! 109: Now edit the \man isobjects(5) file thusly: ! 110: \begin{quote}\small\begin{verbatim} ! 111: "local service pci" 1.17.2.n.1 ! 112: "local service" 1.17.2.n.2 ! 113: \end{verbatim}\end{quote} ! 114: ! 115: Next, ! 116: the template for the {\em application-entity information\/} and ! 117: {\em presentation address\/} of the service should be defined. ! 118: These are used for outgoing connections. ! 119: The application-entity information portion is currently an object identifier, ! 120: from the \verb"1.17.4.1" subtree. ! 121: The presentation address portion is a presentation selector, ! 122: a session selector, a transport selector, and a set of network addresses. ! 123: Currently, the convention is to use a unique presentation selector, ! 124: along with standard values for the session and transport selectors, ! 125: and a simple default template for the network addresses ! 126: (the templates will be filled-in during connection establishment). ! 127: The choice of the selectors is mandated by GOSIP: ! 128: a 16--bit binary selector space is used. ! 129: Choose \verb"p", ! 130: where \verb"p" is the lowest unassigned PSAP ID between \verb"1024" and ! 131: \verb"2047" inclusive. ! 132: Now edit the \man isoentities(5) file thusly: ! 133: \begin{quote}\small\begin{verbatim} ! 134: default servicestore 1.17.4.1.n #p/#1/#1/ ! 135: \end{verbatim}\end{quote} ! 136: ! 137: Finally, ! 138: the program on the local system implementing the service should be defined. ! 139: This is used for incoming connections. ! 140: Given the strategy used for allocating presentation addresses above, ! 141: one need only map between a presentation selector and a program. ! 142: Edit the \man isoservices(5) thusly: ! 143: \begin{quote}\small\begin{verbatim} ! 144: "psap/servicestore" #p program arg1 arg2 ... argN ! 145: \end{verbatim}\end{quote} ! 146: ! 147: This strategy is less efficient than the first approach as it requires the ! 148: \man tsapd(8c) daemon to parse more information from the remote peer prior to ! 149: invoking the program which implements desired application context. ! 150: ! 151: \section {Static Servers}\label{static:services} ! 152: In Section~\ref{acs:server}, ! 153: two different server disciplines, ! 154: the dynamic and the static approaches, ! 155: were described. ! 156: Thus far, ! 157: this chapter has described the dynamic approach. ! 158: The distinguishing mechanism of this discipline is that the entry in the ! 159: \man isoentities(5) file specifies \verb"default" for the host portion of the ! 160: service, e.g., ! 161: \begin{quote}\small\begin{verbatim} ! 162: default servicestore 1.17.4.1.n #p/#1/#1/ ! 163: \end{verbatim}\end{quote} ! 164: ! 165: To implement the static server discipline, ! 166: as described in Section~\ref{acs:server}, ! 167: one defines the service for a particular host and specifies the non-standard ! 168: network (sub)address that the service exists on. ! 169: For example: ! 170: \begin{quote}\small\begin{verbatim} ! 171: gremlin imagestore 1.17.4.1.n \ ! 172: #p/#1/#1/Internet=gremlin+17000 ! 173: \end{verbatim}\end{quote} ! 174: Indicates that the service \verb"gremlin-imagestore" is available only by ! 175: using the TCP network service to the host \verb"gremlin" and then using TCP ! 176: port \verb"17000". ! 177: Similar definitions may be made for hosts using an X.25 service. ! 178: Further, ! 179: as is the case with any entry in the \man isoentities(5) file, ! 180: multiple network address may be present for a single service. ! 181: In these cases, ! 182: the server listens on all of these addresses. ! 183: ! 184: After making a suitable definition in the \man isoentities(5) file, ! 185: the server program must be started ! 186: (either by hand or automatically from some system startup file, ! 187: e.g., \file{/etc/rc.local}) without any arguments. ! 188: The server program, ! 189: using the \verb"isodeserver" routine described on page~\pageref{isodeserver} ! 190: will then perform the appropriate actions to start listening on the desired ! 191: addresses.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.