MCPcopy Create free account
hub / github.com/OpenPrinting/cups / httpAddrLength

Function httpAddrLength

cups/http-addr.c:125–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 */
124
125int /* O - Length in bytes */
126httpAddrLength(const http_addr_t *addr) /* I - Address */
127{
128 if (!addr)
129 return (0);
130
131#ifdef AF_INET6
132 if (addr->addr.sa_family == AF_INET6)
133 return (sizeof(addr->ipv6));
134 else
135#endif /* AF_INET6 */
136#ifdef AF_LOCAL
137 if (addr->addr.sa_family == AF_LOCAL)
138 return ((int)(offsetof(struct sockaddr_un, sun_path) + strlen(addr->un.sun_path) + 1));
139 else
140#endif /* AF_LOCAL */
141 if (addr->addr.sa_family == AF_INET)
142 return (sizeof(addr->ipv4));
143 else
144 return (0);
145
146}
147
148
149/*

Callers 9

try_connectFunction · 0.85
cups_rresvportFunction · 0.85
lpd_queueFunction · 0.85
http-addrlist.cFile · 0.85
httpAddrListenFunction · 0.85
httpAddrLookupFunction · 0.85
ifFunction · 0.85
_cupsSNMPWriteFunction · 0.85
http_resolve_cbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected