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

Function FindRtspOut

freebsd/netinet/libalias/alias_db.c:1630–1664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1628}
1629
1630struct alias_link *
1631FindRtspOut(struct libalias *la, struct in_addr src_addr,
1632 struct in_addr dst_addr,
1633 u_short src_port,
1634 u_short alias_port,
1635 u_char proto)
1636{
1637 int link_type;
1638 struct alias_link *lnk;
1639
1640 LIBALIAS_LOCK_ASSERT(la);
1641 switch (proto) {
1642 case IPPROTO_UDP:
1643 link_type = LINK_UDP;
1644 break;
1645 case IPPROTO_TCP:
1646 link_type = LINK_TCP;
1647 break;
1648 default:
1649 return (NULL);
1650 break;
1651 }
1652
1653 lnk = FindLinkOut(la, src_addr, dst_addr, src_port, 0, link_type, 1);
1654
1655 if (lnk == NULL) {
1656 struct in_addr alias_addr;
1657
1658 alias_addr = FindAliasAddress(la, src_addr);
1659 lnk = AddLink(la, src_addr, dst_addr, alias_addr,
1660 src_port, 0, alias_port,
1661 link_type);
1662 }
1663 return (lnk);
1664}
1665
1666struct in_addr
1667FindOriginalAddress(struct libalias *la, struct in_addr alias_addr)

Callers 2

protohandlerFunction · 0.85
alias_rtsp_outFunction · 0.85

Calls 3

FindLinkOutFunction · 0.85
FindAliasAddressFunction · 0.85
AddLinkFunction · 0.85

Tested by

no test coverage detected