Lines Matching full:lnk

191 TcpMonitorIn(uint16_t th_flags, struct alias_link *lnk)  in TcpMonitorIn()  argument
193 switch (GetStateIn(lnk)) { in TcpMonitorIn()
196 SetStateIn(lnk, ALIAS_TCP_STATE_DISCONNECTED); in TcpMonitorIn()
198 SetStateIn(lnk, ALIAS_TCP_STATE_CONNECTED); in TcpMonitorIn()
202 SetStateIn(lnk, ALIAS_TCP_STATE_DISCONNECTED); in TcpMonitorIn()
208 TcpMonitorOut(uint16_t th_flags, struct alias_link *lnk) in TcpMonitorOut() argument
210 switch (GetStateOut(lnk)) { in TcpMonitorOut()
213 SetStateOut(lnk, ALIAS_TCP_STATE_DISCONNECTED); in TcpMonitorOut()
215 SetStateOut(lnk, ALIAS_TCP_STATE_CONNECTED); in TcpMonitorOut()
219 SetStateOut(lnk, ALIAS_TCP_STATE_DISCONNECTED); in TcpMonitorOut()
291 struct alias_link *lnk; in IcmpAliasIn1() local
298 lnk = FindIcmpIn(la, pip->ip_src, pip->ip_dst, ic->icmp_id, 1); in IcmpAliasIn1()
299 if (lnk != NULL) { in IcmpAliasIn1()
303 original_id = GetOriginalPort(lnk); in IcmpAliasIn1()
317 original_address = GetOriginalAddress(lnk); in IcmpAliasIn1()
339 struct alias_link *lnk; in IcmpAliasIn2() local
350 lnk = FindUdpTcpIn(la, ip->ip_dst, ip->ip_src, in IcmpAliasIn2()
354 lnk = FindUdpTcpIn(la, ip->ip_dst, ip->ip_src, in IcmpAliasIn2()
359 lnk = FindIcmpIn(la, ip->ip_dst, ip->ip_src, ic2->icmp_id, 0); in IcmpAliasIn2()
361 lnk = NULL; in IcmpAliasIn2()
363 lnk = NULL; in IcmpAliasIn2()
365 if (lnk != NULL) { in IcmpAliasIn2()
371 original_address = GetOriginalAddress(lnk); in IcmpAliasIn2()
372 original_port = GetOriginalPort(lnk); in IcmpAliasIn2()
400 original_address = GetOriginalAddress(lnk); in IcmpAliasIn2()
401 original_id = GetOriginalPort(lnk); in IcmpAliasIn2()
480 struct alias_link *lnk; in IcmpAliasOut1() local
487 lnk = FindIcmpOut(la, pip->ip_src, pip->ip_dst, ic->icmp_id, create); in IcmpAliasOut1()
488 if (lnk != NULL) { in IcmpAliasOut1()
492 alias_id = GetAliasPort(lnk); in IcmpAliasOut1()
506 alias_address = GetAliasAddress(lnk); in IcmpAliasOut1()
528 struct alias_link *lnk; in IcmpAliasOut2() local
539 lnk = FindUdpTcpOut(la, ip->ip_dst, ip->ip_src, in IcmpAliasOut2()
543 lnk = FindUdpTcpOut(la, ip->ip_dst, ip->ip_src, in IcmpAliasOut2()
548 lnk = FindIcmpOut(la, ip->ip_dst, ip->ip_src, ic2->icmp_id, 0); in IcmpAliasOut2()
550 lnk = NULL; in IcmpAliasOut2()
552 lnk = NULL; in IcmpAliasOut2()
554 if (lnk != NULL) { in IcmpAliasOut2()
560 alias_address = GetAliasAddress(lnk); in IcmpAliasOut2()
561 alias_port = GetAliasPort(lnk); in IcmpAliasOut2()
588 alias_address = GetAliasAddress(lnk); in IcmpAliasOut2()
589 alias_id = GetAliasPort(lnk); in IcmpAliasOut2()
663 struct alias_link *lnk; in ProtoAliasIn() local
670 lnk = FindProtoIn(la, ip_src, pip->ip_dst, ip_p); in ProtoAliasIn()
671 if (lnk != NULL) { in ProtoAliasIn()
674 original_address = GetOriginalAddress(lnk); in ProtoAliasIn()
695 struct alias_link *lnk; in ProtoAliasOut() local
706 lnk = FindProtoOut(la, pip->ip_src, ip_dst, ip_p); in ProtoAliasOut()
707 if (lnk != NULL) { in ProtoAliasOut()
710 alias_address = GetAliasAddress(lnk); in ProtoAliasOut()
747 struct alias_link *lnk; in UdpAliasIn() local
755 lnk = FindUdpTcpIn(la, pip->ip_src, pip->ip_dst, in UdpAliasIn()
758 if (lnk != NULL) { in UdpAliasIn()
767 .lnk = lnk, in UdpAliasIn()
776 alias_address = GetAliasAddress(lnk); in UdpAliasIn()
777 original_address = GetOriginalAddress(lnk); in UdpAliasIn()
778 proxy_address = GetProxyAddress(lnk); in UdpAliasIn()
780 ud->uh_dport = GetOriginalPort(lnk); in UdpAliasIn()
781 proxy_port = GetProxyPort(lnk); in UdpAliasIn()
838 struct alias_link *lnk; in UdpAliasOut() local
880 lnk = FindUdpTcpOut(la, pip->ip_src, pip->ip_dst, in UdpAliasOut()
883 if (lnk != NULL) { in UdpAliasOut()
887 .lnk = lnk, in UdpAliasOut()
900 SetProxyPort(lnk, dest_port); in UdpAliasOut()
901 SetProxyAddress(lnk, dest_address); in UdpAliasOut()
902 ProxyModify(la, lnk, pip, maxpacketsize, proxy_type); in UdpAliasOut()
906 alias_address = GetAliasAddress(lnk); in UdpAliasOut()
907 alias_port = GetAliasPort(lnk); in UdpAliasOut()
940 struct alias_link *lnk; in TcpAliasIn() local
950 lnk = FindUdpTcpIn(la, pip->ip_src, pip->ip_dst, in TcpAliasIn()
954 if (lnk != NULL) { in TcpAliasIn()
969 .lnk = lnk, in TcpAliasIn()
981 alias_address = GetAliasAddress(lnk); in TcpAliasIn()
982 original_address = GetOriginalAddress(lnk); in TcpAliasIn()
983 proxy_address = GetProxyAddress(lnk); in TcpAliasIn()
985 tc->th_dport = GetOriginalPort(lnk); in TcpAliasIn()
986 proxy_port = GetProxyPort(lnk); in TcpAliasIn()
995 .lnk = lnk, in TcpAliasIn()
1027 if (GetAckModified(lnk) == 1) { in TcpAliasIn()
1031 delta = GetDeltaAckIn(tc->th_ack, lnk); in TcpAliasIn()
1056 TcpMonitorIn(__tcp_get_flags(tc), lnk); in TcpAliasIn()
1073 struct alias_link *lnk; in TcpAliasOut() local
1111 lnk = FindUdpTcpOut(la, pip->ip_src, pip->ip_dst, in TcpAliasOut()
1114 if (lnk == NULL) in TcpAliasOut()
1116 if (lnk != NULL) { in TcpAliasOut()
1121 .lnk = lnk, in TcpAliasOut()
1134 SetProxyPort(lnk, dest_port); in TcpAliasOut()
1135 SetProxyAddress(lnk, dest_address); in TcpAliasOut()
1136 ProxyModify(la, lnk, pip, maxpacketsize, proxy_type); in TcpAliasOut()
1140 alias_port = GetAliasPort(lnk); in TcpAliasOut()
1141 alias_address = GetAliasAddress(lnk); in TcpAliasOut()
1145 TcpMonitorOut(__tcp_get_flags(tc), lnk); in TcpAliasOut()
1159 if (GetAckModified(lnk) == 1) { in TcpAliasOut()
1163 delta = GetDeltaSeqOut(tc->th_seq, lnk); in TcpAliasOut()
1206 struct alias_link *lnk; in FragmentIn() local
1209 lnk = FindFragmentIn2(la, ip_src, pip->ip_dst, ip_id); in FragmentIn()
1210 if (lnk != NULL) { in FragmentIn()
1213 GetFragmentAddr(lnk, &original_address); in FragmentIn()
1253 struct alias_link *lnk; in LibAliasSaveFragment() local
1258 lnk = AddFragmentPtrLink(la, pip->ip_src, pip->ip_id); in LibAliasSaveFragment()
1260 if (lnk != NULL) { in LibAliasSaveFragment()
1261 SetFragmentPtr(lnk, ptr); in LibAliasSaveFragment()
1271 struct alias_link *lnk; in LibAliasGetFragment() local
1277 lnk = FindFragmentPtr(la, pip->ip_src, pip->ip_id); in LibAliasGetFragment()
1278 if (lnk != NULL) { in LibAliasGetFragment()
1279 GetFragmentPtr(lnk, &fptr); in LibAliasGetFragment()
1280 SetFragmentPtr(lnk, NULL); in LibAliasGetFragment()
1281 SetExpire(lnk, 0); /* Deletes link */ in LibAliasGetFragment()
1375 .lnk = NULL, in LibAliasInLocked()
1400 struct alias_link *lnk; in LibAliasInLocked() local
1402 lnk = FindFragmentIn1(la, pip->ip_src, alias_addr, pip->ip_id); in LibAliasInLocked()
1403 if (lnk != NULL) { in LibAliasInLocked()
1405 SetFragmentAddr(lnk, pip->ip_dst); in LibAliasInLocked()
1529 .lnk = NULL, in LibAliasOutLocked()
1568 struct alias_link *lnk; in LibAliasUnaliasOut() local
1585 lnk = FindUdpTcpIn(la, pip->ip_dst, pip->ip_src, in LibAliasUnaliasOut()
1589 lnk = FindUdpTcpIn(la, pip->ip_dst, pip->ip_src, in LibAliasUnaliasOut()
1593 lnk = FindIcmpIn(la, pip->ip_dst, pip->ip_src, ic->icmp_id, 0); in LibAliasUnaliasOut()
1595 lnk = NULL; in LibAliasUnaliasOut()
1598 if (lnk != NULL) { in LibAliasUnaliasOut()
1604 original_address = GetOriginalAddress(lnk); in LibAliasUnaliasOut()
1605 original_port = GetOriginalPort(lnk); in LibAliasUnaliasOut()
1638 original_address = GetOriginalAddress(lnk); in LibAliasUnaliasOut()
1639 original_id = GetOriginalPort(lnk); in LibAliasUnaliasOut()