Skip to content

Instantly share code, notes, and snippets.

@rkday
rkday / rawbind.c
Created November 2, 2019 22:39
Bind raw socket
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
int main() {
int s = socket(PF_INET, SOCK_RAW, IPPROTO_UDP);

Keybase proof

I hereby claim:

  • I am rkday on github.
  • I am rkd (https://keybase.io/rkd) on keybase.
  • I have a public key whose fingerprint is C142 5F9A 8FF5 4E3E 6C5E 5402 E1D0 C009 B314 E289

To claim this, I am signing this object: