| 1260 | } |
| 1261 | |
| 1262 | void * |
| 1263 | LibAliasGetFragment(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 | |
| 1283 | void |
| 1284 | LibAliasFragmentIn(struct libalias *la, void *ptr, /* Points to correctly |
nothing calls this directly
no test coverage detected