4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
26 * mac_impl.h contains internal MAC layer independent definttions
32 #pragma ident "%Z%%M% %I% %E% SMI"
38 extern boolean_t initialized
; /* TRUE if network device initialized */
39 extern int arp_index
; /* current arp table index */
42 int mac_type
; /* if_types.h */
45 caddr_t mac_buf
; /* MTU sized buffer */
46 uint8_t *mac_addr_buf
;
47 uint32_t mac_arp_timeout
;
48 uint32_t mac_in_timeout
;
49 uint32_t mac_in_timeo_incr
;
51 int (*mac_arp
)(struct in_addr
*, void *, uint32_t);
52 void (*mac_rarp
)(void);
53 int (*mac_header_len
)(struct inetgram
*);
54 int (*mac_input
)(int);
55 int (*mac_output
)(int, struct inetgram
*);
58 #define ARP_TABLE_SIZE (3) /* size of ARP table */
59 #define HW_ADDR_SIZE (128) /* max size of hardware address */
60 #define MAC_IN_TIMEOUT (10) /* collect IP grams for X mseconds. */
61 #define MAC_IN_TIMEO_MULT (8) /* Multiplier to arrive at maximum */
63 /* format of an arp table entry */
66 uchar_t ha
[HW_ADDR_SIZE
];
70 extern void mac_set_arp(struct in_addr
*, void *, int);
71 extern void mac_socket_init(struct inetboot_socket
*);
77 #endif /* _MAC_IMPL_H */