Re: Catching very specific exceptions



"Harlin Seritt" <harlinseritt@xxxxxxxxx> wrote:
> I am finding that with the many quirks (and really bad foundation for
> Win32 APIs) that I am having to write a lot of voodoo code so to speak.

Yeah, tell me about it. My current project at work is porting our IPv6
management package (including ICMP ping) to windows; "many quirks" would be
a good way to describe it!

> If I use a dummy port... let's say port 10001 for example... I can
> attempt to connect to a machine at this port. If I get an error that
> says "Connection refused", I know that the node is up but is just not
> going to allow a connection.

Maybe. It could be that some firewall between you and the target is
blocking things. Depending on how the firewall is programmed, this may
show up as a timeout or as a connection refused (although the former would
be more common).

It's also not always a clear-cut question what "up" means. Some operating
systems can get into modes where for all intents and purposes they've
crashed, but they're still answering pings and/or actively refusing
connections.

The traditional way to tell if a node is up is to send it an ICMP echo
request, rather than trying to connect to a TCP port. You might want to
look into using that instead of trying to connect to random ports. Not
that that ICMP doesn't have its own problems :-)
.



Relevant Pages

  • Re: AD what tcp/ip port or registry settings?
    ... Assuming that you applied the TCP/IP port value to all DC/GCs and rebooted ... I'm still swaying toward a hang-up on the member clients not being ... ICMP did not work over our Frame over ATM links. ... > on the both DC which are also behind the firewall. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Firewalls: whats the use?
    ... >> control the types of ICMP message sent and received. ... Do I really need to implement a firewall just to prevent ICMP? ... packet to crash the OS. ... especially in cases where the packet was destined to a port where no ...
    (comp.os.linux.security)
  • Re: AD what tcp/ip port or registry settings?
    ... > Yes ICMP is allowed. ... > is on the both DC which are also behind the firewall. ... > I think that it have to do with RPC, which is comunicating on one port ... >> I'm also assuming that the client workstations point to a DNS server ...
    (microsoft.public.windows.server.active_directory)
  • ICMP pokes holes in firewalls...
    ... Traceroute uses two protocols: UDP and ICMP ... A system inside a firewall performs a traceroute to a system ... Traceroute chooses the next available UDP port. ...
    (Bugtraq)
  • Re: Did I obfuscate my usenet newsreader & who I am in this posting?
    ... Responding to ICMP ping is not necessarily a ... firewall checkers and port scanners that will do the same thing. ... criteria, all open ports are evil, dangerous, and a security risk. ...
    (misc.news.internet.discuss)