Why should I use, or not use, MSG_CONFIRM?

You should only set the flag if the datagram you’re sending is a direct response to a datagram you just received from the same peer. If you’re sending an initial request, or sending a datagram in response to some other event (like user input, or a timeout) then you should not set the MSG_CONFIRM flag.

Getting ARP table on iPhone/iPad

After importing <netinet/if_ether.h>, you should edit it and change the line #include <net/if_arp.h> to #include “if_arp.h” and then import <net/if_arp.h> in your project as well. This should fix that error. Anyway the headers you need to import to compile the code you posted are: #include “if_ether.h” #include “route.h” #include “if_arp.h” #include “if_dl.h” Hope this helps … Read more

How do I query the ARP table on iPhone?

Since nobody has answered my question… here is the answer 😉 #include <sys/param.h> #include <sys/file.h> #include <sys/socket.h> #include <sys/sysctl.h> #include <net/if.h> #include <net/if_dl.h> #include “if_types.h” #include “route.h” #include “if_ether.h” #include <netinet/in.h> #include <arpa/inet.h> #include <err.h> #include <errno.h> #include <netdb.h> #include <paths.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> -(NSString*) ip2mac: (char*) ip { int … Read more