Deleted Added
full compact
ifieee80211.c (195618) ifieee80211.c (195784)
1/*
2 * Copyright 2001 The Aerospace Corporation. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
1/*
2 * Copyright 2001 The Aerospace Corporation. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 195618 2009-07-11 15:02:45Z rpaulo $
27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 195784 2009-07-20 19:12:08Z rpaulo $
28 */
29
30/*-
31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
32 * All rights reserved.
33 *
34 * This code is derived from software contributed to The NetBSD Foundation
35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,

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

3960 (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name));
3961 ireq.i_type = IEEE80211_IOC_MESH_RTCMD;
3962 ireq.i_val = IEEE80211_MESH_RTCMD_LIST;
3963 ireq.i_data = &routes;
3964 ireq.i_len = sizeof(routes);
3965 if (ioctl(s, SIOCG80211, &ireq) < 0)
3966 err(1, "unable to get the Mesh routing table");
3967
28 */
29
30/*-
31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
32 * All rights reserved.
33 *
34 * This code is derived from software contributed to The NetBSD Foundation
35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,

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

3960 (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name));
3961 ireq.i_type = IEEE80211_IOC_MESH_RTCMD;
3962 ireq.i_val = IEEE80211_MESH_RTCMD_LIST;
3963 ireq.i_data = &routes;
3964 ireq.i_len = sizeof(routes);
3965 if (ioctl(s, SIOCG80211, &ireq) < 0)
3966 err(1, "unable to get the Mesh routing table");
3967
3968 printf("%-17.17s %-17.17s %4s %4s %4s\n"
3968 printf("%-17.17s %-17.17s %4s %4s %4s %6s\n"
3969 , "DEST"
3970 , "NEXT HOP"
3971 , "HOPS"
3972 , "METRIC"
3969 , "DEST"
3970 , "NEXT HOP"
3971 , "HOPS"
3972 , "METRIC"
3973 , "LIFETIME");
3973 , "LIFETIME"
3974 , "MSEQ");
3974
3975 for (i = 0; i < ireq.i_len / sizeof(*routes); i++) {
3976 printf("%s ",
3977 ether_ntoa((const struct ether_addr *)routes[i].imr_dest));
3975
3976 for (i = 0; i < ireq.i_len / sizeof(*routes); i++) {
3977 printf("%s ",
3978 ether_ntoa((const struct ether_addr *)routes[i].imr_dest));
3978 printf("%s %4u %4d %6d\n",
3979 printf("%s %4u %4u %6u %6u\n",
3979 ether_ntoa((const struct ether_addr *)
3980 routes[i].imr_nexthop),
3981 routes[i].imr_nhops, routes[i].imr_metric,
3980 ether_ntoa((const struct ether_addr *)
3981 routes[i].imr_nexthop),
3982 routes[i].imr_nhops, routes[i].imr_metric,
3982 routes[i].imr_lifetime);
3983 routes[i].imr_lifetime,
3984 routes[i].imr_lastmseq);
3983 }
3984}
3985
3986static
3987DECL_CMD_FUNC(set80211list, arg, d)
3988{
3989#define iseq(a,b) (strncasecmp(a,b,sizeof(b)-1) == 0)
3990

--- 1281 unchanged lines hidden ---
3985 }
3986}
3987
3988static
3989DECL_CMD_FUNC(set80211list, arg, d)
3990{
3991#define iseq(a,b) (strncasecmp(a,b,sizeof(b)-1) == 0)
3992

--- 1281 unchanged lines hidden ---