if_media.h (60833) | if_media.h (60938) |
---|---|
1/* $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $ */ | 1/* $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $ */ |
2/* $FreeBSD: head/sys/net/if_media.h 60833 2000-05-23 20:41:01Z jake $ */ | 2/* $FreeBSD: head/sys/net/if_media.h 60938 2000-05-26 02:09:24Z jake $ */ |
3 4/* 5 * Copyright (c) 1997 6 * Jonathan Stone and Jason R. Thorpe. All rights reserved. 7 * 8 * This software is derived from information provided by Matt Thomas. 9 * 10 * Redistribution and use in source and binary forms, with or without --- 48 unchanged lines hidden (view full) --- 59 */ 60typedef int (*ifm_change_cb_t) __P((struct ifnet *ifp)); 61typedef void (*ifm_stat_cb_t) __P((struct ifnet *ifp, struct ifmediareq *req)); 62 63/* 64 * In-kernel representation of a single supported media type. 65 */ 66struct ifmedia_entry { | 3 4/* 5 * Copyright (c) 1997 6 * Jonathan Stone and Jason R. Thorpe. All rights reserved. 7 * 8 * This software is derived from information provided by Matt Thomas. 9 * 10 * Redistribution and use in source and binary forms, with or without --- 48 unchanged lines hidden (view full) --- 59 */ 60typedef int (*ifm_change_cb_t) __P((struct ifnet *ifp)); 61typedef void (*ifm_stat_cb_t) __P((struct ifnet *ifp, struct ifmediareq *req)); 62 63/* 64 * In-kernel representation of a single supported media type. 65 */ 66struct ifmedia_entry { |
67 LIST_ENTRY(struct ifmedia_entry) ifm_list; | 67 LIST_ENTRY(ifmedia_entry) ifm_list; |
68 int ifm_media; /* description of this media attachment */ 69 int ifm_data; /* for driver-specific use */ 70 void *ifm_aux; /* for driver-specific use */ 71}; 72 73/* 74 * One of these goes into a network interface's softc structure. 75 * It is used to keep general media state. 76 */ 77struct ifmedia { 78 int ifm_mask; /* mask of changes we don't care about */ 79 int ifm_media; /* current user-set media word */ 80 struct ifmedia_entry *ifm_cur; /* currently selected media */ | 68 int ifm_media; /* description of this media attachment */ 69 int ifm_data; /* for driver-specific use */ 70 void *ifm_aux; /* for driver-specific use */ 71}; 72 73/* 74 * One of these goes into a network interface's softc structure. 75 * It is used to keep general media state. 76 */ 77struct ifmedia { 78 int ifm_mask; /* mask of changes we don't care about */ 79 int ifm_media; /* current user-set media word */ 80 struct ifmedia_entry *ifm_cur; /* currently selected media */ |
81 LIST_HEAD(, struct ifmedia_entry) ifm_list; /* list of all supported media */ | 81 LIST_HEAD(, ifmedia_entry) ifm_list; /* list of all supported media */ |
82 ifm_change_cb_t ifm_change; /* media change driver callback */ 83 ifm_stat_cb_t ifm_status; /* media status driver callback */ 84}; 85 86/* Initialize an interface's struct if_media field. */ 87void ifmedia_init __P((struct ifmedia *ifm, int dontcare_mask, 88 ifm_change_cb_t change_callback, ifm_stat_cb_t status_callback)); 89 --- 266 unchanged lines hidden --- | 82 ifm_change_cb_t ifm_change; /* media change driver callback */ 83 ifm_stat_cb_t ifm_status; /* media status driver callback */ 84}; 85 86/* Initialize an interface's struct if_media field. */ 87void ifmedia_init __P((struct ifmedia *ifm, int dontcare_mask, 88 ifm_change_cb_t change_callback, ifm_stat_cb_t status_callback)); 89 --- 266 unchanged lines hidden --- |