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

Function twowords

freebsd/netinet/libalias/alias.c:161–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159#endif
160
161static __inline int
162twowords(void *p)
163{
164 uint8_t *c = p;
165
166#if BYTE_ORDER == LITTLE_ENDIAN
167 uint16_t s1 = ((uint16_t)c[1] << 8) + (uint16_t)c[0];
168 uint16_t s2 = ((uint16_t)c[3] << 8) + (uint16_t)c[2];
169#else
170 uint16_t s1 = ((uint16_t)c[0] << 8) + (uint16_t)c[1];
171 uint16_t s2 = ((uint16_t)c[2] << 8) + (uint16_t)c[3];
172#endif
173 return (s1 + s2);
174}
175
176/* TCP Handling Routines
177

Callers 7

IcmpAliasIn2Function · 0.85
IcmpAliasOut2Function · 0.85
UdpAliasInFunction · 0.85
UdpAliasOutFunction · 0.85
TcpAliasInFunction · 0.85
TcpAliasOutFunction · 0.85
LibAliasUnaliasOutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected