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

Function FindLinkIn

freebsd/netinet/libalias/alias_db.c:1270–1298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1268}
1269
1270static struct alias_link *
1271FindLinkIn(struct libalias *la, struct in_addr dst_addr,
1272 struct in_addr alias_addr,
1273 u_short dst_port,
1274 u_short alias_port,
1275 int link_type,
1276 int replace_partial_links)
1277{
1278 struct alias_link *lnk;
1279
1280 LIBALIAS_LOCK_ASSERT(la);
1281 lnk = _FindLinkIn(la, dst_addr, alias_addr, dst_port, alias_port,
1282 link_type, replace_partial_links);
1283
1284 if (lnk == NULL) {
1285 /*
1286 * The following allows permanent links to be specified as
1287 * using the default aliasing address (i.e. device
1288 * interface address) without knowing in advance what that
1289 * address is.
1290 */
1291 if (la->aliasAddress.s_addr != INADDR_ANY &&
1292 alias_addr.s_addr == la->aliasAddress.s_addr) {
1293 lnk = _FindLinkIn(la, dst_addr, la->nullAddress, dst_port, alias_port,
1294 link_type, replace_partial_links);
1295 }
1296 }
1297 return (lnk);
1298}
1299
1300/* External routines for finding/adding links
1301

Callers 11

GetNewPortFunction · 0.85
FindNewPortGroupFunction · 0.85
FindIcmpInFunction · 0.85
FindFragmentIn1Function · 0.85
FindFragmentIn2Function · 0.85
FindFragmentPtrFunction · 0.85
FindProtoInFunction · 0.85
FindUdpTcpInFunction · 0.85
FindPptpInByPeerCallIdFunction · 0.85
FindOriginalAddressFunction · 0.85
FindSctpRedirectAddressFunction · 0.85

Calls 1

_FindLinkInFunction · 0.85

Tested by

no test coverage detected