adhcp.git
3 years agoUse Long_Long_Integer for time conversion in D-Bus notify v0.5.1
Adrian-Ken Rueegsegger [Wed, 28 Mar 2018 16:22:01 +0000 (18:22 +0200)]
Use Long_Long_Integer for time conversion in D-Bus notify

Lifetimes are 32-bit numbers which cannot be represented by the Natural
type.

Auditors: reet

3 years agoTrim lease times before appending to D-Bus args
Adrian-Ken Rueegsegger [Tue, 27 Feb 2018 10:36:07 +0000 (11:36 +0100)]
Trim lease times before appending to D-Bus args

Otherwise the arguments will have a leading whitespace.

Auditors: reet

3 years agoMinor cleanups in GPRs and Makefile v0.5
Nicolas Boulenguez [Sat, 26 Aug 2017 16:26:27 +0000 (18:26 +0200)]
Minor cleanups in GPRs and Makefile

Summary: Thanks to Nicolas Boulenguez for the patches.

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D685

3 years agoAllow user to override build flags
Nicolas Boulenguez [Sat, 26 Aug 2017 16:26:27 +0000 (18:26 +0200)]
Allow user to override build flags

3 years agoUse Make pattern for similar recipes
Nicolas Boulenguez [Sat, 26 Aug 2017 16:26:05 +0000 (18:26 +0200)]
Use Make pattern for similar recipes

3 years agoSimplify transmission of compiler options
Nicolas Boulenguez [Sat, 26 Aug 2017 16:25:37 +0000 (18:25 +0200)]
Simplify transmission of compiler options

3 years agoSimplify transmission of linker options
Nicolas Boulenguez [Sat, 26 Aug 2017 16:24:37 +0000 (18:24 +0200)]
Simplify transmission of linker options

Use them for tools and notifiers.

3 years agoSimplify transmission of binder options
Nicolas Boulenguez [Sat, 26 Aug 2017 16:23:53 +0000 (18:23 +0200)]
Simplify transmission of binder options

3 years agoVarious minor cleanups and fixes
Reto Buerki [Fri, 9 Feb 2018 14:22:51 +0000 (15:22 +0100)]
Various minor cleanups and fixes

Summary:
Update documentation (man page, DHCPv4 RFC conformity and README).

Switch to gprbuild in Makefile since gnatmake is deprecated.

Update to latest Anet version and drop unneeded use type clauses.

Reviewers: reet

Reviewed By: reet

Differential Revision: https://dev.codelabs.ch/D684

3 years agoUpdate to Anet version 0.4
Reto Buerki [Fri, 9 Feb 2018 14:22:51 +0000 (15:22 +0100)]
Update to Anet version 0.4

3 years agoDrop unneeded use type clauses
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 13:54:25 +0000 (14:54 +0100)]
Drop unneeded use type clauses

3 years agoREADME: Update licence
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 11:13:15 +0000 (12:13 +0100)]
README: Update licence

3 years agoMakefile: Switch to gprbuild
Adrian-Ken Rueegsegger [Thu, 13 Oct 2016 13:41:23 +0000 (15:41 +0200)]
Makefile: Switch to gprbuild

3 years agoAdd RFC 5227: IPv4 Address Conflict Detection
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 11:08:44 +0000 (12:08 +0100)]
Add RFC 5227: IPv4 Address Conflict Detection

3 years agoUpdate DHCPv4 RFC conformity due to ACD implementation
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 11:07:22 +0000 (12:07 +0100)]
Update DHCPv4 RFC conformity due to ACD implementation

3 years agodoc: Extend adhcp_client man page
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 11:00:35 +0000 (12:00 +0100)]
doc: Extend adhcp_client man page

3 years agoImplement IPv4 address collision detection (ACD)
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 10:44:35 +0000 (11:44 +0100)]
Implement IPv4 address collision detection (ACD)

Summary:
Closes T471. Add DHCPv4.ACD package which implements the Probe and Announce
subprograms for IPv4 address collision detection as specified by RFC 5227.

The Announce procedure announces that the specified IPv4 address is used by
sending gratitious ARP messages. Further announcements are scheduled via the
Announce timing events with the delay interval ANNOUNCE_INTERVAL specified in
the RFC.

