added missing <sys/stat.h> include
fixed broken memset() call
configure: changed CFLAGS

do not warn about unused functions; warn about shadowed variables.

Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de>
updated e-mail address and copyright dates

Signed-off-by: Enrico Scholz <ensc@ensc.de>
documented parsing states

(from Michael Rack)

Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de>
minor whitespace and cosmetical cleanups
renamed xxx_ID to xxx_AGENT_INFO

later patches will generalize handling of option 82 so that
this naming is more appropriate
removed 'inline' annotations

they do not make very much sense within .c files.

Signed-off-by: Enrico Scholz <ensc@ensc.de>
removed 'register' annotations

they are useless with recent toolchains

Signed-off-by: Enrico Scholz <ensc@ensc.de>
use [] instead of __flexarr

flexible arrays are standard C for some years. Use them.
removed #ifdef ENABLE_AGENT_REPLACE blocks

use C statements to execute the corresponding code. Reorganized code a
little bit.

Signed-off-by: Enrico Scholz <ensc@ensc.de>
ignore files generated by 'make check' of recent automake

Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de>
testsuite: compile used sources instead of using objects

this is required for running the testsuite through gcov
testsuite: build with gcov support
DHCP_removeOption(): return number of removed bytes and update end-ptr
DHCP_ptrdiff(): added helper function
testsuite: added writeIP helper
testsuite: added testsuite for the ip crc calculation

Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de>
rewrote calculateCheckSum()

this fixes possible alignment problems and code should be more clean now
rewrote relay-agent handling; added 'suboption' configuration tag

This changeset improves handling of relay-agent options in several ways:

- they can be set by a 'suboption' configuration option; the 'name'
  option which sets the RFC 3046 agent-id still persists but can now be
  expressed by 'suboption eth0 2 my-id' too.  Further patches will add
  support for some other options.

- these suboptions will be stored in a common datastructure now.  Due
  to this change, the code which dealed with the agent-id had to be
  rewritten.

- the new code is able to replace multiple 0x82 relay-agent options
  which is more RFC compliant than previous versions which handled only
  one 0x82 option.

There was added a testsuite which verifies this functionality.

Thanks to Michael Rack for suggesting the 'suboption' configuration tag
and initial code.