Re: [Freedos-devel] mTCP DHCP errorlevels (watcom tcp

2011-07-07 Thread Michael B. Brutman
On 7/6/2011 7:10 PM, Bernd Blaauw wrote:
 For DHCP I can imagine various errorlevels for different reasons:
 * missing MTCPCFG variable
 * MTCPCFG variable points to non-existing file
 * missing PACKETINT keyword in file
 * unable to write to MTCPCFG file (yay hidden/readonly)
 * packetdriver not loaded yet
 * static config found in MTCPCFG file
 * time out (no DHCP server found)
 * what else? invalid MTU size?

 Bernd

I have resisted getting too detailed with the errorlevels because I 
would need to make them consistent across all of the applications. At 
some point I'm not going to control all of the applications, so I won't 
be able to enforce it. The user readable error messages are usually 
descriptive enough.  (I might address this by reserving a block of error 
codes for the library, most of which would be used during startup.)

We might have a small misunderstanding about the relationship between 
DHCP and the configuration file.  All of the mTCP applications think 
that they are using a static configuration.  They read the configuration 
file and use what they find.  DHCP is a special case; it is the only 
code that will alter the configuration file.  This allows me to keep all 
of the other code simple while still providing DHCP support; all of the 
other code thinks it is using static configuration and DHCP plays along 
with that fiction.  Therefore, DHCP will usually find a static config in 
the file because it wrote the static config there the last time it was 
run.  (If you are generating the config file each time before calling 
DHCP then finding a static config would seem like a reason to stop, but 
normally it is not.)



Mike



--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] mTCP DHCP errorlevels (watcom tcp

2011-07-07 Thread Bernd Blaauw
Op 7-7-2011 14:08, Michael B. Brutman schreef:
 I have resisted getting too detailed with the errorlevels because I
 would need to make them consistent across all of the applications. At
 some point I'm not going to control all of the applications, so I won't
 be able to enforce it. The user readable error messages are usually
 descriptive enough.  (I might address this by reserving a block of error
 codes for the library, most of which would be used during startup.)

Ah my interest was purely to DHCP.exe here, once that works all 
applications are fine with their semi-static file (except for a lease 
expired, can't run, run DHCP.exe first again or stick to static IP)


 with that fiction.  Therefore, DHCP will usually find a static config in
 the file because it wrote the static config there the last time it was
 run.  (If you are generating the config file each time before calling
 DHCP then finding a static config would seem like a reason to stop, but
 normally it is not.)

Yeah I don't know DHCP.exe's behaviour, was just afraid it would be 
spamming the DHCP server everytime I run it, instead of analysing the 
configuration file's timestamp + lease.

VMware's DHCP gives 1800 seconds lease (NAT-mode), while my router's 
DHCP gives 1 day leases indeed (as does yours).

The tricky situation is a hey lease is still valid, let's not query. 
with meanwhile lease only still being valid like 5 seconds or so.
Trouble ahead :)

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel