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

Function LibAliasGetFragment

freebsd/netinet/libalias/alias.c:1262–1281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1260}
1261
1262void *
1263LibAliasGetFragment(struct libalias *la, void *ptr)
1264{
1265 struct alias_link *lnk;
1266 void *fptr;
1267 struct ip *pip;
1268
1269 LIBALIAS_LOCK(la);
1270 pip = (struct ip *)ptr;
1271 lnk = FindFragmentPtr(la, pip->ip_src, pip->ip_id);
1272 if (lnk != NULL) {
1273 GetFragmentPtr(lnk, &fptr);
1274 SetFragmentPtr(lnk, NULL);
1275 SetExpire(lnk, 0); /* Deletes link */
1276 } else
1277 fptr = NULL;
1278
1279 LIBALIAS_UNLOCK(la);
1280 return (fptr);
1281}
1282
1283void
1284LibAliasFragmentIn(struct libalias *la, void *ptr, /* Points to correctly

Callers

nothing calls this directly

Calls 4

FindFragmentPtrFunction · 0.85
GetFragmentPtrFunction · 0.85
SetFragmentPtrFunction · 0.85
SetExpireFunction · 0.85

Tested by

no test coverage detected