site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com For you network developers out there Cheers Godfrey #in your bashrc add // Wrap this in a C file and implement the sys_test macros. static void siocprotodetach(const char *name) { int sockfd; struct ifreq ifr; sockfd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); sys_test(sockfd, "Couldn't open a socket for the protocol detach"); bzero(&ifr, sizeof(ifr)); strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); sys_test(ioctl(sockfd, SIOCPROTODETACH, &ifr), "ioctl failed to detach protocol"); close(sockfd); } _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... So the problem was that I couldn't load and unload my development network driver. With Josh's and another's help I have found the magic incantations for successfully unloading. ifclient() { sudo ifconfig en2 inet 192.168.1.2 netmask 0xffffff002 $@; } nu() { ifclient up; } nd() { ifclient down delete; sudo ipunplumb; } // taken from xnu/sys/sockio.h these are kernel private for some reason #define SIOCPROTODETACH _IOWR('i', 81, struct ifreq) /* detach proto from interface */ This email sent to site_archiver@lists.apple.com