raw.c 228 B

1234567891011121314
  1. #include <stdio.h>
  2. #include <unistd.h>
  3. #include <sys/socket.h>
  4. #include <netinet/ip.h>
  5. #include <netinet/udp.h>
  6. int main() {
  7. if (socket(PF_INET, SOCK_RAW, IPPROTO_UDP) == -1) {
  8. perror("socket");
  9. return 1;
  10. }
  11. return 0;
  12. }