1/* 2 * ng_l2cap_evnt.c 3 * 4 * Copyright (c) Maksim Yevmenkin <m_evmenkin@yahoo.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * $Id: ng_l2cap_evnt.c,v 1.18 2002/09/04 21:38:38 max Exp $ |
29 * $FreeBSD: head/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c 109623 2003-01-21 08:56:16Z alfred $ |
30 */ 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/endian.h> 36#include <sys/malloc.h> 37#include <sys/mbuf.h> --- 147 unchanged lines hidden (view full) --- 185 con->rx_pkt->m_pkthdr.len); 186 NG_FREE_M(con->rx_pkt); 187 188 return (EMSGSIZE); 189 } 190 191 /* Get the command, save the rest (if any) */ 192 if (con->rx_pkt->m_pkthdr.len > hdr->length) |
193 m = m_split(con->rx_pkt, hdr->length, M_NOWAIT); |
194 else 195 m = NULL; 196 197 /* Process command */ 198 switch (hdr->code) { 199 case NG_L2CAP_CMD_REJ: 200 ng_l2cap_process_cmd_rej(con, hdr->ident); 201 break; --- 1136 unchanged lines hidden --- |