diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-07-31 13:58:29 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-07-31 15:35:04 +0300 |
commit | 3b8d6b19e647501133124c02350d85e5c29525cb (patch) | |
tree | 012f71acc933d4bfbef69cd15d4b04e712452694 /monitor/l2cap.h | |
parent | 5f432163133e64d248cc0ec209c08f5c8a2af1b5 (diff) | |
download | bluez-3b8d6b19e647501133124c02350d85e5c29525cb.tar.gz |
monitor: Add mode and channel to struct l2cap_frame
This make it simpler to pass it around.
Diffstat (limited to 'monitor/l2cap.h')
-rw-r--r-- | monitor/l2cap.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/monitor/l2cap.h b/monitor/l2cap.h index 851b5c497..a0f844bbe 100644 --- a/monitor/l2cap.h +++ b/monitor/l2cap.h @@ -30,23 +30,13 @@ struct l2cap_frame { bool in; uint16_t handle; uint16_t cid; + uint16_t psm; + uint16_t chan; + uint8_t mode; const void *data; uint16_t size; - uint16_t psm; }; -static inline void l2cap_frame_init(struct l2cap_frame *frame, - uint16_t index, bool in, uint16_t handle, - uint16_t cid, const void *data, uint16_t size) -{ - frame->index = index; - frame->in = in; - frame->handle = handle; - frame->cid = cid; - frame->data = data; - frame->size = size; -} - static inline void l2cap_frame_pull(struct l2cap_frame *frame, const struct l2cap_frame *source, uint16_t len) { @@ -54,6 +44,9 @@ static inline void l2cap_frame_pull(struct l2cap_frame *frame, frame->in = source->in; frame->handle = source->handle; frame->cid = source->cid; + frame->psm = source->psm; + frame->chan = source->chan; + frame->mode = source->mode; frame->data = source->data + len; frame->size = source->size - len; } |