Raw sockets problem?

Ivan Voras ivoras at fer.hr
Sat Jan 8 07:17:21 PST 2005


I've just noticed I can't create a raw socket on 5.3-RELEASE, while the 
same code works on 5.2. I get 'Protocol not supported' error on code 
like this:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <errno.h>

void main() {
     int sock = socket(AF_LINK, SOCK_RAW, 0);
     if (sock < 0)
         printf(strerror(errno));
}

Code like this *seems* ok (and I'm sure it worked on 5.2)... why does it 
fail now?


More information about the freebsd-hackers mailing list