summaryrefslogtreecommitdiffstats
path: root/sys/net/if_atm.h
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-05-05 16:35:52 +0000
committerharti <harti@FreeBSD.org>2003-05-05 16:35:52 +0000
commit4d2e2437c20e62618ad0958e7ab0502c29c759e0 (patch)
tree07086a2f5c777d2ccea4d0bdcec8c1f59fb51973 /sys/net/if_atm.h
parent1e484c95bf637cabbbb0bc1ff304f68bdb653f82 (diff)
downloadFreeBSD-src-4d2e2437c20e62618ad0958e7ab0502c29c759e0.zip
FreeBSD-src-4d2e2437c20e62618ad0958e7ab0502c29c759e0.tar.gz
Define a link layer MIB for ATM. Most fields of this MIB are needed by
ILMI daemons. Factor out common softc fields for all ATM interfaces that need to be externally visible into an ifatm structure and make the midway driver using this structure and fill the MIB.
Diffstat (limited to 'sys/net/if_atm.h')
-rw-r--r--sys/net/if_atm.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/sys/net/if_atm.h b/sys/net/if_atm.h
index b8a34a8..98f3b3b 100644
--- a/sys/net/if_atm.h
+++ b/sys/net/if_atm.h
@@ -37,6 +37,66 @@
* net/if_atm.h
*/
+/*
+ * Classification of ATM cards.
+ */
+#define ATM_DEVICE_UNKNOWN 0
+#define ATM_DEVICE_PCA200E 1 /* Fore/Marconi PCA200-E */
+#define ATM_DEVICE_HE155 2 /* Fore/Marconi HE155 */
+#define ATM_DEVICE_HE622 3 /* Fore/Marconi HE622 */
+#define ATM_DEVICE_ENI155P 4 /* Efficient networks 155p */
+#define ATM_DEVICE_ADP155P 5 /* Adaptec 155p */
+
+/* map to strings and vendors */
+#define ATM_DEVICE_NAMES \
+ { "Unknown", "Unknown" }, \
+ { "PCA200-E", "Fore/Marconi" }, \
+ { "HE155", "Fore/Marconi" }, \
+ { "HE622", "Fore/Marconi" }, \
+ { "ENI155p", "Efficient Networks" }, \
+ { "ADP155p", "Adaptec" },
+
+/*
+ * This is the common link layer MIB for all ATM interfaces. Much of the
+ * information here is needed for ILMI. This will be augmented by statistics
+ * at some point.
+ */
+struct ifatm_mib {
+ /* configuration data */
+ uint8_t device; /* type of card */
+ u_char esi[6]; /* end system identifier (MAC) */
+ uint32_t serial; /* card serial number */
+ uint32_t hw_version; /* card version */
+ uint32_t sw_version; /* firmware version (if any) */
+ uint32_t pcr; /* supported peak cell rate */
+ uint32_t media; /* physical media */
+ uint8_t vpi_bits; /* number of used bits in VPI field */
+ uint8_t vci_bits; /* number of used bits in VCI field */
+ uint16_t max_vpcs; /* maximum number of VPCs */
+ uint32_t max_vccs; /* maximum number of VCCs */
+};
+
+#ifdef _KERNEL
+/*
+ * Common fields for all ATM interfaces. Each driver's softc must start with
+ * this structure.
+ */
+struct ifatm {
+ struct ifnet ifnet; /* required by if_var.h */
+ struct ifatm_mib mib; /* exported data */
+ void *phy; /* usually SUNI */
+ void *ngpriv; /* netgraph link */
+};
+#endif
+
+/*
+ * Peak cell rates for various physical media. Note, that there are
+ * different opinions on what the correct values are.
+ */
+#define ATM_RATE_155M 353208
+#define ATM_RATE_622M 1412830
+#define ATM_RATE_24G 5651320
+
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
#define RTALLOC1(A,B) rtalloc1((A),(B))
#elif defined(__FreeBSD__)
OpenPOWER on IntegriCloud