BoundedIntArg: Allow unsigned bounds.

Requested by Cliff Frey. Requires rigamarole. Simultaneously, prefer
click_intmax_t to click_int_large_t and so forth.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Add test for lexer problem reported by Asa Zernik.
Correct lexer error demonstrated by last test.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Support atomic_cmpxchg on architectures that define it as a function

Click uses the C-preprocessor to determine whether an architecture
has defined atomic_cmpxchg. The ARM architecture (among others)
defines this as an inline function, so Click will not attempt
to use atomic_cmpxchg on those architectures. This causes the
warning "using nonatomic approximation..." when building for SMP
on ARM.

Signed-off-by: Kevin Paul Herbert <kph@meraki.net>
Fix ac_cv_linuxmodule_click_skb_recycle test.

Add -Werror-implicit-function-declaration to ac_cv_linuxmodule_click_skb_recycle
test to detect if skb_recycle actually return sk_buff ptr. Otherwise, autoconf
logs a warning about implicit declaration and passes.
fix negative MAXLENGTH support
testcase: Idle -> Print(MAXLENGTH -1) -> Discard;
Update configure as well.
Fix find_left() in empty-string case
String::find_left fixes, again.
packet.cc: Clear tx_flags for kernels with SKBTX_DEV_ZEROCOPY

Ensure that tx_flags is cleared for kernels which have SKBTX_DEV_ZEROCOPY
when uniqueifying a packet. If the flag is not cleared, the kernel
will jump to a random address when the skb is eventually freed.

Signed-off-by: Kevin Paul Herbert <kph@meraki.net>
fixincludes: Add fixup for enum migrate_mode

Add a fixup for enum migrate_mode, added in
mainline Linux a6bc32b899223a877f595ef9ddc1e89ead5072b8.

Apparantly this forward referenced enum was causing problems
for other compilers as well, so the need for this is resolved
in 6536e3123e5d3371a6f52e32a3d0694bcc987702.

Unfortunately, Ubuntu is presently shipping a kernel with this problem.
The change to fixincludes.pl should work for all versions.

Signed-off-by: Kevin Paul Herbert <kph@meraki.net>
Tweak.
String::find_left again.
Fix ntohq/htonq on big-endian machines.

Markku Savela report. Oy.
Bitvector: Fix a bug in explicit Bitvector constructor.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Json: Fix a bug in (const_)?array_iterator
const_array_iterator::live() was not checking for null _cjson; this was causing
segfaults/kernel panics trying to iterate over an empty, non-uniqueified array.
classification.hh: fix bug when matching with an empty program

Any Classifier whose first argument is '-' or '0/??' (or similar I guess) aborts
with:
    vector.hh:288: T& Vector<T>::operator[](int) [with T =
    Classification::Wordwise::Insn]: Assertion `(unsigned) i < (unsigned) vm_.n_'
    failed.

Classifier-02.testie demonstrates the bug.

I think what's going on is that the resulting Program is empty for such cases,
but match() nevertheless tries to initialize a variable with the first
instruction in the Program.  This change just moves the variable declaration and
initialisation to where we know the Program isn't empty, namely the point where
match() would have returned on _output_everything >= 0 for an empty Program.

Cliff Frey reviewed this and made a correction to my initial fix.

Signed-off-by: Patrick Verkaik <patrick@meraki.net>
Trivial clarification.
Avoid compilation warnings.
Add documentation for ProbeRequester