w00t.c (160996) | w00t.c (161029) |
---|---|
1/*- 2 * Copyright (c) 2006, Andrea Bittau <a.bittau@cs.ucl.ac.uk> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2006, Andrea Bittau <a.bittau@cs.ucl.ac.uk> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/tools/tools/net80211/w00t/libw00t/w00t.c 160996 2006-08-05 05:18:03Z sam $ | 26 * $FreeBSD: head/tools/tools/net80211/w00t/libw00t/w00t.c 161029 2006-08-06 23:50:56Z sam $ |
27 */ 28#include <stdio.h> 29#include <assert.h> 30#include <fcntl.h> 31#include <errno.h> 32#include <sys/socket.h> 33#include <sys/types.h> 34#include <sys/endian.h> --- 114 unchanged lines hidden (view full) --- 149 150int inject_params(int fd, void *buf, int len, 151 struct ieee80211_bpf_params *params) 152{ 153 static struct ieee80211_bpf_params defaults = { 154 .ibp_vers = IEEE80211_BPF_VERSION, 155 /* NB: no need to pass series 2-4 rate+try */ 156 .ibp_len = sizeof(struct ieee80211_bpf_params) - 6, | 27 */ 28#include <stdio.h> 29#include <assert.h> 30#include <fcntl.h> 31#include <errno.h> 32#include <sys/socket.h> 33#include <sys/types.h> 34#include <sys/endian.h> --- 114 unchanged lines hidden (view full) --- 149 150int inject_params(int fd, void *buf, int len, 151 struct ieee80211_bpf_params *params) 152{ 153 static struct ieee80211_bpf_params defaults = { 154 .ibp_vers = IEEE80211_BPF_VERSION, 155 /* NB: no need to pass series 2-4 rate+try */ 156 .ibp_len = sizeof(struct ieee80211_bpf_params) - 6, |
157 .ibp_rate1 = 2, /* 1 MB/s XXX */ 158 .ibp_try1 = 1, /* no retransmits */ | 157 .ibp_rate0 = 2, /* 1 MB/s XXX */ 158 .ibp_try0 = 1, /* no retransmits */ |
159 .ibp_flags = IEEE80211_BPF_NOACK, 160 .ibp_power = 100, /* nominal max */ 161 .ibp_pri = WME_AC_VO, /* high priority */ 162 }; 163 struct iovec iov[2]; 164 int rc; 165 166 if (params == NULL) --- 248 unchanged lines hidden --- | 159 .ibp_flags = IEEE80211_BPF_NOACK, 160 .ibp_power = 100, /* nominal max */ 161 .ibp_pri = WME_AC_VO, /* high priority */ 162 }; 163 struct iovec iov[2]; 164 int rc; 165 166 if (params == NULL) --- 248 unchanged lines hidden --- |