The Probe procedure sends ARP probes for the given IPv4 address and reports if
a collision was detected. According to the RFC a conflict exists if either
another host reports use of the probed IP address or a second host is
concurrently probing for the same IP address.

ACD is performed upon reception of an ACK message in Requesting state before
the IP address is about to be used. If a collision is detected, a DHCP DECLINE
message is sent to the server and the IP acquisition process is restarted.
When no collision is detected the use of the IP address is then announced.

The DHCPv4 client command line option -A controls if ACD is performed. The
described operations are only performed if ACD has been enabled. The
adhcp_client_wrapper has been adjusted to enabled ACD by default.

The new arp-probe scapy helper script can be used to send ARP probes for a
given IPv4 address: arp-probe <IP address>. It is helpful to trigger address
collisions when sending an ARP probe while the DHCPv4 client is trying to
acquire an address.

Finally, fix DHCP.Random.Get to correctly scale the random value by (High -
Low). The problem was operator ordering.

Test Plan:
Verified that adhcp_client behavior is unchanged if -A parameter is *not*
given. Checked that collisions are detected with -A and announcements are sent
upon successful IP address acquisition. Also verified that after 10 collisions
the rate limiting interval is applied.

Reviewers: reet

Reviewed By: reet

Maniphest Tasks: T471

Differential Revision: https://dev.codelabs.ch/D683

3 years agoUse RESTART_DELAY constant in Requesting state
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 10:44:35 +0000 (11:44 +0100)]
Use RESTART_DELAY constant in Requesting state

3 years agoAdd RESTART_DELAY constant
Adrian-Ken Rueegsegger [Fri, 2 Feb 2018 10:43:15 +0000 (11:43 +0100)]
Add RESTART_DELAY constant

The restart delay is specified in a bit of a round-about way in RFC
2131, section 3.1 enumerated item 5:

  The client SHOULD wait a minimum of ten seconds before restarting the
  configuration process to avoid excessive network traffic in case of
  looping.

3 years agoSimplify iface name handling in ACD
Reto Buerki [Fri, 2 Feb 2018 08:33:48 +0000 (09:33 +0100)]
Simplify iface name handling in ACD

3 years agoAdd arp-probe scapy helper script
Adrian-Ken Rueegsegger [Thu, 1 Feb 2018 15:04:18 +0000 (16:04 +0100)]
Add arp-probe scapy helper script

The tool can be used to send an ARP probe for a specified address.

Usage: arp-probe <IP address>

3 years agoHandle reception of invalid ARP messages gracefully
Adrian-Ken Rueegsegger [Thu, 1 Feb 2018 14:18:30 +0000 (15:18 +0100)]
Handle reception of invalid ARP messages gracefully

3 years agoMake simultaneous probe detection more strict
Reto Buerki [Thu, 1 Feb 2018 12:59:21 +0000 (13:59 +0100)]
Make simultaneous probe detection more strict

An ARP probe is a request/reply with the sender IP address set to all
zeros (2.1.1). Otherwise an ordinary ARP request from another host is
detected as probe.

3 years agoEnable IPv4 ACD by default in client wrapper
Adrian-Ken Rueegsegger [Thu, 1 Feb 2018 10:32:41 +0000 (11:32 +0100)]
Enable IPv4 ACD by default in client wrapper

3 years agoLog ACD announcements
Adrian-Ken Rueegsegger [Thu, 1 Feb 2018 09:35:11 +0000 (10:35 +0100)]
Log ACD announcements

3 years agoAnnounce IP use after processing ACK with ACD enabled
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 17:06:53 +0000 (18:06 +0100)]
Announce IP use after processing ACK with ACD enabled

3 years agoDrop HW address from ACD.Announce
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 15:42:13 +0000 (16:42 +0100)]
Drop HW address from ACD.Announce

Use the MAC address which was specified during ACD initialization.

3 years agoAdd test for ACD.Initialize procedure
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 16:15:33 +0000 (17:15 +0100)]
Add test for ACD.Initialize procedure

It is now very easily testable since it does not perform any socket
operations.

3 years agoOnly open ARP socket when it is actually used
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 13:31:56 +0000 (14:31 +0100)]
Only open ARP socket when it is actually used

