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

Function FindProtoIn

freebsd/netinet/libalias/alias_db.c:1417–1438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1415}
1416
1417struct alias_link *
1418FindProtoIn(struct libalias *la, struct in_addr dst_addr,
1419 struct in_addr alias_addr,
1420 u_char proto)
1421{
1422 struct alias_link *lnk;
1423
1424 LIBALIAS_LOCK_ASSERT(la);
1425 lnk = FindLinkIn(la, dst_addr, alias_addr,
1426 NO_DEST_PORT, 0,
1427 proto, 1);
1428
1429 if (lnk == NULL && !(la->packetAliasMode & PKT_ALIAS_DENY_INCOMING)) {
1430 struct in_addr target_addr;
1431
1432 target_addr = FindOriginalAddress(la, alias_addr);
1433 lnk = AddLink(la, target_addr, dst_addr, alias_addr,
1434 NO_SRC_PORT, NO_DEST_PORT, 0,
1435 proto);
1436 }
1437 return (lnk);
1438}
1439
1440struct alias_link *
1441FindProtoOut(struct libalias *la, struct in_addr src_addr,

Callers 1

ProtoAliasInFunction · 0.85

Calls 3

FindLinkInFunction · 0.85
FindOriginalAddressFunction · 0.85
AddLinkFunction · 0.85

Tested by

no test coverage detected