ng_atm - netgraph ATM node type
The atm nodes are persistent. They are removed when the interface is removed. NGM_SHUTDOWN messages are ignored by the node.
The four fixed hooks are:
Hooks for dynamically initiated VCIs can have whatever name is allowed by netgraph(4) as long as the name does not collide with one of the three predefined names.
To initiate packet sending an receiving on a dynamic hook one has to issue a NGM_ATM_CPCS_INIT control message. To terminate sending and receiving one must send a NGM_ATM_CPCS_TERM message (see Sx CONTROL MESSAGES ) . The data sent and received on these hooks has no additional headers.
struct ng_atm_config {
uint32_t pcr; /* peak cell rate */
uint32_t maxvpi; /* maximum vpi */
uint32_t maxvci; /* maximum vci */
uint32_t max_vpcs; /* maximum number of VPCs */
uint32_t max_vccs; /* maximum number of VCCs */
};
struct atmio_vcctable {
uint32_t count; /* number of vccs */
struct atmio_vcc vccs[0]; /* array of VCCs */
};
struct atmio_vcc {
uint16_t flags; /* flags */
uint16_t vpi; /* VPI */
uint16_t vci; /* VCI */
uint16_t rmtu; /* Receive maximum CPCS size */
uint16_t tmtu; /* Transmit maximum CPCS size */
uint8_t aal; /* aal type */
uint8_t traffic; /* traffic type */
struct atmio_tparam tparam; /* traffic parameters */
};
struct atmio_tparam {
uint32_t pcr; /* 24bit: Peak Cell Rate */
uint32_t scr; /* 24bit: VBR Sustainable Cell Rate */
uint32_t mbs; /* 24bit: VBR Maximum burst size */
uint32_t mcr; /* 24bit: MCR */
uint32_t icr; /* 24bit: ABR ICR */
uint32_t tbe; /* 24bit: ABR TBE (1...2^24-1) */
uint8_t nrm; /* 3bit: ABR Nrm */
uint8_t trm; /* 3bit: ABR Trm */
uint16_t adtf; /* 10bit: ABR ADTF */
uint8_t rif; /* 4bit: ABR RIF */
uint8_t rdf; /* 4bit: ABR RDF */
uint8_t cdf; /* 3bit: ABR CDF */
};
Note that this is the driver's table, so all VCCs opened via natm(4) sockets and IP are also shown. They can, however, be distinguished by their flags. The flags field contains the following flags:
If the ATM_FLAG_NG flag is set, then traffic and tparam contain meaningful information.
The aal field contains one of the following values:
The traffic field can have one of the following values (not all drivers support all traffic types however):
struct ng_atm_cpcs_init {
char name[NG_HOOKSIZ];
uint32_t flags; /* flags. (if_natmio.h) */
uint16_t vci; /* VCI to open */
uint16_t vpi; /* VPI to open */
uint16_t rmtu; /* receive maximum PDU */
uint16_t tmtu; /* transmit maximum PDU */
uint8_t aal; /* AAL type (if_natmio.h) */
uint8_t traffic; /* traffic type (if_natmio.h) */
uint32_t pcr; /* Peak cell rate */
uint32_t scr; /* Sustainable cell rate */
uint32_t mbs; /* Maximum burst size */
uint32_t mcr; /* Minimum cell rate */
uint32_t icr; /* ABR: Initial cell rate */
uint32_t tbe; /* ABR: Transmit buffer exposure */
uint8_t nrm; /* ABR: Nrm */
uint8_t trm; /* ABR: Trm */
uint16_t adtf; /* ABR: ADTF */
uint8_t rif; /* ABR: RIF */
uint8_t rdf; /* ABR: RDF */
uint8_t cdf; /* ABR: CDF */
};
The name field is the name of the hook for which sending and receiving should be enabled. This hook must already be connected. The vpi and vci fields are the respective VPI and VCI values to use for the ATM cells. They must be within the range, given by the maxvpi and maxvci fields of the Vt ng_atm_config structure. The flags field contains the flags (see above) and the other fields describe the type of traffic.
struct ng_atm_cpcs_term {
char name[NG_HOOKSIZ];
};
struct ng_atm_carrier_change {
uint32_t node;
uint32_t state;
};
The node field is the node ID of the ATM node. This can be used by the managing entity (for example ilmid(8)) to manage several interfaces at the same time through the same node. The state field is 1 if the carrier was detected, and 0 if it was lost.
struct ng_atm_vcc_change {
uint32_t node;
uint16_t vci;
uint8_t vpi;
uint8_t state;
};
Where
state
is 0 if the PVC was deleted, and 1 if it was added or modified.
|
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |