hashtabletest: add failing hashcontainer test

This will be fixed in the next commit.
hashcontainer: fix issue with insert_at when used with find(x)

This could corrupt state of the HashContainer.
Merge pull request #25 from clifffrey/hashcontainer-fix

Fix issue with HashContainer API: Some find().insert() sequences lost entries.
(To/From)UserDevice: cleanups, fixups, features

ToUserDevice is now much more configurable, supporting multiple encapsulation
types (none, pcap, and length-delimited).  It also supports acting like a
datagram socket, where each read corresponds to one packet, or like a streaming
socket, where every byte will definitely be returned, but there is no obvious
cutoff between one packet and the next.

FromUserDevice now depends on an existing ToUserDevice element, and the same
character device is used for both directions of communication.

Here is one example usage of ToUserDevice:

  mknod /dev/click_user0 c 241 0
  cat > /click/config <<EOF
    is :: InfiniteSource(LIMIT 10)
    -> UDPIPEncap(1.1.1.1, 11, 2.2.2.2, 22)
    -> EtherEncap(0x0800, 00:01:02:03:04:05, 00:01:02:03:04:06)
    -> tud :: ToUserDevice(0, ENCAP pcap, BLOCKING false)
  EOF
  cat /dev/click_user0 > /tmp/foo.pcap
  tcpdump -n -r /tmp/foo.pcap

Another would just be to use both ToUserDevice and FromUserDevice to create a
file that could be treated like a UDP socket to communicatie with click (but
without using linux's networking stack).

I believe that I fixed the poll() functions for both elements... but I am not at
all confident that they are really bug-free.

I believe that ToUserDevice has multiple potential bugs involved with unloading
the config and/or removing the click kernel module.  The fact that dev_open
stores a pointer to the element object seems quite unsafe, as if the config is
unloaded, the object would be freed.  Also, the fact that the file_operations
object points to functions in the kernel module means that it is necessary to
make sure that all file handles are closed before unloading the kernel module,
and I don't believe that this is done today.  My gut feeling is that the right
fix for both problems is to actually make cleanup() block until all outstanding
file handles are closed.

Signed-off-by: Cliff Frey <cliff@meraki.com>
Actually need to define CLICK_FROMDEVICE_USE_BRIDGE to something.

This bug was also reported.
Unqueue2: Add notification and explicit QUEUES argument.

However, the element should probably just be removed.
Correct RatedSource's use of TokenBucket::assign.

Reported by Lars Bro.
Update FromSimDevice documentation

Signed-off-by: ruben <ruben@net.t-labs.tu-berlin.de>
Make options of FromSimDevice compliant with FromDevice.u

Signed-off-by: ruben <ruben@net.t-labs.tu-berlin.de>
Update ns-2 patches

Signed-off-by: ruben <ruben@net.t-labs.tu-berlin.de>
Merge pull request #27 from rmerz/ruben/ns3click

Ruben/ns3click
Assert context for ElementCast & ElementCastArgs
Missing inline keyword missing can cause multiple, conflicting definitions

In particular, the keyword is missing for StringAccum & operator<<(StringAccum &, const String &)
Bad conversion from bool to pointer, should be NULL
Fix HostInfo default constructor, which didn't actually initialize the object
Implicit conversion to bool is ambiguous because of both operator unspecified_bool_type and operator uint32_t are defined, both of which convert to bool. Since they have the same semantic for bool conversion, it is better to remove the member pointer.
IPAddress: Add empty() and update documentation.
RED: Correct error in 1436f36e327338cedb9e68512ee1beabb85f8d27.
Deprecate Unqueue2.
Discard: Add BURST argument.

Luigi Rizzo idea.