/** Retransmission timer */
struct retry_timer timer;
+ /** Transmission counter */
+ unsigned int count;
/** Start time of the current state (in ticks) */
unsigned long start;
};
goto done;
}
+ /* (Ab)use the "secs" field to convey metadata about the DHCP
+ * session state into packet traces. Useful for extracting
+ * debug information from non-debug builds.
+ */
+ dhcppkt.dhcphdr->secs = htons ( ( ++(dhcp->count) << 2 ) |
+ ( dhcp->offer.s_addr ? 0x02 : 0 ) |
+ ( dhcp->proxy_offer ? 0x01 : 0 ) );
+
/* Fill in packet based on current state */
if ( ( rc = dhcp->state->tx ( dhcp, &dhcppkt, &peer ) ) != 0 ) {
DBGC ( dhcp, "DHCP %p could not fill DHCP request: %s\n",