summaryrefslogtreecommitdiff
path: root/sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sock.c')
-rw-r--r--sock.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sock.c b/sock.c
index 1cefb83..a8b4f82 100644
--- a/sock.c
+++ b/sock.c
@@ -33,6 +33,16 @@ int pf_socket(void)
return sock;
}
+int pf_tx_socket(void)
+{
+ int sock = socket(PF_PACKET, SOCK_RAW, 0);
+ if (unlikely(sock < 0))
+ panic("Creation of PF TX socket failed!\n");
+
+ return sock;
+}
+
+
void set_sock_prio(int fd, int prio)
{
int ret, val = prio;