1/*
2 * ng_btsocket_hci_raw.c
3 *
4 * Copyright (c) 2001-2002 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_btsocket_hci_raw.c,v 1.3 2002/11/12 22:31:39 max Exp $
29 * $FreeBSD: head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c 108107 2002-12-19 22:58:27Z bmilekic $
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/domain.h>
35#include <sys/errno.h>
36#include <sys/filedesc.h>
37#include <sys/ioccom.h>
--- 1228 unchanged lines hidden (view full) ---
1266 if (pcb->addr.hci_node[0] == 0) {
1267 error = EDESTADDRREQ;
1268 goto drop;
1269 }
1270
1271 sa = (struct sockaddr *) &pcb->addr;
1272 }
1273
1274 MGET(nam, M_TRYWAIT, MT_SONAME);
1275 if (nam == NULL) {
1276 error = ENOBUFS;
1277 goto drop;
1278 }
1279
1280 nam->m_len = sizeof(struct sockaddr_hci);
1281 bcopy(sa,mtod(nam, struct sockaddr_hci *),sizeof(struct sockaddr_hci));
1282
--- 38 unchanged lines hidden ---
2 * ng_btsocket_hci_raw.c
3 *
4 * Copyright (c) 2001-2002 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_btsocket_hci_raw.c,v 1.3 2002/11/12 22:31:39 max Exp $
29 * $FreeBSD: head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c 108107 2002-12-19 22:58:27Z bmilekic $
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/domain.h>
35#include <sys/errno.h>
36#include <sys/filedesc.h>
37#include <sys/ioccom.h>
--- 1228 unchanged lines hidden (view full) ---
1266 if (pcb->addr.hci_node[0] == 0) {
1267 error = EDESTADDRREQ;
1268 goto drop;
1269 }
1270
1271 sa = (struct sockaddr *) &pcb->addr;
1272 }
1273
1274 MGET(nam, M_TRYWAIT, MT_SONAME);
1275 if (nam == NULL) {
1276 error = ENOBUFS;
1277 goto drop;
1278 }
1279
1280 nam->m_len = sizeof(struct sockaddr_hci);
1281 bcopy(sa,mtod(nam, struct sockaddr_hci *),sizeof(struct sockaddr_hci));
1282
--- 38 unchanged lines hidden ---