mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
- Define payload length constants for 4Mbps and 16Mbps.
- Use explicit sizes for header structure fields. - Use __attribute__ ((__packed__)) for header structures. - Define struct iso88025_rif; for future use. - Prototype upcoming iso88025_ifdetach() - Get rid of __P() constructs in prototypes.
This commit is contained in:
parent
a19e33bde9
commit
09efa444d5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74407
@ -75,7 +75,9 @@
|
||||
* Minimum and maximum packet payload lengths.
|
||||
*/
|
||||
#define ISO88025_MIN_LEN 0
|
||||
#define ISO88025_MAX_LEN 17960
|
||||
#define ISO88025_MAX_LEN_4 4464
|
||||
#define ISO88025_MAX_LEN_16 17960
|
||||
#define ISO88025_MAX_LEN ISO88025_MAX_LEN_16
|
||||
|
||||
/*
|
||||
* A macro to validate a length with
|
||||
@ -87,13 +89,18 @@
|
||||
* ISO 802.5 physical header
|
||||
*/
|
||||
struct iso88025_header {
|
||||
u_char ac; /* access control field */
|
||||
u_char fc; /* frame control field */
|
||||
u_char iso88025_dhost[ISO88025_ADDR_LEN]; /* destination address */
|
||||
u_char iso88025_shost[ISO88025_ADDR_LEN]; /* source address */
|
||||
u_short rcf; /* route control field */
|
||||
u_short rd[RIF_MAX_RD]; /* routing designators */
|
||||
};
|
||||
u_int8_t ac; /* access control field */
|
||||
u_int8_t fc; /* frame control field */
|
||||
u_int8_t iso88025_dhost[ISO88025_ADDR_LEN]; /* destination address */
|
||||
u_int8_t iso88025_shost[ISO88025_ADDR_LEN]; /* source address */
|
||||
u_int16_t rcf; /* route control field */
|
||||
u_int16_t rd[RIF_MAX_RD]; /* routing designators */
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
struct iso88025_rif {
|
||||
u_int16_t rcf; /* route control field */
|
||||
u_int16_t rd[RIF_MAX_RD]; /* routing designators */
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
struct iso88025_sockaddr_data {
|
||||
u_char ether_dhost[ISO88025_ADDR_LEN];
|
||||
@ -114,9 +121,12 @@ struct iso88025_addr {
|
||||
#define ISO88025_DEFAULT_MTU 1500
|
||||
#define senderr(e) { error = (e); goto bad;}
|
||||
|
||||
void iso88025_ifattach __P((struct ifnet *));
|
||||
int iso88025_ioctl __P((struct ifnet *, int , caddr_t ));
|
||||
int iso88025_output __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *));
|
||||
void iso88025_input __P((struct ifnet *, struct iso88025_header *, struct mbuf *));
|
||||
void iso88025_ifattach (struct ifnet *);
|
||||
void iso88025_ifdetach (struct ifnet *, int);
|
||||
int iso88025_ioctl (struct ifnet *, int , caddr_t );
|
||||
int iso88025_output (struct ifnet *, struct mbuf *, struct sockaddr *,
|
||||
struct rtentry *);
|
||||
void iso88025_input (struct ifnet *, struct iso88025_header *,
|
||||
struct mbuf *);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user