Otherwise if the socket remains open it will receive any ARP messages
that might be received by the interface.

3 years agoExtend collision count reset test
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 15:33:35 +0000 (16:33 +0100)]
Extend collision count reset test

Verify that the collision count is reset after successful probing
without a collision.

3 years agoMinor: Fix alignment
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 15:24:16 +0000 (16:24 +0100)]
Minor: Fix alignment

3 years agoPerform Address Collision Detection
Adrian-Ken Rueegsegger [Wed, 31 Jan 2018 13:32:09 +0000 (14:32 +0100)]
Perform Address Collision Detection

Prior to using an offered address, perform ACD according to RFC 5227 and
notify the server by sending a DECLINE message if a collision was
detected.

3 years agoFactor out restarting of Transaction in Requesting state
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 22:03:55 +0000 (23:03 +0100)]
Factor out restarting of Transaction in Requesting state

3 years agoDHCPv4 client: Enable ACD depending on -A parameter
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 17:05:05 +0000 (18:05 +0100)]
DHCPv4 client: Enable ACD depending on -A parameter

If the new -A command line parameter is specified, then Address
Collision Detection according to RFC 5227 is performed.

3 years agoOnly send announcements if ACD is enabled
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 17:04:03 +0000 (18:04 +0100)]
Only send announcements if ACD is enabled

3 years agoOnly perform collision detection if enabled
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 16:55:51 +0000 (17:55 +0100)]
Only perform collision detection if enabled

3 years agoUse separate Sleep procedure for ACD delays
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 15:09:11 +0000 (16:09 +0100)]
Use separate Sleep procedure for ACD delays

This improves testability since we can provide a different Sleep
implementation for tests which allows to validate delay interval values and
speeds up tests since no actual delaying happens.

3 years agoImplement DHCPv4.ACD.Probe subprogram
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 16:47:17 +0000 (17:47 +0100)]
Implement DHCPv4.ACD.Probe subprogram

The procedure probes if the given IPv4 address is already in use on the
local network link.

3 years agoFix DHCP.Random.Get
Adrian-Ken Rueegsegger [Tue, 30 Jan 2018 11:02:24 +0000 (12:02 +0100)]
Fix DHCP.Random.Get

The random value must be scaled by (High - Low). The problem was
operator ordering.

3 years agoRestrict ACD announcements to ANNOUNCEMENT_NUM
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 15:45:44 +0000 (16:45 +0100)]
Restrict ACD announcements to ANNOUNCEMENT_NUM

Add Announcement_Count parameter to ACD.Announce procedure which
specifies how many announcements should be performed. Pass decremented
count value to announce event and only schedule event if count is
greater than one.

3 years agoSchedule announce event in ACD.Announce
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 15:42:58 +0000 (16:42 +0100)]
Schedule announce event in ACD.Announce

Schedule an announce timing event delayed by ANNOUNCE_INTERVAL.

3 years agoAdd DHCPv4.Constants package
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 15:38:36 +0000 (16:38 +0100)]
Add DHCPv4.Constants package

The package currently defines constants required for IPv4 Address
Conflict Detection specified by RFC 5227.

3 years agoImplement DHCPv4.ACD.Initialize procedure
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 17:22:49 +0000 (18:22 +0100)]
Implement DHCPv4.ACD.Initialize procedure

The procedure sets information for the interface designated for sending
ARP messages and sets up the ARP socket by binding it to the designated
interface and enabling non-blocking mode.

3 years agoImplement DHCPv4.Timing_Events.Announce
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 14:39:56 +0000 (15:39 +0100)]
Implement DHCPv4.Timing_Events.Announce

The new event can be used to send an ARP announcement for a given IP/HW
address combination.

3 years agoAdd DHCPv4.ACD package
Adrian-Ken Rueegsegger [Mon, 29 Jan 2018 14:14:43 +0000 (15:14 +0100)]
Add DHCPv4.ACD package

The package will implement RFC 5227: IPv4 Address Conflict Detection.
Currently it provides the procedure Announce which announces that the
specified IPv4 address is used by the interface with the given hardware
address via ARP messages.

3 years agoMiscellaneous fixes
Adrian-Ken Rueegsegger [Tue, 14 Nov 2017 16:00:45 +0000 (17:00 +0100)]
Miscellaneous fixes

