aboutsummaryrefslogtreecommitdiffstats
path: root/src/l2_packet/l2_packet.h
diff options
context:
space:
mode:
authorKyeyoon Park <kyeyoonp@qca.qualcomm.com>2014-09-08 21:27:11 (GMT)
committerJouni Malinen <j@w1.fi>2014-10-27 23:08:29 (GMT)
commit7d20dd66f3c7eab7c9107816161342e9f6dc22ba (patch)
tree7077fabbaf0d54a98d1004ee8ae58e0a52cb3e67 /src/l2_packet/l2_packet.h
parent5e29a9007946fe9309ffb9c4eff673f95f82af08 (diff)
downloadhostap-7d20dd66f3c7eab7c9107816161342e9f6dc22ba.zip
hostap-7d20dd66f3c7eab7c9107816161342e9f6dc22ba.tar.gz
hostap-7d20dd66f3c7eab7c9107816161342e9f6dc22ba.tar.bz2
l2_packet: Add support for DHCP packet filter in l2_packet_linux
Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
Diffstat (limited to 'src/l2_packet/l2_packet.h')
-rw-r--r--src/l2_packet/l2_packet.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/l2_packet/l2_packet.h b/src/l2_packet/l2_packet.h
index dd825b5..f391f36 100644
--- a/src/l2_packet/l2_packet.h
+++ b/src/l2_packet/l2_packet.h
@@ -39,6 +39,10 @@ struct l2_ethhdr {
#pragma pack(pop)
#endif /* _MSC_VER */
+enum l2_packet_filter_type {
+ L2_PACKET_FILTER_DHCP,
+};
+
/**
* l2_packet_init - Initialize l2_packet interface
* @ifname: Interface name
@@ -121,4 +125,16 @@ int l2_packet_get_ip_addr(struct l2_packet_data *l2, char *buf, size_t len);
*/
void l2_packet_notify_auth_start(struct l2_packet_data *l2);
+/**
+ * l2_packet_set_packet_filter - Set socket filter for l2_packet
+ * @l2: Pointer to internal l2_packet data from l2_packet_init()
+ * @type: enum l2_packet_filter_type, type of filter
+ * Returns: 0 on success, -1 on failure
+ *
+ * This function is used to set the socket filter for l2_packet socket.
+ *
+ */
+int l2_packet_set_packet_filter(struct l2_packet_data *l2,
+ enum l2_packet_filter_type type);
+
#endif /* L2_PACKET_H */