| 793 | } |
| 794 | |
| 795 | static int addrcmp(const struct sockaddr_storage *s1, |
| 796 | const struct sockaddr_storage *s2) |
| 797 | { |
| 798 | const struct sockaddr *sa1 = (const struct sockaddr*) s1; |
| 799 | const struct sockaddr *sa2 = (const struct sockaddr*) s2; |
| 800 | |
| 801 | if (sa1->sa_family != sa2->sa_family) |
| 802 | return sa1->sa_family - sa2->sa_family; |
| 803 | if (sa1->sa_family == AF_INET) |
| 804 | return memcmp(&((struct sockaddr_in *)s1)->sin_addr, |
| 805 | &((struct sockaddr_in *)s2)->sin_addr, |
| 806 | sizeof(struct in_addr)); |
| 807 | #ifndef NO_IPV6 |
| 808 | if (sa1->sa_family == AF_INET6) |
| 809 | return memcmp(&((struct sockaddr_in6 *)s1)->sin6_addr, |
| 810 | &((struct sockaddr_in6 *)s2)->sin6_addr, |
| 811 | sizeof(struct in6_addr)); |
| 812 | #endif |
| 813 | return 0; |
| 814 | } |
| 815 | |
| 816 | static unsigned int max_connections = 32; |
| 817 | static unsigned int live_children; |
no outgoing calls
no test coverage detected