for non-blocking datagram socket, like UDP, when I call write()/send() on the socket, each call of write()/send() or read()/recv() deal with exactly 1 packet.
I'm wondering if raw socket, like the below, is a datagram socket or not?
int on = 1;
rawfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
setsockopt(IPPROTO_IP, IP_HDRINCL, &on, sizeof(on));