ng_ccatm.4 (143580) | ng_ccatm.4 (147432) |
---|---|
1.\" 2.\" Copyright (c) 2001-2004 3.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4.\" All rights reserved. 5.\" Copyright (c) 2005 6.\" Hartmut Brandt. 7.\" All rights reserved. 8.\" --- 15 unchanged lines hidden (view full) --- 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" | 1.\" 2.\" Copyright (c) 2001-2004 3.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4.\" All rights reserved. 5.\" Copyright (c) 2005 6.\" Hartmut Brandt. 7.\" All rights reserved. 8.\" --- 15 unchanged lines hidden (view full) --- 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" |
32.\" $FreeBSD: head/share/man/man4/ng_ccatm.4 143580 2005-03-14 14:04:02Z brueffer $ | 32.\" $FreeBSD: head/share/man/man4/ng_ccatm.4 147432 2005-06-16 18:46:17Z ru $ |
33.\" 34.Dd March 10, 2005 | 33.\" 34.Dd March 10, 2005 |
35.Dt ng_ccatm 4 36.Os FreeBSD | 35.Dt NG_CCATM 4 36.Os |
37.Sh NAME 38.Nm ng_ccatm | 37.Sh NAME 38.Nm ng_ccatm |
39.Nd netgraph ATM Call Control node type | 39.Nd "ATM Call Control netgraph node type" |
40.Sh SYNOPSIS | 40.Sh SYNOPSIS |
41.Fd #include <netnatm/unimsg.h> 42.Fd #include <netnatm/msg/unistruct.h> 43.Fd #include <netnatm/sig/unidef.h> 44.Fd #include <netnatm/api/unisap.h> 45.Fd #include <netnatm/api/atmapi.h> 46.Fd #include <netnatm/api/ccatm.h> 47.Fd #include <netgraph.h> 48.Fd #include <netgraph/ng_uni.h> 49.Fd #include <netgraph/ng_ccatm.h> | 41.In netnatm/unimsg.h 42.In netnatm/msg/unistruct.h 43.In netnatm/sig/unidef.h 44.In netnatm/api/unisap.h 45.In netnatm/api/atmapi.h 46.In netnatm/api/ccatm.h 47.In netgraph.h 48.In netgraph/ng_uni.h 49.In netgraph/ng_ccatm.h |
50.Sh DESCIPTION 51The 52.Nm 53node implements the API specified by the ATM Forum for access to ATM services | 50.Sh DESCIPTION 51The 52.Nm 53node implements the API specified by the ATM Forum for access to ATM services |
54(see ATM-Forum document af-saa-0108). | 54(see ATM-Forum document 55.Pa af-saa-0108 ) . |
55This document specifies the semantics 56of the API, not the exact language binding. | 56This document specifies the semantics 57of the API, not the exact language binding. |
57For this reason it is expected, that | 58For this reason, it is expected that |
58this implementation is neither compile-time nor binary compatible with 59other implementations of this API. 60It should, however, be fairly straightforward 61to convert between different API implementations. 62.Pp 63This node is usually stacked on top of one or more UNI nodes (see | 59this implementation is neither compile-time nor binary compatible with 60other implementations of this API. 61It should, however, be fairly straightforward 62to convert between different API implementations. 63.Pp 64This node is usually stacked on top of one or more UNI nodes (see |
64.Xr ng_uni 4 ). | 65.Xr ng_uni 4 ) . |
65Each of these hooks appears as a | 66Each of these hooks appears as a |
66.Ql port | 67.Dq port |
67to the user of the node. | 68to the user of the node. |
68It has also one hook connected to the ILMI daemon for management purposes. | 69It also has one hook connected to the ILMI daemon for management purposes. |
69.Pp 70The node is removed when it receives a 71.Dv NGM_SHUTDOWN | 70.Pp 71The node is removed when it receives a 72.Dv NGM_SHUTDOWN |
72messages or all hooks are disconnected. | 73messages or when all hooks are disconnected. |
73.Sh HOOKS 74The node understands a number of hooks with predefined names and an | 74.Sh HOOKS 75The node understands a number of hooks with predefined names and an |
75unlimited number of hooks for user connections. The predefined names are: 76.Bl -tag -width orphans 77.It Dv uniNNN | 76unlimited number of hooks for user connections. 77The predefined names are: 78.Bl -tag -width ".Va orphans" 79.It Va uni Ns Ar NNN |
78These hooks stack the 79.Nm 80node on top of a UNI stack. 81The node expects the interface on these hooks 82to conform to the upper interface specified in 83.Xr ng_uni 4 . 84These hooks are forced into queuing mode, so that there are no circular 85calls from call control to UNI and UNI back to call control. 86The | 80These hooks stack the 81.Nm 82node on top of a UNI stack. 83The node expects the interface on these hooks 84to conform to the upper interface specified in 85.Xr ng_uni 4 . 86These hooks are forced into queuing mode, so that there are no circular 87calls from call control to UNI and UNI back to call control. 88The |
87.Dv NNN | 89.Ar NNN |
88in the hook name is the decimal port number and should not be zero. 89The port number is a 32-bit unsigned integer. | 90in the hook name is the decimal port number and should not be zero. 91The port number is a 32-bit unsigned integer. |
90.It Dv manage | 92.It Va manage |
91This hook should be connected to the ILMI daemon. 92No data is ever sent on this hook and all received data is discarded. 93The hook is used to send control messages along. | 93This hook should be connected to the ILMI daemon. 94No data is ever sent on this hook and all received data is discarded. 95The hook is used to send control messages along. |
94.It Dv dump | 96.It Va dump |
95On receipt of a | 97On receipt of a |
96.Dv 97NGM_DUMP command a textual description of the current state of the node is sent | 98.Dv NGM_CCATM_DUMP 99command a textual description of the current state of the node is sent |
98out of this hook. 99This text is sent as one large message consisting of more 100than one | 100out of this hook. 101This text is sent as one large message consisting of more 102than one |
101.Fa mbuf . | 103.Vt mbuf . |
102.El 103.Pp 104All other hook names are taken to be user hooks and correspond to an | 104.El 105.Pp 106All other hook names are taken to be user hooks and correspond to an |
105ATM endpoint as specified in the ATM Forum document. The interface on these 106hooks is defined in 107.Pa atmapi.h | 107ATM endpoint as specified in the ATM Forum document. 108The interface on these hooks is defined in 109.In atmapi.h |
108and uses a structure 109.Bd -literal 110struct ccatm_op { 111 u_int32_t op; /* request code */ 112 u_char data[]; /* optional data */ 113}; 114.Ed 115.Pp --- 23 unchanged lines hidden (view full) --- 139 ATMOP_SET_CONNECTION_ATTRIBUTES_X, 140 ATMOP_QUERY_CONNECTION_ATTRIBUTES_X, 141 ATMOP_QUERY_STATE 142}; 143.Ed 144.Pp 145These codes correspond directly to the operations specified in the ATM 146Forum document with the following exceptions: | 110and uses a structure 111.Bd -literal 112struct ccatm_op { 113 u_int32_t op; /* request code */ 114 u_char data[]; /* optional data */ 115}; 116.Ed 117.Pp --- 23 unchanged lines hidden (view full) --- 141 ATMOP_SET_CONNECTION_ATTRIBUTES_X, 142 ATMOP_QUERY_CONNECTION_ATTRIBUTES_X, 143 ATMOP_QUERY_STATE 144}; 145.Ed 146.Pp 147These codes correspond directly to the operations specified in the ATM 148Forum document with the following exceptions: |
147.Bl -tag -width xxx | 149.Bl -tag -width indent |
148.It Dv ATMOP_RESP 149As discussed in | 150.It Dv ATMOP_RESP 151As discussed in |
150.Xr ng_uni 4 | 152.Xr ng_uni 4 , |
151this is used to | 153this is used to |
152.Ql synchronify | 154.Dq synchronify |
153the interface. | 155the interface. |
154The argument is a struct | 156The argument is a |
155.Bd -literal 156struct atm_resp { 157 int32_t resp; 158 uint32_t data; /* type of attached data */ 159}; 160.Ed 161.Pp 162If the response code | 157.Bd -literal 158struct atm_resp { 159 int32_t resp; 160 uint32_t data; /* type of attached data */ 161}; 162.Ed 163.Pp 164If the response code |
163.Fa resp | 165.Va resp |
164is zero, the node has accepted the user request. 165If something goes wrong, | 166is zero, the node has accepted the user request. 167If something goes wrong, |
166.Fa resp | 168.Va resp |
167contains an error code. 168For requests that return data, | 169contains an error code. 170For requests that return data, |
169.Fa data 170contains a code describing the type of data and the data itseld | 171.Va data 172contains a code describing the type of data and the data itself |
171starts immediately after the structure. 172.It Dv ATMOP_QUERY_CONNECTION_ATTRIBUTES_X 173This is the same as 174.Dv ATMOP_QUERY_CONNECTION_ATTRIBUTES 175except that it allows to query several attributes 176within one request. 177.It Dv ATMOP_SET_CONNECTION_ATTRIBUTES_X 178This is the same as 179.Dv ATMOP_SET_CONNECTION_ATTRIBUTES 180except that it allows to set several attributes 181within one request. 182The list of attributes is followed directly by the attributes in the same 183order as they appear in the list. 184.El 185.Pp | 173starts immediately after the structure. 174.It Dv ATMOP_QUERY_CONNECTION_ATTRIBUTES_X 175This is the same as 176.Dv ATMOP_QUERY_CONNECTION_ATTRIBUTES 177except that it allows to query several attributes 178within one request. 179.It Dv ATMOP_SET_CONNECTION_ATTRIBUTES_X 180This is the same as 181.Dv ATMOP_SET_CONNECTION_ATTRIBUTES 182except that it allows to set several attributes 183within one request. 184The list of attributes is followed directly by the attributes in the same 185order as they appear in the list. 186.El 187.Pp |
186If a user hook is disconnected an active connection on that hook is released. | 188If a user hook is disconnected, an active connection on that hook is released. |
187Incoming connections waiting to be accepted are reoffered to other | 189Incoming connections waiting to be accepted are reoffered to other |
188listeing hooks or rejected. | 190listening hooks or rejected. |
189.Sh CONTROL MESSAGES 190Besides the generic messages the node understands the following special 191messages: | 191.Sh CONTROL MESSAGES 192Besides the generic messages the node understands the following special 193messages: |
192.Bl -tag -width xxx | 194.Bl -tag -width indent |
193.It Dv NGM_CCATM_DUMP 194This causes the internal state of the node to be dumped in ASCII to the | 195.It Dv NGM_CCATM_DUMP 196This causes the internal state of the node to be dumped in ASCII to the |
195.Dv dump | 197.Va dump |
196hook. 197.It Dv NGM_CCATM_STOP | 198hook. 199.It Dv NGM_CCATM_STOP |
198This message causes all connections on that port to be aborted (not released!) | 200This message causes all connections on that port to be aborted (not released!\&) |
199and all ATM endpoints which are bound to that port to be closed. 200It stops processing of all messages from the UNI stack on that port UNI stack. 201The argument is a 202.Bd -literal 203struct ngm_ccatm_port { 204 uint32_t port; 205}; 206.Ed 207.Pp 208.It Dv NGM_CCATM_START 209Start processing on the port. 210The argument is a | 201and all ATM endpoints which are bound to that port to be closed. 202It stops processing of all messages from the UNI stack on that port UNI stack. 203The argument is a 204.Bd -literal 205struct ngm_ccatm_port { 206 uint32_t port; 207}; 208.Ed 209.Pp 210.It Dv NGM_CCATM_START 211Start processing on the port. 212The argument is a |
211.Fa ngm_ccatm_port | 213.Vt ngm_ccatm_port |
212structure. 213.It Dv NGM_CCATM_CLEAR 214This message takes a | 214structure. 215.It Dv NGM_CCATM_CLEAR 216This message takes a |
215.Fa ngm_ccatm_port | 217.Vt ngm_ccatm_port |
216structure and clears all prefixes and addresses on that port. 217If the port number is zero, all ports are cleared. 218.It Dv NGM_CCATM_GET_ADDRESSES 219Get the list of all registered addresses on the given port. 220The argument is a | 218structure and clears all prefixes and addresses on that port. 219If the port number is zero, all ports are cleared. 220.It Dv NGM_CCATM_GET_ADDRESSES 221Get the list of all registered addresses on the given port. 222The argument is a |
221.Fa ngm_ccatm_port | 223.Vt ngm_ccatm_port |
222structure and the result is a | 224structure and the result is a |
223.Fa ngm_ccatm_get_addresses | 225.Vt ngm_ccatm_get_addresses |
224structure: 225.Bd -literal 226struct ngm_ccatm_get_addresses { 227 uint32_t count; 228 struct ngm_ccatm_address_req addr[0]; 229}; 230struct ngm_ccatm_address_req { 231 u_int32_t port; 232 struct uni_addr addr; 233}; 234.Ed 235.Pp 236If the | 226structure: 227.Bd -literal 228struct ngm_ccatm_get_addresses { 229 uint32_t count; 230 struct ngm_ccatm_address_req addr[0]; 231}; 232struct ngm_ccatm_address_req { 233 u_int32_t port; 234 struct uni_addr addr; 235}; 236.Ed 237.Pp 238If the |
237.Fa port | 239.Va port |
238field is zero in the request, all addresses on all ports | 240field is zero in the request, all addresses on all ports |
239are returned, if it is not zero only the addresses on that port are reported. | 241are returned. 242If it is not zero, only the addresses on that port are reported. |
240The number of addresses is returned in the | 243The number of addresses is returned in the |
241.Fa count | 244.Va count |
242field. 243.It Dv NGM_CCATM_ADDRESS_REGISTERED 244This message is used by ILMI to inform the 245.Nm | 245field. 246.It Dv NGM_CCATM_ADDRESS_REGISTERED 247This message is used by ILMI to inform the 248.Nm |
246node, that a previous address registration request was successful. | 249node that a previous address registration request was successful. |
247This causes the node to activate that address. 248The argument to the message is a | 250This causes the node to activate that address. 251The argument to the message is a |
249.Fa ngm_ccatm_address_req | 252.Vt ngm_ccatm_address_req |
250structure. 251.It Dv NGM_CCATM_ADDRESS_UNREGISTERED 252This message is used by ILMI to inform the 253.Nm | 253structure. 254.It Dv NGM_CCATM_ADDRESS_UNREGISTERED 255This message is used by ILMI to inform the 256.Nm |
254node, that an address has been unregistered. | 257node that an address has been unregistered. |
255The node clears that address from its tables. 256The argument is a | 258The node clears that address from its tables. 259The argument is a |
257.Fa ngm_ccatm_address_req | 260.Vt ngm_ccatm_address_req |
258structure. 259.It Dv NGM_CCATM_SET_PORT_PARAM 260This request sets the parameters on the given port. 261The argument is a 262.Bd -literal 263struct ngm_ccatm_atm_port { 264 uint32_t port; /* port for which to set parameters */ 265 uint32_t pcr; /* port peak cell rate */ --- 5 unchanged lines hidden (view full) --- 271 uint8_t esi[6]; 272 uint32_t num_addr; 273}; 274.Ed 275.Pp 276This should be used only by ILMI and when that port is stopped and the 277address and prefix tables of that port are empty. 278The | 261structure. 262.It Dv NGM_CCATM_SET_PORT_PARAM 263This request sets the parameters on the given port. 264The argument is a 265.Bd -literal 266struct ngm_ccatm_atm_port { 267 uint32_t port; /* port for which to set parameters */ 268 uint32_t pcr; /* port peak cell rate */ --- 5 unchanged lines hidden (view full) --- 274 uint8_t esi[6]; 275 uint32_t num_addr; 276}; 277.Ed 278.Pp 279This should be used only by ILMI and when that port is stopped and the 280address and prefix tables of that port are empty. 281The |
279.Fa num_addr | 282.Va num_addr |
280field is ignored. 281.It Dv NGM_CCATM_GET_PORT_PARAM 282Retrieve the parameters of the given port. 283The argument is a | 283field is ignored. 284.It Dv NGM_CCATM_GET_PORT_PARAM 285Retrieve the parameters of the given port. 286The argument is a |
284.Fa ngm_ccatm_port | 287.Vt ngm_ccatm_port |
285and the result a | 288and the result a |
286.Fa ngm_ccatm_atm_port . | 289.Vt ngm_ccatm_atm_port . |
287.It Dv NGM_CCATM_GET_PORTLIST 288Get a list of all available ports on that node. 289This is returned as a 290.Bd -literal 291struct ngm_ccatm_portlist { 292 uint32_t nports; 293 uint32_t ports[]; 294}; 295.Ed 296.It Dv NGM_CCATM_GETSTATE 297Return the state of a port. 298The argument is a | 290.It Dv NGM_CCATM_GET_PORTLIST 291Get a list of all available ports on that node. 292This is returned as a 293.Bd -literal 294struct ngm_ccatm_portlist { 295 uint32_t nports; 296 uint32_t ports[]; 297}; 298.Ed 299.It Dv NGM_CCATM_GETSTATE 300Return the state of a port. 301The argument is a |
299.Fa struct ngm_ccatm_port | 302.Vt "struct ngm_ccatm_port" |
300and the return values as a | 303and the return values as a |
301.Ft uint32_t . | 304.Vt uint32_t . |
302.It Dv NGM_CCATM_SETLOG 303This requests sets a new logging level and returns the previous one. 304The argument is either a | 305.It Dv NGM_CCATM_SETLOG 306This requests sets a new logging level and returns the previous one. 307The argument is either a |
305.Ft uint32_t | 308.Vt uint32_t |
306in which case it specifies the new logging level, or may be empty 307in which case just the old level is returned as a | 309in which case it specifies the new logging level, or may be empty 310in which case just the old level is returned as a |
308.Ft uint32_t . | 311.Vt uint32_t . |
309.It Dv NGM_CCATM_RESET 310Reset the node. 311This is allowed only if the number of user hooks and connected UNI stacks is 312zero. 313.It Dv NGM_CCATM_GET_EXSTAT 314Return extended status information from the node. 315.El 316.Sh SEE ALSO 317.Xr netgraph 4 , 318.Xr ng_uni 4 , 319.Xr ngctl 8 | 312.It Dv NGM_CCATM_RESET 313Reset the node. 314This is allowed only if the number of user hooks and connected UNI stacks is 315zero. 316.It Dv NGM_CCATM_GET_EXSTAT 317Return extended status information from the node. 318.El 319.Sh SEE ALSO 320.Xr netgraph 4 , 321.Xr ng_uni 4 , 322.Xr ngctl 8 |
320.Sh AUTHOR | 323.Sh AUTHORS |
321.An Harti Brandt Aq harti@FreeBSD.org | 324.An Harti Brandt Aq harti@FreeBSD.org |