NetTalk Central

Author Topic: Request from WAN or LAN  (Read 3811 times)

JZL

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • Email
Request from WAN or LAN
« on: December 29, 2017, 02:57:32 AM »
Is there a function in Nettalk that can tell me if the incoming Request IP is from LAN or WAN or should I know the local network's subnet my self ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Request from WAN or LAN
« Reply #1 on: January 02, 2018, 07:41:59 AM »
>> Is there a function in Nettalk that can tell me if the incoming Request IP is from LAN or WAN or should I know the local network's subnet my self ?

I don't think there's a utility function for this, at the moment.
but you're on the right track.
To determine if it's LAN or WAN compare the FROM IP address to the Subnet Mask, and see if the IP is in the subnet.