Summary:
Adapt to latest Anet changes and use IPv6 shortform addresses.

Drop unneeded use clauses to fix compiler warnings issued by current
GNAT compilers.

Append lease times as Natural to D-Bus args as duration is a fixed-point
type but we actually want a natural number string.

Test Plan:
Verified that DHCPv4 and v6 clients work as expected and are able to
acquire an IP address.

Reviewers: reet

Reviewed By: reet

Differential Revision: https://dev.codelabs.ch/D665

3 years agoAdapt to IPv6 shortform addresses
Adrian-Ken Rueegsegger [Tue, 14 Nov 2017 16:00:45 +0000 (17:00 +0100)]
Adapt to IPv6 shortform addresses

Anet by default now provides shortform IPv6 address strings.

3 years agoAppend lease times as Natural to D-Bus args
Adrian-Ken Rueegsegger [Thu, 2 Nov 2017 15:06:50 +0000 (16:06 +0100)]
Append lease times as Natural to D-Bus args

Duration is a fixed-point type but we actually want a natural number
string.

3 years agoDrop unneeded use clauses
Adrian-Ken Rueegsegger [Fri, 6 Oct 2017 13:33:29 +0000 (15:33 +0200)]
Drop unneeded use clauses

3 years agoAdapt to latest Anet changes
Adrian-Ken Rueegsegger [Fri, 6 Oct 2017 13:32:41 +0000 (15:32 +0200)]
Adapt to latest Anet changes

3 years agoMake adhcp_client work with Debian stretch
Reto Buerki [Wed, 6 Sep 2017 15:20:48 +0000 (17:20 +0200)]
Make adhcp_client work with Debian stretch

Summary:
Closes T447. Factor out D-Bus send operation to separate package. This
is in preparation of making the actual publish method configurable. The
existing implementation uses an asynchronous D-Bus signal.

Make D-Bus target configurable by project variable.

Move Add_Lease_Data for V4 to Dbus_Target package. This allows us to
change option names depending on the D-Bus target.

Add NetworkManager method call target. Newer NetworkManagers use a sync
method call for the communication with the spawned DHCP client instead
of an asynchronous signal. Also, two option names have changed, so we
need to mangle them before sending the D-Bus message.

Add method variant to D-Bus target configuration variable and make this
the default.

Test Plan:
Verified that adhcp_client successfully acquires IPv4 and IPv6 addresses
on Debian GNU/Linux 9 with NetworkManager package 1.6.2-3. Thanks to ken
for assuring that acquiring an address still works on Debian jessie.

Reviewers: ken

Reviewed By: ken

Maniphest Tasks: T447

Differential Revision: https://dev.codelabs.ch/D642

3 years agoMake method the default D-Bus target
Reto Buerki [Wed, 6 Sep 2017 15:20:48 +0000 (17:20 +0200)]
Make method the default D-Bus target

3 years agoAdd method variant to D-Bus target variable
Reto Buerki [Wed, 6 Sep 2017 15:20:21 +0000 (17:20 +0200)]
Add method variant to D-Bus target variable

3 years agoAdd NetworkManager method call target
Reto Buerki [Wed, 6 Sep 2017 15:18:57 +0000 (17:18 +0200)]
Add NetworkManager method call target

Newer NetworkManagers use a sync method call for the communication with
the spawned DHCP client instead of an asynchronous signal. Also, two
option names have changed, so we need to mangle them before sending the
D-Bus message.

3 years agoMove Add_Lease_Data for V4 to Dbus_Target package
Reto Buerki [Wed, 6 Sep 2017 15:11:48 +0000 (17:11 +0200)]
Move Add_Lease_Data for V4 to Dbus_Target package

This allows us to change option names depending on the D-Bus target.

3 years agoFactor out To_Byte_Array to Utils_D_Bus package
Reto Buerki [Wed, 6 Sep 2017 15:04:52 +0000 (17:04 +0200)]
Factor out To_Byte_Array to Utils_D_Bus package

3 years agoMake D-Bus target configurable by project var
Reto Buerki [Wed, 6 Sep 2017 14:40:03 +0000 (16:40 +0200)]
Make D-Bus target configurable by project var

