Deleted Added
full compact
ieee80211_input.c (148278) ieee80211_input.c (148288)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 17 unchanged lines hidden (view full) ---

26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 17 unchanged lines hidden (view full) ---

26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_input.c 148278 2005-07-22 05:17:52Z sam $");
34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_input.c 148288 2005-07-22 16:36:12Z sam $");
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/mbuf.h>
39#include <sys/malloc.h>
40#include <sys/endian.h>
41#include <sys/kernel.h>
42

--- 2666 unchanged lines hidden (view full) ---

2709 return wh->i_addr2;
2710 if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) != IEEE80211_FC1_DIR_NODS)
2711 return wh->i_addr1;
2712 if ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_PS_POLL)
2713 return wh->i_addr1;
2714 return wh->i_addr3;
2715}
2716
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/mbuf.h>
39#include <sys/malloc.h>
40#include <sys/endian.h>
41#include <sys/kernel.h>
42

--- 2666 unchanged lines hidden (view full) ---

2709 return wh->i_addr2;
2710 if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) != IEEE80211_FC1_DIR_NODS)
2711 return wh->i_addr1;
2712 if ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_PS_POLL)
2713 return wh->i_addr1;
2714 return wh->i_addr3;
2715}
2716
2717void
2718ieee80211_note(struct ieee80211com *ic, const char *fmt, ...)
2719{
2720 char buf[128]; /* XXX */
2721 va_list ap;
2722
2723 va_start(ap, fmt);
2724 vsnprintf(buf, sizeof(buf), fmt, ap);
2725 va_end(ap);
2726
2727 if_printf(ic->ic_ifp, "%s", buf); /* NB: no \n */
2728}
2729
2730void
2731ieee80211_note_frame(struct ieee80211com *ic,
2732 const struct ieee80211_frame *wh,
2733 const char *fmt, ...)
2734{
2735 char buf[128]; /* XXX */
2736 va_list ap;
2737
2738 va_start(ap, fmt);
2739 vsnprintf(buf, sizeof(buf), fmt, ap);
2740 va_end(ap);
2741 if_printf(ic->ic_ifp, "[%s] %s\n",
2742 ether_sprintf(ieee80211_getbssid(ic, wh)), buf);
2743}
2744
2745void
2746ieee80211_note_mac(struct ieee80211com *ic,
2747 const u_int8_t mac[IEEE80211_ADDR_LEN],
2748 const char *fmt, ...)
2749{
2750 char buf[128]; /* XXX */
2751 va_list ap;
2752
2753 va_start(ap, fmt);
2754 vsnprintf(buf, sizeof(buf), fmt, ap);
2755 va_end(ap);
2756 if_printf(ic->ic_ifp, "[%s] %s\n", ether_sprintf(mac), buf);
2757}
2758
2717static void
2718ieee80211_discard_frame(struct ieee80211com *ic,
2719 const struct ieee80211_frame *wh,
2720 const char *type, const char *fmt, ...)
2721{
2722 va_list ap;
2723
2724 printf("[%s] discard ", ether_sprintf(ieee80211_getbssid(ic, wh)));

--- 46 unchanged lines hidden ---
2759static void
2760ieee80211_discard_frame(struct ieee80211com *ic,
2761 const struct ieee80211_frame *wh,
2762 const char *type, const char *fmt, ...)
2763{
2764 va_list ap;
2765
2766 printf("[%s] discard ", ether_sprintf(ieee80211_getbssid(ic, wh)));

--- 46 unchanged lines hidden ---