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

Function FragmentIn

freebsd/netinet/libalias/alias.c:1196–1215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1194 u_short *ip_sum);
1195
1196static int
1197FragmentIn(struct libalias *la, struct in_addr ip_src, struct ip *pip,
1198 u_short ip_id, u_short *ip_sum)
1199{
1200 struct alias_link *lnk;
1201
1202 LIBALIAS_LOCK_ASSERT(la);
1203 lnk = FindFragmentIn2(la, ip_src, pip->ip_dst, ip_id);
1204 if (lnk != NULL) {
1205 struct in_addr original_address;
1206
1207 GetFragmentAddr(lnk, &original_address);
1208 DifferentialChecksum(ip_sum,
1209 &original_address, &pip->ip_dst, 2);
1210 pip->ip_dst = original_address;
1211
1212 return (PKT_ALIAS_OK);
1213 }
1214 return (PKT_ALIAS_UNRESOLVED_FRAGMENT);
1215}
1216
1217static int
1218FragmentOut(struct libalias *la, struct ip *pip, u_short *ip_sum)

Callers 1

LibAliasInLockedFunction · 0.85

Calls 3

FindFragmentIn2Function · 0.85
GetFragmentAddrFunction · 0.85
DifferentialChecksumFunction · 0.85

Tested by

no test coverage detected