3 years agoFactor out D-Bus send operation to separate package
Reto Buerki [Wed, 6 Sep 2017 14:35:26 +0000 (16:35 +0200)]
Factor out D-Bus send operation to separate package

The package provides the NetworkManager signal target.

3 years agoMake Adhcp_Publishers.Dbus_Connection package private
Reto Buerki [Wed, 6 Sep 2017 14:05:23 +0000 (16:05 +0200)]
Make Adhcp_Publishers.Dbus_Connection package private

4 years agoExplicitly stop logger in profiler.adb
Reto Buerki [Mon, 24 Apr 2017 12:46:37 +0000 (14:46 +0200)]
Explicitly stop logger in profiler.adb

This is required because the message/options deserialization code
contains a log message now.

Auditors: ken

4 years agoREADME: Update licence v0.4.3
Reto Buerki [Mon, 24 Apr 2017 12:18:34 +0000 (14:18 +0200)]
README: Update licence

Auditors: ken

4 years agoadhcp_relay: Fix termination issues
Reto Buerki [Wed, 9 Nov 2016 16:27:33 +0000 (17:27 +0100)]
adhcp_relay: Fix termination issues

Summary:
In case of a Socket_Error in a receiver task, the registered error
callback signals termination via DHCP.Termination. It is preferable to
listen for such events in main to avoid service hang. Therefore, drop
usage of Signals package in adhcp_relay in favor of DHCP.Termination.

As the network may recover, treat Anet.Socket_Error as temporary failure
in the adhcp_relay send paths. This could happen if e.g. a route is not
yet present. Log a warning message and continue operation.

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D521

4 years agoHandle Anet.Socket_Error in Relay_Server_Message
Reto Buerki [Tue, 18 Oct 2016 15:04:05 +0000 (17:04 +0200)]
Handle Anet.Socket_Error in Relay_Server_Message

4 years agoHandle Anet.Socket_Error in Relay_Client_Message
Reto Buerki [Tue, 18 Oct 2016 14:59:25 +0000 (16:59 +0200)]
Handle Anet.Socket_Error in Relay_Client_Message

In case of adhcp_relay it makes sense to just retry as the network may
recover. Therefore log a warning message and continue operation.

4 years agoadhcp_relay: Correctly use DHCP.Termination package
Reto Buerki [Tue, 18 Oct 2016 14:47:11 +0000 (16:47 +0200)]
adhcp_relay: Correctly use DHCP.Termination package

In case of a Socket_Error in a receiver task, the registered error
callback signals termination via DHCP.Termination. It is preferable to
listen for such events in order to avoid service hang.

4 years agoUpdate README and documentation v0.4.2
Adrian-Ken Rueegsegger [Wed, 12 Oct 2016 15:13:30 +0000 (17:13 +0200)]
Update README and documentation

Summary: Update licence and switch to https URLs in README and doc where possible

Reviewers: reet

Reviewed By: reet

Differential Revision: https://dev.codelabs.ch/D505

4 years agoREADME: Update licence
Adrian-Ken Rueegsegger [Wed, 12 Oct 2016 13:06:41 +0000 (15:06 +0200)]
README: Update licence

4 years agoSwitch to https URLs in README and doc where possible
Adrian-Ken Rueegsegger [Wed, 12 Oct 2016 13:02:21 +0000 (15:02 +0200)]
Switch to https URLs in README and doc where possible

4 years agoUpdate to Anet v0.3.4 and implement notify test
Reto Buerki [Tue, 11 Oct 2016 15:44:36 +0000 (17:44 +0200)]
Update to Anet v0.3.4 and implement notify test

Summary:
Implement test for Observers.Call_External_Notify procedure and update
to Anet version v0.3.4.

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D503

4 years agoImplement test for Observers.Call_External_Notify
Reto Buerki [Tue, 11 Oct 2016 14:42:11 +0000 (16:42 +0200)]
Implement test for Observers.Call_External_Notify

4 years agoUpdate to Anet v0.3.4
Reto Buerki [Tue, 11 Oct 2016 14:02:02 +0000 (16:02 +0200)]
Update to Anet v0.3.4

4 years agoSkip invalid DHCPv4 options during deserialization
Adrian-Ken Rueegsegger [Tue, 11 Oct 2016 13:29:58 +0000 (15:29 +0200)]
Skip invalid DHCPv4 options during deserialization

