ifmedia.c (140913) | ifmedia.c (154240) |
---|---|
1/* $NetBSD: ifconfig.c,v 1.34 1997/04/21 01:17:58 lukem Exp $ */ | 1/* $NetBSD: ifconfig.c,v 1.34 1997/04/21 01:17:58 lukem Exp $ */ |
2/* $FreeBSD: head/sbin/ifconfig/ifmedia.c 140913 2005-01-27 16:40:12Z ambrisko $ */ | 2/* $FreeBSD: head/sbin/ifconfig/ifmedia.c 154240 2006-01-11 22:37:59Z ambrisko $ */ |
3 4/* 5 * Copyright (c) 1997 Jason R. Thorpe. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 224 unchanged lines hidden (view full) --- 235 236static void 237setifmediacallback(int s, void *arg) 238{ 239 struct ifmediareq *ifmr = (struct ifmediareq *)arg; 240 static int did_it = 0; 241 242 if (!did_it) { | 3 4/* 5 * Copyright (c) 1997 Jason R. Thorpe. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 224 unchanged lines hidden (view full) --- 235 236static void 237setifmediacallback(int s, void *arg) 238{ 239 struct ifmediareq *ifmr = (struct ifmediareq *)arg; 240 static int did_it = 0; 241 242 if (!did_it) { |
243 ifr.ifr_media = ifmr->ifm_current; |
|
243 if (ioctl(s, SIOCSIFMEDIA, (caddr_t)&ifr) < 0) 244 err(1, "SIOCSIFMEDIA (media)"); 245 free(ifmr->ifm_ulist); 246 free(ifmr); 247 did_it = 1; 248 } 249} 250 --- 555 unchanged lines hidden --- | 244 if (ioctl(s, SIOCSIFMEDIA, (caddr_t)&ifr) < 0) 245 err(1, "SIOCSIFMEDIA (media)"); 246 free(ifmr->ifm_ulist); 247 free(ifmr); 248 did_it = 1; 249 } 250} 251 --- 555 unchanged lines hidden --- |