if_loop.c (2b12097485448804f5315a84fccc19a39d7d896a) if_loop.c (81930014ef2caa3b69ed663b695976aa4ee7b34d)
1/*
2 * Copyright (c) 1982, 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

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

96#ifdef TINY_LOMTU
97#define LOMTU (1024+512)
98#elif defined(LARGE_LOMTU)
99#define LOMTU 131072
100#else
101#define LOMTU 16384
102#endif
103
1/*
2 * Copyright (c) 1982, 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

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

96#ifdef TINY_LOMTU
97#define LOMTU (1024+512)
98#elif defined(LARGE_LOMTU)
99#define LOMTU 131072
100#else
101#define LOMTU 16384
102#endif
103
104static int nloop;
104static int nloop = 1;
105
106struct ifnet *loif; /* Used externally */
107
108static MALLOC_DEFINE(M_LO, "lo", "Loopback Interface");
109
110struct lo_softc {
111 struct ifnet sc_if; /* network-visible interface */
112 LIST_ENTRY(lo_softc) sc_next;

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

174
175static int
176loop_modevent(module_t mod, int type, void *data)
177{
178 int i;
179
180 switch (type) {
181 case MOD_LOAD:
105
106struct ifnet *loif; /* Used externally */
107
108static MALLOC_DEFINE(M_LO, "lo", "Loopback Interface");
109
110struct lo_softc {
111 struct ifnet sc_if; /* network-visible interface */
112 LIST_ENTRY(lo_softc) sc_next;

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

174
175static int
176loop_modevent(module_t mod, int type, void *data)
177{
178 int i;
179
180 switch (type) {
181 case MOD_LOAD:
182 TUNABLE_INT_FETCH("net.nloop", 1, nloop);
182 TUNABLE_INT_FETCH("net.nloop", &nloop);
183 if (nloop < 1) /* sanity check */
184 nloop = 1;
185 for (i = 0; i < nloop; i++)
186 locreate(i);
187 break;
188 case MOD_UNLOAD:
189 printf("loop module unload - not possible for this module type\n");
190 return EINVAL;

--- 267 unchanged lines hidden ---
183 if (nloop < 1) /* sanity check */
184 nloop = 1;
185 for (i = 0; i < nloop; i++)
186 locreate(i);
187 break;
188 case MOD_UNLOAD:
189 printf("loop module unload - not possible for this module type\n");
190 return EINVAL;

--- 267 unchanged lines hidden ---