MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sockaddr_cmp

Function sockaddr_cmp

adapter/syscall/ff_socket_ops.c:37–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35static struct ff_bound_info ff_bound_fds[FF_MAX_BOUND_NUM];
36
37static int
38sockaddr_cmp(struct sockaddr *a, struct sockaddr *b)
39{
40 struct sockaddr_in *sina, *sinb;
41 sina = (struct sockaddr_in *)a;
42 sinb = (struct sockaddr_in *)b;
43
44 if (sina->sin_family != sinb->sin_family) {
45 return 1;
46 }
47
48 if (sina->sin_port != sinb->sin_port) {
49 return 1;
50 }
51
52 if (sina->sin_addr.s_addr != sinb->sin_addr.s_addr) {
53 return 1;
54 }
55
56 return 0;
57}
58
59static int
60sockaddr_is_bound(struct sockaddr *addr)

Callers 1

sockaddr_is_boundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected