Lines Matching refs:mac_state

57 struct mac_type		mac_state;
92 mac_state.mac_in_timeout = MAC_IN_TIMEOUT;
98 if ((mac_state.mac_dev = prom_open(bootdevicename)) == 0) {
119 (caddr_t)&mac_state.mac_mtu);
164 mac_state.mac_type = IFT_ATM;
165 mac_state.mac_arp_timeout = ATM_ARP_TIMEOUT;
166 mac_state.mac_in_timeout = ATM_IN_TIMEOUT;
167 if (mac_state.mac_mtu == 0)
168 mac_state.mac_mtu = ATMSIZE;
169 mac_state.mac_addr_len = sizeof (ether_addr_t);
170 mac_state.mac_addr_buf = bkmem_alloc(mac_state.mac_addr_len);
171 if (mac_state.mac_addr_buf == NULL)
173 if (prom_getmacaddr(mac_state.mac_dev,
174 (caddr_t)mac_state.mac_addr_buf) != 0)
176 mac_state.mac_arp = ether_arp;
177 mac_state.mac_rarp = ether_revarp;
178 mac_state.mac_header_len = ether_header_len;
179 mac_state.mac_input = ether_input;
180 mac_state.mac_output = ether_output;
189 mac_state.mac_type = IFT_FDDI;
190 mac_state.mac_arp_timeout = FDDI_ARP_TIMEOUT;
191 mac_state.mac_in_timeout = FDDI_IN_TIMEOUT;
192 if (mac_state.mac_mtu == 0)
193 mac_state.mac_mtu = FDDISIZE;
194 mac_state.mac_addr_len = sizeof (ether_addr_t);
195 mac_state.mac_addr_buf = bkmem_alloc(mac_state.mac_addr_len);
196 if (mac_state.mac_addr_buf == NULL)
198 if (prom_getmacaddr(mac_state.mac_dev,
199 (caddr_t)mac_state.mac_addr_buf) != 0)
201 mac_state.mac_arp = ether_arp;
202 mac_state.mac_rarp = ether_revarp;
203 mac_state.mac_header_len = ether_header_len;
204 mac_state.mac_input = ether_input;
205 mac_state.mac_output = ether_output;
213 mac_state.mac_type = IFT_ISO88025;
214 mac_state.mac_arp_timeout = TOKEN_ARP_TIMEOUT;
215 mac_state.mac_in_timeout = TOKEN_IN_TIMEOUT;
216 if (mac_state.mac_mtu == 0)
217 mac_state.mac_mtu = TOKENSIZE;
218 mac_state.mac_addr_len = sizeof (ether_addr_t);
219 mac_state.mac_addr_buf = bkmem_alloc(mac_state.mac_addr_len);
220 if (mac_state.mac_addr_buf == NULL)
222 if (prom_getmacaddr(mac_state.mac_dev,
223 (caddr_t)mac_state.mac_addr_buf) != 0)
225 mac_state.mac_arp = ether_arp;
226 mac_state.mac_rarp = ether_revarp;
227 mac_state.mac_header_len = ether_header_len;
228 mac_state.mac_input = ether_input;
229 mac_state.mac_output = ether_output;
233 mac_state.mac_type = IFT_IB;
240 mac_state.mac_type = IFT_ETHER;
241 mac_state.mac_mtu = ETHERSIZE;
242 mac_state.mac_arp_timeout = ETHER_ARP_TIMEOUT;
243 mac_state.mac_in_timeout = ETHER_IN_TIMEOUT;
244 if (mac_state.mac_mtu == 0)
245 mac_state.mac_mtu = ETHERSIZE;
246 mac_state.mac_addr_len = sizeof (ether_addr_t);
247 mac_state.mac_addr_buf = bkmem_alloc(mac_state.mac_addr_len);
248 if (mac_state.mac_addr_buf == NULL)
250 if (prom_getmacaddr(mac_state.mac_dev,
251 (caddr_t)mac_state.mac_addr_buf) != 0)
253 mac_state.mac_arp = ether_arp;
254 mac_state.mac_rarp = ether_revarp;
255 mac_state.mac_header_len = ether_header_len;
256 mac_state.mac_input = ether_input;
257 mac_state.mac_output = ether_output;
261 mac_state.mac_buf = bkmem_alloc(mac_state.mac_mtu);
262 if (mac_state.mac_buf == NULL)
271 if (mac_state.mac_addr_buf != NULL) {
272 bkmem_free((caddr_t)mac_state.mac_addr_buf,
273 mac_state.mac_addr_len);
274 mac_state.mac_addr_buf = NULL;
276 if (mac_state.mac_buf != NULL) {
277 bkmem_free(mac_state.mac_buf, mac_state.mac_mtu);
278 mac_state.mac_buf = NULL;
280 (void) prom_close(mac_state.mac_dev);
288 isp->input[MEDIA_LVL] = mac_state.mac_input;
289 isp->output[MEDIA_LVL] = mac_state.mac_output;
291 isp->headerlen[MEDIA_LVL] = mac_state.mac_header_len;
292 isp->in_timeout = mac_state.mac_in_timeout;
332 result = mac_state.mac_arp(ip, hp, timeout);
347 return (mac_state.mac_mtu);
356 return (mac_state.mac_dev);
365 return (mac_state.mac_addr_buf);
374 return (mac_state.mac_addr_len);
383 return (mac_state.mac_type);
389 mac_state.mac_arp_timeout =
399 return (mac_state.mac_arp_timeout);
408 return (mac_state.mac_header_len(NULL));
414 return (mac_state.mac_arp(addr, buf, timeout));
420 mac_state.mac_rarp();