Deleted Added
full compact
pppoed.c (90779) pppoed.c (90975)
1/*-
2 * Copyright (c) 1999-2001 Brian Somers <brian@Awfulhak.org>
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) 1999-2001 Brian Somers <brian@Awfulhak.org>
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/libexec/pppoed/pppoed.c 90779 2002-02-17 19:09:20Z imp $
26 * $FreeBSD: head/libexec/pppoed/pppoed.c 90975 2002-02-20 15:52:20Z brian $
27 */
28
29#include <sys/param.h>
30#include <sys/socket.h>
31#include <sys/un.h>
32#include <netinet/in.h>
33#include <arpa/inet.h>
34#include <netdb.h>

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

400 case NGM_PPPOE_SET_FLAG: msg = "SET_FLAG"; break;
401 case NGM_PPPOE_CONNECT: msg = "CONNECT"; break;
402 case NGM_PPPOE_LISTEN: msg = "LISTEN"; break;
403 case NGM_PPPOE_OFFER: msg = "OFFER"; break;
404 case NGM_PPPOE_SUCCESS: msg = "SUCCESS"; break;
405 case NGM_PPPOE_FAIL: msg = "FAIL"; break;
406 case NGM_PPPOE_CLOSE: msg = "CLOSE"; break;
407 case NGM_PPPOE_GET_STATUS: msg = "GET_STATUS"; break;
27 */
28
29#include <sys/param.h>
30#include <sys/socket.h>
31#include <sys/un.h>
32#include <netinet/in.h>
33#include <arpa/inet.h>
34#include <netdb.h>

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

400 case NGM_PPPOE_SET_FLAG: msg = "SET_FLAG"; break;
401 case NGM_PPPOE_CONNECT: msg = "CONNECT"; break;
402 case NGM_PPPOE_LISTEN: msg = "LISTEN"; break;
403 case NGM_PPPOE_OFFER: msg = "OFFER"; break;
404 case NGM_PPPOE_SUCCESS: msg = "SUCCESS"; break;
405 case NGM_PPPOE_FAIL: msg = "FAIL"; break;
406 case NGM_PPPOE_CLOSE: msg = "CLOSE"; break;
407 case NGM_PPPOE_GET_STATUS: msg = "GET_STATUS"; break;
408 case NGM_PPPOE_ACNAME:
409 msg = "ACNAME";
410 if (setenv("ACNAME", sts->hook, 1) != 0)
411 syslog(LOG_WARNING, "setenv: cannot set ACNAME=%s: %m",
412 sts->hook);
413 break;
408 default:
409 snprintf(unknown, sizeof unknown, "<%d>", (int)rep->header.cmd);
410 msg = unknown;
411 break;
412 }
413
414 switch (rep->header.cmd) {
415 case NGM_PPPOE_FAIL:

--- 264 unchanged lines hidden ---
414 default:
415 snprintf(unknown, sizeof unknown, "<%d>", (int)rep->header.cmd);
416 msg = unknown;
417 break;
418 }
419
420 switch (rep->header.cmd) {
421 case NGM_PPPOE_FAIL:

--- 264 unchanged lines hidden ---