diff options
| author | Harout Hedeshian <harouth@codeaurora.org> | 2014-06-17 08:10:43 -0600 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:05:17 -0700 |
| commit | 4d6ec5cecc3517bfd834d9ec042d585deca280c1 (patch) | |
| tree | 44be243333473f1e43b7c85762d9dc35d416c114 /include/uapi | |
| parent | 95106c070a701a56f3cde5c1506e3a0aeeaab7ff (diff) | |
net: rmnet_data: Move MAP header definition to UAPI
Expose the MAP header to the rest of the kernel and user space. Useful for
making various parts of the kernel MAP aware. Keeping consistency with
other networking procols by exposing protocol headers to user space with
a header file in UAPI.
CRs-Fixed: 681280
Change-Id: Ic7f414f926f68531418725f971ab2b44459f5ea1
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/linux/Kbuild | 1 | ||||
| -rw-r--r-- | include/uapi/linux/net_map.h | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 48ba6cc287f4..aa78179c0d20 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -288,6 +288,7 @@ header-y += neighbour.h header-y += netconf.h header-y += netdevice.h header-y += net_dropmon.h +header-y += net_map.h header-y += netfilter_arp.h header-y += netfilter_bridge.h header-y += netfilter_decnet.h diff --git a/include/uapi/linux/net_map.h b/include/uapi/linux/net_map.h new file mode 100644 index 000000000000..879a854cb1da --- /dev/null +++ b/include/uapi/linux/net_map.h @@ -0,0 +1,27 @@ +#ifndef _NET_MAP_H_ +#define _NET_MAP_H_ + +struct rmnet_map_header_s { +#ifndef RMNET_USE_BIG_ENDIAN_STRUCTS + uint8_t pad_len:6; + uint8_t reserved_bit:1; + uint8_t cd_bit:1; +#else + uint8_t cd_bit:1; + uint8_t reserved_bit:1; + uint8_t pad_len:6; +#endif /* RMNET_USE_BIG_ENDIAN_STRUCTS */ + uint8_t mux_id; + uint16_t pkt_len; +} __aligned(1); + +#define RMNET_MAP_GET_MUX_ID(Y) (((struct rmnet_map_header_s *)Y->data)->mux_id) +#define RMNET_MAP_GET_CD_BIT(Y) (((struct rmnet_map_header_s *)Y->data)->cd_bit) +#define RMNET_MAP_GET_PAD(Y) (((struct rmnet_map_header_s *)Y->data)->pad_len) +#define RMNET_MAP_GET_CMD_START(Y) ((struct rmnet_map_control_command_s *) \ + (Y->data + sizeof(struct rmnet_map_header_s))) +#define RMNET_MAP_GET_LENGTH(Y) (ntohs( \ + ((struct rmnet_map_header_s *)Y->data)->pkt_len)) + + +#endif /* _NET_MAP_H_ */ |
