tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
mapping ICMP codes to Unix errno code numbers
I just filed PR kern/47693 which deals with an immediate deficiency
in our ICMP handling - we don't handle unreachable code 13 valid
code as valid. That needs to be fixed ASAP, and the patch pulled
up to both netbsd-6 and netbsd-5.
However, there's an additional semantic issue for programmers: I
believe Unix needs an additional errno code to indicate "remote
permission denied" as distinct from "connection refused" (daemon's
not listening on that port). There are multiple ICMP unreachable
codes which make this semantic error distinction.
I don't think we can use EPERM itself because using EPERM would
likely confuse the programmer/user as to where permission is being
refused: locally or remotely, and that's a key piece of information
needed to diagnose and remedy application failure.
This is something that all the BSDs (and Linux) should do, too.
I suggest:
EPEERPERM (number TBD) "peer refused permission"
or
ERMTPERM (number TBD) "remote host refused permission"
Erik <fair%netbsd.org@localhost>
Home |
Main Index |
Thread Index |
Old Index