• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Distinguishing between ppp and ethernet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distinguishing between ppp and ethernet


  • Subject: Re: Distinguishing between ppp and ethernet
  • From: Andrew <email@hidden>
  • Date: Sun, 2 Jun 2002 03:50:13 +1200

Begin forwarded message:

> From: Andrew <email@hidden>
> Date: Sat Jun 01, 2002 03:33:16 PM Pacific/Auckland
> To: Quinn <email@hidden>
> Subject: Re: Distinguishing between ppp and ethernet
>
> Hi Quinn,
>
>
> thanks for your reply.
>>
>> At 10:05 +1200 29/5/02, Andrew wrote:
>>> Also, there is currently no way of determining whether a connection
>>> will cause a dialup using rb sockets...they have a pppstatus but
>>> obviously its value is only relevant if the user is actually using a
>>> ppp interface....and there is no way of determining this without
>>> initiating a connection and seeing whether the pppstatus changes.
>>
>> OK, this is really easy. System Configuration framework provides two
>> high-level APIS, SCNetworkCheckReachabilityByAddress and
>> SCNetworkCheckReachabilityByName, that will tell you if connecting to a
>> specific address is likely to trigger a dial.
>
> outstanding, thanks.
>
> <snip>
>
>>
>> My guess is that they're suffering from stale source addresses. In
>> traditional Mac OS when the PPP connection goes down OT tears down all
>> of the TCP/IP endpoints. However, this doesn't happen on Mac OS X. If
>> the endpoint is bound to a specific source address (typically this
>> happens when you connect) and the interface goes down, taking with it
>> that source address, the endpoint becomes useless. Even if you
>> reconnect the endpoint is still useless unless the PPP server happens to
>> hand you back the original source address.
>
> Makes some sense, presumably that means the solution in a c++ app would
> be to dispose of the endpoint and request a new one....?
>
> One point I didn't mention is that if I dispose of the 'Socket' (standard
> rb class for handling tcp/ip), and create a new one, the new socket will
> also return that same error...until the application is restarted. This
> seems counter-intuitive to your explanation, but its likely a different
> problem...wouldn't surprise me if realbasic was failing to clean up some
> memory or somesuch...
>
> The solution to this is to use the SCF dynamic store to monitor the IP
> address list and, when the list changes, make sure that the source
> addresses for all of your endpoints are still valid. I have plans to
> write a sample that shows how to do this (part of a general update to
> Technote 1145) but it's not done yet.
>
> ahh...and if not, dispose and recreate...
> <g> ..Id be very interested in seeing your sample ...
>
> One thing Im going to try is to call CloseOpenTransport() (or whatever
> the actual call is ;) and then re-open it, in the hope that this will
> help (will this tear down the structure for that application?).
>
> I haven't done it yet though...im interested in your thoughts on this..
>
>
> Yours cheerfully,
>
>
> Andrew Bush
>
>>
>>
>
>
>
>
We're a planet of nearly six billion ninnies living in a civilization that
was designed by a few thousand amazingly smart deviants.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Distinguishing between ppp and ethernet
      • From: Quinn <email@hidden>
  • Prev by Date: Getting IP address
  • Next by Date: DHCP server address
  • Previous by thread: Re: Getting IP address
  • Next by thread: Re: Distinguishing between ppp and ethernet
  • Index(es):
    • Date
    • Thread