blob: 5516706d039c680adf02bb1c2780c02b638e519f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
/*++
Copyright (c) 1991 Microsoft Corporation
Module Name:
dl_proto.h
Abstract:
This module defines some of the data types and manifests for the
Spider Generic Ethernet Interface.
Author:
Eric Chin (ericc) August 9, 1991
Revision History:
Sam Patton (sampa) July 31, 1992 merge for snap/token ring
--*/
/*
* Spider STREAMS Data Link Interface Primitives
*
* Copyright (c) 1989 Spider Systems Limited
*
* This Source Code is furnished under Licence, and may not be
* copied or distributed without express written agreement.
*
* All rights reserved.
*
* Written by Mark Valentine
*
* Made in Scotland.
*
* @(#)dl_control.h 1.6
*
* Last delta created 14:58:43 2/12/92
* This file extracted 09:26:06 3/18/92
*
* Modifications:
*
* 28 Jan 1992 Modified for datalink version 2
*
*/
#ifndef DL_CTRL_INCLUDED
#define DL_CTRL_INCLUDED
#include <sys\snet\uint.h>
/*
* This defines Version 2 of Spider's STREAMS Data Link protocol.
* Its main feature is its ability to cope with hardware addresses
* of length not equal to 6.
*/
/*
* Data Link ioctl commands.
*
* To determine the version of the protocol in use, use the DATAL_VERSION
* command, and assume Version 0 if this fails with EINVAL. (Yuk.)
*
* The ETH_* commands will work for any current version of the protocol,
* but only for Ethernet drivers (hw_type == HW_ETHER).
*
* Hardware types are defined in dl_proto.h.
*/
#define DATAL_STAT ('E'<<8|1) /* gather data link statistics */
#define DATAL_ZERO ('E'<<8|2) /* reset data link statistics */
#define DATAL_REGISTER ('E'<<8|3) /* register data link type range */
#define DATAL_GPARM ('E'<<8|4) /* determine data link parameters */
#define DATAL_VERSION ('E'<<8|5) /* interrogate protocol version */
#define DATAL_SET_ADDR ('E'<<8|6) /* set hardware address */
#define DATAL_DFLT_ADDR ('E'<<8|7) /* restore default hardware address */
#define DATAL_IBIND ('D'<<8|1) /* bind card to stream */
/*
* Data Link statistics structure.
*/
struct datal_stat
{
uint32 dl_tx; /* packets transmitted */
uint32 dl_rx; /* packets received */
uint32 dl_coll; /* collisions detected */
uint32 dl_lost; /* packets lost */
uint32 dl_txerr; /* transmission errors */
uint32 dl_rxerr; /* receive errors */
uint32 dl_pool_quota; /* receive pool quota */
uint32 dl_pool_used; /* receive pool used */
};
struct datal_register
{
uint8 version; /* protocol version */
uint8 hw_type; /* hardware type */
uint8 addr_len; /* hardware address length */
uint8 align; /* don't use */
uint16 lwb; /* data link type (lower bound) */
uint16 upb; /* data link type (upper bound) */
};
struct datal_gparm
{
uint8 version; /* protocol version */
uint8 hw_type; /* hardware type */
uint8 addr_len; /* hardware address length */
uint8 align; /* don't use */
uint16 frgsz; /* max. packet size on net */
uint8 addr[1]; /* hardware address (variable length) */
};
struct datal_version
{
uint8 version; /* protocol version number */
uint8 hw_type; /* hardware type */
};
struct datal_ibind
{
ULONG UseRawArcnet; /* 0 if this open should use Encapsulated */
/* Ethernet over arcnet */
/* 1 if it should use raw arcnet frames */
STRING adapter_name; /* adapter device driver string */
char buffer[80]; /* buffer to contain the name */
};
#endif //DL_CTRL_INCLUDED
|