FreeBSD Bugzilla – Attachment 138882 Details for
Bug 184988
[PORT net-mgmt/aircrack-ng] Added MTU get/set operations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.39 KB, created by
Yuri Victorovich
on 2013-12-19 10:20:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Yuri Victorovich
Created:
2013-12-19 10:20:00 UTC
Size:
1.39 KB
patch
obsolete
>--- src/osdep/freebsd.c 2013-12-18 14:02:41.000000000 -0800 >+++ src/osdep/freebsd.c 2013-12-19 02:04:28.000000000 -0800 >@@ -42,6 +42,7 @@ > > #include "osdep.h" > >+ > struct priv_fbsd { > /* iface */ > int pf_fd; >@@ -522,6 +523,39 @@ > return ioctl(priv->pf_s, SIOCSIFLLADDR, ifr); > } > >+static int fbsd_set_mtu(struct wif *wi, int mtu) >+{ >+ struct priv_fbsd *priv = wi_priv(wi); >+ struct ifreq *ifr = &priv->pf_ifr; >+ >+ memset( ifr, 0, sizeof( struct ifreq ) ); >+ >+ strncpy( ifr->ifr_name, wi_get_ifname(wi), sizeof( ifr->ifr_name ) ); >+ ifr->ifr_mtu = mtu; >+ >+ if( ioctl( priv->pf_s, SIOCSIFMTU, ifr ) < 0 ) >+ return( -1 ); >+ >+ return 0; >+} >+ >+static int fbsd_get_mtu(struct wif *wi) >+{ >+ struct priv_fbsd *priv = wi_priv(wi); >+ struct ifreq ifr; >+ >+ memset( &ifr, 0, sizeof( struct ifreq ) ); >+ >+ ifr.ifr_addr.sa_family = AF_INET; >+ >+ strncpy( ifr.ifr_name, wi_get_ifname(wi), sizeof( ifr.ifr_name ) ); >+ >+ if( ioctl( priv->pf_s, SIOCGIFMTU, (caddr_t)&ifr ) < 0 ) >+ return( -1 ); >+ >+ return ifr.ifr_mtu; >+} >+ > static struct wif *fbsd_open(char *iface) > { > struct wif *wi; >@@ -542,7 +576,9 @@ > wi->wi_set_mac = fbsd_set_mac; > wi->wi_get_rate = fbsd_get_rate; > wi->wi_set_rate = fbsd_set_rate; >- wi->wi_get_monitor = fbsd_get_monitor; >+ wi->wi_get_monitor = fbsd_get_monitor; >+ wi->wi_get_mtu = fbsd_get_mtu; >+ wi->wi_set_mtu = fbsd_set_mtu; > > /* setup iface */ > fd = do_fbsd_open(wi, iface);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 184988
: 138882