1/*- 2 * Copyright (c) 1998 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/usr.sbin/ppp/cbcp.c 50867 1999-09-04 00:00:21Z brian $ |
27 */ 28 29#include <sys/param.h> 30 31#include <sys/un.h> 32 33#include <string.h> 34#include <termios.h> --- 163 unchanged lines hidden (view full) --- 198 bp = mbuf_Alloc(sizeof *head + data->length, MB_CBCPOUT); 199 head = (struct cbcp_header *)MBUF_CTOP(bp); 200 head->code = code; 201 head->id = cbcp->fsm.id; 202 head->length = htons(sizeof *head + data->length); 203 memcpy(MBUF_CTOP(bp) + sizeof *head, data, data->length); 204 log_DumpBp(LogDEBUG, "cbcp_Output", bp); 205 link_PushPacket(&cbcp->p->link, bp, cbcp->p->dl->bundle, |
206 LINK_QUEUES(&cbcp->p->link) - 1, PROTO_CBCP); |
207} 208 209static const char * 210cbcp_data_Type(int type) 211{ 212 static const char *types[] = { 213 "No callback", "User-spec", "Server-spec", "list" 214 }; --- 542 unchanged lines hidden --- |