Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/libbb/create_icmp6_socket.c
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/libbb/create_icmp6_socket.c
r1765 r2725 3 3 * Utility routines. 4 4 * 5 * create raw socket for icmp (IPv6 version) protocol test permission5 * create raw socket for icmp (IPv6 version) protocol 6 6 * and drop root privileges if running setuid 7 7 * 8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 9 */ 9 10 10 //#include <sys/types.h>11 //#include <netdb.h>12 //#include <sys/socket.h>13 11 #include "libbb.h" 14 12 15 13 #if ENABLE_FEATURE_IPV6 16 int create_icmp6_socket(void)14 int FAST_FUNC create_icmp6_socket(void) 17 15 { 16 int sock; 17 #if 0 18 18 struct protoent *proto; 19 int sock;20 21 19 proto = getprotobyname("ipv6-icmp"); 22 20 /* if getprotobyname failed, just silently force … … 24 22 sock = socket(AF_INET6, SOCK_RAW, 25 23 (proto ? proto->p_proto : IPPROTO_ICMPV6)); 24 #else 25 sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); 26 #endif 26 27 if (sock < 0) { 27 28 if (errno == EPERM)
Note:
See TracChangeset
for help on using the changeset viewer.