Remove some reference code

Replace bsd types for haiku ones
-ve-This line, and those below, will be ignored--

M    l2cap/l2cap_command.cpp
M    l2cap/l2cap.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25945 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Ruiz Dorantes
2008-06-12 19:53:06 +00:00
parent 43f36da804
commit 1b9e61ad87
2 changed files with 13 additions and 69 deletions
@@ -178,7 +178,7 @@ typedef struct {
#define L2CAP_CMD_REJ 0x01
typedef struct {
uint16 reason; /* reason to reject command */
/* u_int8_t data[]; -- optional data (depends on reason) */
/* uint8 data[]; -- optional data (depends on reason) */
} __attribute__ ((packed)) l2cap_cmd_rej_cp;
/* CommandReject data */
@@ -216,7 +216,7 @@ typedef struct {
typedef struct {
uint16 dcid; /* destination channel ID */
uint16 flags; /* flags */
/* u_int8_t options[] -- options */
/* uint8 options[] -- options */
} __attribute__ ((packed)) l2cap_cfg_req_cp;
/* L2CAP Configuration Response */
@@ -225,14 +225,14 @@ typedef struct {
uint16 scid; /* source channel ID */
uint16 flags; /* flags */
uint16 result; /* 0x00 - success */
/* u_int8_t options[] -- options */
/* uint8 options[] -- options */
} __attribute__ ((packed)) l2cap_cfg_rsp_cp;
/* L2CAP configuration option */
typedef struct {
u_int8_t type;
u_int8_t length;
/* u_int8_t value[] -- option value (depends on type) */
uint8 type;
uint8 length;
/* uint8 value[] -- option value (depends on type) */
} __attribute__ ((packed)) l2cap_cfg_opt_t;
typedef l2cap_cfg_opt_t * l2cap_cfg_opt_p;
@@ -276,7 +276,7 @@ typedef struct {
typedef struct {
uint16 type; /* requested information type */
uint16 result; /* 0x00 - success */
/* u_int8_t info[] -- info data (depends on type)
/* uint8 info[] -- info data (depends on type)
*
* L2CAP_CONNLESS_MTU - 2 bytes connectionless MTU
*/
@@ -419,69 +419,13 @@ l2cap_info_rsp(uint8 _ident, uint16 _type, uint16 _result, uint16 _mtu)
#pragma mark -
#endif
/* Build configuration options
/* Build configuration options */
static inline net_buffer*
l2cap_build_cfg_options(_m, * _mtu, * _flush_timo, _flow)
l2cap_build_cfg_options(uint16* _mtu, uint16* _flush_timo, l2cap_flow_t* _flow)
{
u_int8_t *p = NULL;
//TODO:
MGETHDR((_m), M_DONTWAIT, MT_DATA);
if ((_m) == NULL)
break;
(_m)->m_pkthdr.len = (_m)->m_len = 0;
p = mtod((_m), u_int8_t *);
if ((_mtu) != NULL) {
struct _cfg_opt_mtu {
l2cap_cfg_opt_t hdr;
u_int16_t val;
} __attribute__ ((packed)) *o = NULL;
o = (struct _cfg_opt_mtu *) p;
o->hdr.type = L2CAP_OPT_MTU;
o->hdr.length = sizeof(o->val);
o->val = htole16(*(u_int16_t *)(_mtu));
(_m)->m_pkthdr.len += sizeof(*o);
p += sizeof(*o);
}
if ((_flush_timo) != NULL) {
struct _cfg_opt_flush {
l2cap_cfg_opt_t hdr;
u_int16_t val;
} __attribute__ ((packed)) *o = NULL;
o = (struct _cfg_opt_flush *) p;
o->hdr.type = L2CAP_OPT_FLUSH_TIMO;
o->hdr.length = sizeof(o->val);
o->val = htole16(*(u_int16_t *)(_flush_timo));
(_m)->m_pkthdr.len += sizeof(*o);
p += sizeof(*o);
}
if ((_flow) != NULL) {
struct _cfg_opt_flow {
l2cap_cfg_opt_t hdr;
l2cap_flow_t val;
} __attribute__ ((packed)) *o = NULL;
o = (struct _cfg_opt_flow *) p;
o->hdr.type = L2CAP_OPT_QOS;
o->hdr.length = sizeof(o->val);
o->val.flags = ((l2cap_flow_p)(_flow))->flags;
o->val.service_type = ((l2cap_flow_p) (_flow))->service_type;
o->val.token_rate = htole32(((l2cap_flow_p)(_flow))->token_rate);
o->val.token_bucket_size = htole32(((l2cap_flow_p) (_flow))->token_bucket_size);
o->val.peak_bandwidth = htole32(((l2cap_flow_p) (_flow))->peak_bandwidth);
o->val.latency = htole32(((l2cap_flow_p) (_flow))->latency);
o->val.delay_variation = htole32(((l2cap_flow_p) (_flow))->delay_variation);
(_m)->m_pkthdr.len += sizeof(*o);
}
(_m)->m_len = (_m)->m_pkthdr.len;
return NULL;
}
*/