Summary:
Instead of discarding the entire DHCPv4 message, skip invalid options
after logging diagnostic information.

Additionally, provide offending length or data value in validation error
messages to give more context for debugging purposes.

Assert invalid option messages in tests where appropriate.

Reviewers: reet

Reviewed By: reet

Differential Revision: https://dev.codelabs.ch/D501

4 years agoSkip invalid DHCPv6 options during deserialization
Adrian-Ken Rueegsegger [Tue, 11 Oct 2016 12:47:37 +0000 (14:47 +0200)]
Skip invalid DHCPv6 options during deserialization

Instead of discarding the entire DHCPv6 message, skip invalid
options after logging diagnostic information.

4 years agoAssert invalid option messages where appropriate
Adrian-Ken Rueegsegger [Thu, 29 Sep 2016 14:25:37 +0000 (16:25 +0200)]
Assert invalid option messages where appropriate

4 years agoAdd info to validate exception messages
Adrian-Ken Rueegsegger [Thu, 29 Sep 2016 14:23:10 +0000 (16:23 +0200)]
Add info to validate exception messages

Provide offending length or data value where appropriate to give more
context for debugging purposes.

4 years agoSkip invalid DHCPv4 options during deserialization
Adrian-Ken Rueegsegger [Thu, 29 Sep 2016 13:57:41 +0000 (15:57 +0200)]
Skip invalid DHCPv4 options during deserialization

Instead of discarding the entire DHCPv4 message, skip invalid options
after logging diagnostic information.

5 years agoMinor test improvements
Adrian-Ken Rueegsegger [Tue, 29 Mar 2016 12:23:19 +0000 (14:23 +0200)]
Minor test improvements

Summary:
Adjust assertion messages in Stateless_Config tests.

Clear timer on Timer Cleanup_Type initialization to makes sure that each test
using the Timer Cleanup_Type has a clear event queue upon start.

Run the DHCPv6.Client tests at the end since the logger is stopped which
prevents further debug output.

Reviewers: reet

Reviewed By: reet

Differential Revision: https://dev.codelabs.ch/D432

5 years agoRe-order DHCPv6 testcases
Adrian-Ken Rueegsegger [Mon, 7 Mar 2016 10:37:21 +0000 (11:37 +0100)]
Re-order DHCPv6 testcases

Run the DHCPv6.Client tests at the end since the logger is stopped which
prevents further debug output.

5 years agoClear timer on Timer Cleanup_Type initialization
Adrian-Ken Rueegsegger [Mon, 7 Mar 2016 10:28:16 +0000 (11:28 +0100)]
Clear timer on Timer Cleanup_Type initialization

This makes sure that each test using the Timer Cleanup_Type has a clear
event queue upon start.

5 years agoAdjust assertion messages in Stateless_Config tests
Adrian-Ken Rueegsegger [Mon, 7 Mar 2016 10:03:51 +0000 (11:03 +0100)]
Adjust assertion messages in Stateless_Config tests

5 years agoDo not include pre-built doc in release tarball
Reto Buerki [Fri, 19 Feb 2016 08:52:00 +0000 (09:52 +0100)]
Do not include pre-built doc in release tarball

The generated HTML page contains a copy of the TAHI test results which
are 15 MiB in size. This results in a tarball size of roughly 1 MiB.

The user can always build the doc on-demand, all that is needed is
asciidoc.

Auditors: ken

5 years agoRemove linker package from adhcp_notify_dbus.gpr v0.4.1
Reto Buerki [Mon, 15 Feb 2016 14:34:21 +0000 (15:34 +0100)]
Remove linker package from adhcp_notify_dbus.gpr

The -ldbus-1 linker option is now correctly exported by the project file
provided by D_Bus/Ada.

Auditors: ken

5 years agoMinor: Add missing whitespace to log message
Reto Buerki [Mon, 15 Feb 2016 10:08:26 +0000 (11:08 +0100)]
Minor: Add missing whitespace to log message

Auditors: ken

5 years agoSeparate D-Bus/Non-D-Bus notifier build
Reto Buerki [Thu, 10 Dec 2015 17:40:31 +0000 (18:40 +0100)]
Separate D-Bus/Non-D-Bus notifier build

