Deleted Added
full compact
if.c (102118) if.c (103900)
1/*
2 * Copyright (c) 1980, 1986, 1993
3 * The Regents of the University of California. 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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)if.c 8.5 (Berkeley) 1/9/95
1/*
2 * Copyright (c) 1980, 1986, 1993
3 * The Regents of the University of California. 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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)if.c 8.5 (Berkeley) 1/9/95
34 * $FreeBSD: head/sys/net/if.c 102118 2002-08-19 17:20:03Z jmallett $
34 * $FreeBSD: head/sys/net/if.c 103900 2002-09-24 17:35:08Z brooks $
35 */
36
37#include "opt_compat.h"
38#include "opt_inet6.h"
39#include "opt_inet.h"
40#include "opt_mac.h"
41
42#include <sys/param.h>

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

50#include <sys/socket.h>
51#include <sys/socketvar.h>
52#include <sys/protosw.h>
53#include <sys/kernel.h>
54#include <sys/sockio.h>
55#include <sys/syslog.h>
56#include <sys/sysctl.h>
57#include <sys/jail.h>
35 */
36
37#include "opt_compat.h"
38#include "opt_inet6.h"
39#include "opt_inet.h"
40#include "opt_mac.h"
41
42#include <sys/param.h>

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

50#include <sys/socket.h>
51#include <sys/socketvar.h>
52#include <sys/protosw.h>
53#include <sys/kernel.h>
54#include <sys/sockio.h>
55#include <sys/syslog.h>
56#include <sys/sysctl.h>
57#include <sys/jail.h>
58#include <machine/stdarg.h>
58
59#include <net/if.h>
60#include <net/if_arp.h>
61#include <net/if_dl.h>
62#include <net/if_types.h>
63#include <net/if_var.h>
64#include <net/radix.h>
65#include <net/route.h>

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

1967
1968 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
1969 if (equal(ifma->ifma_addr, sa))
1970 break;
1971
1972 return ifma;
1973}
1974
59
60#include <net/if.h>
61#include <net/if_arp.h>
62#include <net/if_dl.h>
63#include <net/if_types.h>
64#include <net/if_var.h>
65#include <net/radix.h>
66#include <net/route.h>

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

1968
1969 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
1970 if (equal(ifma->ifma_addr, sa))
1971 break;
1972
1973 return ifma;
1974}
1975
1976int
1977if_printf(struct ifnet *ifp, const char * fmt, ...)
1978{
1979 va_list ap;
1980 int retval;
1981
1982 retval = printf("%s%d: ", ifp->if_name, ifp->if_unit);
1983 va_start(ap, fmt);
1984 retval += vprintf(fmt, ap);
1985 va_end(ap);
1986 return (retval);
1987}
1988
1975SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers");
1976SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management");
1989SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers");
1990SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management");