[X-Unix] How to find your DHCP server...

Juan Manuel Palacios jmpalaciosp at eml.cc
Fri Sep 17 13:42:33 PDT 2004


On Sep 17, 2004, at 3:13 PM, William H. Magill wrote:

>
> On 16 Sep, 2004, at 20:37, Juan Manuel Palacios wrote:
>
>>> It does "fail silently," and $? will yield a "1" ... the program DID 
>>> complete successfully, it just had nothing to say about the 
>>> interface.
>>
>> 	OK, not my taste of "feedback" but ok, fair enough...
>
> Not feeback ... that is the way Unix programs have been written since 
> time immemorial!
> (And yes, it is very annoying.)

	Most annoying, yes! I really like it when programs exit with a > 0 
status iff (if and only if) an explicit error was encountered, but 
*not* when they simply didn't have anything to say about what you 
requested. Nevertheless, I realize the very point I defend is 
ambiguous:

$[juan at PowerBook: netwib](238/0,1)-> ls Portfile
-rw-r--r--  1 juan  staff    1K 16 Sep 02:28 Portfile

$[juan at PowerBook: netwib](239/0,1)-> echo $?
0

$[juan at PowerBook: netwib](240/0,1)-> ls aaa
ls: aaa: No such file or directory

$[juan at PowerBook: netwib](241/0,1)-> echo $?
0

	Some could claim ls(1) didn't have anything to say about the 
inexistent "aaa" file and some others could say "an error happened, 
therefore exit status should be > 0". I myself was used to this last 
behavior, as it was default for Jaguar: the second ls(1) attempt would 
have yielded $? == 1. But... "anywho"...

>
>> 	Still, I can't get anything out of ipconfig, and still haven't had 
>> the chance to ask my Darwin friends, maybe will tonight. In any case, 
>> thanks for your reply! Regards,...
>
> "getpacket" will only work if you are talking to a DHCP server 
> directly. ...
> or at least it does when the DCHP server is really a NAT server and is 
> an AEBS.

	Don't exactly know what "getpacket" is, a library ipconfig depends on? 
In any case, I'm getting the feeling "ipconfig" is only meant for DHCP 
networks, which would explain why is has nothing to say about my 
interface because I have fixed IPs.

>
> It "should" work with any DHCP server, but since it's a Microsoft 
> invention, and not standard IP, it might be that the AEBS is gimmicked 
> to respond to it. I don't know.
>
> T.T.F.N.
> William H. Magill
>

	Thanks for the explanations. Regards,...


		Juan




More information about the X-Unix mailing list