~ubuntu-branches/ubuntu/wily/bluez/wily

« back to all changes in this revision

Viewing changes to compat/bnep.c

ImportĀ upstreamĀ versionĀ 4.81

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *  BlueZ - Bluetooth protocol stack for Linux
4
4
 *
5
5
 *  Copyright (C) 2002-2003  Maxim Krasnyansky <maxk@qualcomm.com>
6
 
 *  Copyright (C) 2002-2009  Marcel Holtmann <marcel@holtmann.org>
 
6
 *  Copyright (C) 2002-2010  Marcel Holtmann <marcel@holtmann.org>
7
7
 *
8
8
 *
9
9
 *  This program is free software; you can redistribute it and/or modify
34
34
#include <sys/ioctl.h>
35
35
 
36
36
#include <bluetooth/bluetooth.h>
37
 
#include <bluetooth/l2cap.h>
38
37
#include <bluetooth/bnep.h>
39
38
 
40
39
#include <netinet/in.h>
93
92
        }
94
93
 
95
94
        /* Temporary ioctl compatibility hack */
96
 
        { 
 
95
        {
97
96
                struct bnep_connlist_req req;
98
97
                struct bnep_conninfo ci[1];
99
98
 
194
193
        return 0;
195
194
}
196
195
 
197
 
struct __service_16 { 
 
196
struct __service_16 {
198
197
        uint16_t dst;
199
198
        uint16_t src;
200
199
} __attribute__ ((packed));
201
200
 
202
 
struct __service_32 { 
 
201
struct __service_32 {
203
202
        uint16_t unused1;
204
203
        uint16_t dst;
205
204
        uint16_t unused2;
206
205
        uint16_t src;
207
206
} __attribute__ ((packed));
208
207
 
209
 
struct __service_128 { 
 
208
struct __service_128 {
210
209
        uint16_t unused1;
211
210
        uint16_t dst;
212
211
        uint16_t unused2[8];
246
245
        return bnep_connadd(sk, role, dev);
247
246
}
248
247
 
249
 
/* Create BNEP connection 
 
248
/* Create BNEP connection
250
249
 * sk      - Connect L2CAP socket
251
250
 * role    - Local role
252
251
 * service - Remote service