Summary:
Not all systems have D-Bus available. Therefore allow separate building
of D-Bus and non-D-Bus notifiers.

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D400

5 years agoAdd separate D-Bus notifier Makefile targets
Reto Buerki [Thu, 10 Dec 2015 15:55:39 +0000 (16:55 +0100)]
Add separate D-Bus notifier Makefile targets

5 years agoExtend notifier projects from Adhcp_Notify_Common
Reto Buerki [Thu, 10 Dec 2015 14:19:35 +0000 (15:19 +0100)]
Extend notifier projects from Adhcp_Notify_Common

5 years agoAdd adhcp_notify_common.gpr project file
Reto Buerki [Thu, 10 Dec 2015 14:10:08 +0000 (15:10 +0100)]
Add adhcp_notify_common.gpr project file

5 years agoUse new project file to build D-Bus notifiers
Reto Buerki [Thu, 10 Dec 2015 14:08:31 +0000 (15:08 +0100)]
Use new project file to build D-Bus notifiers

5 years agoAdd separate project file for D-Bus notifiers
Reto Buerki [Thu, 10 Dec 2015 14:07:04 +0000 (15:07 +0100)]
Add separate project file for D-Bus notifiers

5 years agoMakefile: Add dependency to build_tests target
Adrian-Ken Rueegsegger [Sat, 5 Dec 2015 17:01:57 +0000 (18:01 +0100)]
Makefile: Add dependency to build_tests target

Make sure that the DHCP.Version package exists when building the tests.
This is required because the DHCPv6.Cmd_Line package makes use of
the version string.

Auditors: reet

5 years agoUnify V4/V6 client version output v0.4
Reto Buerki [Fri, 4 Dec 2015 15:13:19 +0000 (16:13 +0100)]
Unify V4/V6 client version output

Summary:
Add startup message containing version to DHCPv6 client and output
version information in usage text of both clients.

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D393

5 years agoAdd V4 client version to usage text
Reto Buerki [Fri, 4 Dec 2015 14:38:07 +0000 (15:38 +0100)]
Add V4 client version to usage text

5 years agoAdd V6 client version to usage text
Reto Buerki [Fri, 4 Dec 2015 14:34:29 +0000 (15:34 +0100)]
Add V6 client version to usage text

5 years agoAdd v4 suffix to adhcp_client startup message
Reto Buerki [Fri, 4 Dec 2015 14:32:26 +0000 (15:32 +0100)]
Add v4 suffix to adhcp_client startup message

5 years agoAdd startup message to DHCPv6 client
Reto Buerki [Fri, 4 Dec 2015 14:31:46 +0000 (15:31 +0100)]
Add startup message to DHCPv6 client

5 years agoFix issues on 32 bit systems
Reto Buerki [Tue, 1 Dec 2015 13:55:50 +0000 (14:55 +0100)]
Fix issues on 32 bit systems

Summary:
Fix potential overflow in V4/V6 States.Schedule_Timer and make database
tests work on 32 bit systems.

Reviewers: ken

Reviewed By: ken

Differential Revision: https://dev.codelabs.ch/D390

5 years agoAdd DB reference files for 32 bit hosts
Reto Buerki [Tue, 1 Dec 2015 12:30:41 +0000 (12:30 +0000)]
Add DB reference files for 32 bit hosts

5 years agoAdd machine word size suffix to reference DB files
Reto Buerki [Tue, 1 Dec 2015 12:26:18 +0000 (13:26 +0100)]
Add machine word size suffix to reference DB files

5 years agoAdd Get_Word_Size function to Test_Utils package
Reto Buerki [Tue, 1 Dec 2015 12:25:15 +0000 (13:25 +0100)]
Add Get_Word_Size function to Test_Utils package

The function returns the machine word size (32/64) as string.

5 years agoFix potential overflow in V6 States.Schedule_Timer
Adrian-Ken Rueegsegger [Tue, 1 Dec 2015 13:10:58 +0000 (14:10 +0100)]
Fix potential overflow in V6 States.Schedule_Timer

Convert duration to Long_Long_Integer instead of Long_Integer to avoid
issues on on 32 bit systems.