lib: simplify flow_extract() API

Change the flow_extract() API to accept struct pkt_metadata,
instead of individual metadata fields. It will make the API more
logical and easier to maintain when we need to expand metadata
down the road.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>¬
lib: make wevent static

Fixed sparse non static symbol warning.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
sparse: add defintions to include/sparse/netinet/in.h

Fixed sparse undefined symbol warnings.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
vconn: Fix vconn_get_status() return value when connection in progress.

When a connection takes a few rounds of the state machine to complete,
'error' gets filled with EAGAIN until that completes.  This didn't match
the vconn_get_status() documentation, which says that it only returns a
positive errno value if there was an error.  One could fix the problem
by updating the documentation (and the callers) or by updating the
implementation.  I decided that the latter was the way to go because
the distinction between the TCP connection being in progress or complete
isn't visible to the client; what is visible to the client is the OpenFlow
negotiation being complete.

This problem is difficult to find in the unit tests because TCP connections
to localhost complete immediately.

Bug introduced by commit accaecc419cc57d (rconn: Discover errors in
rconn_run() even if rconn_recv() is never called.)

Reported-by: Anuprem Chalvadi <achalvadi@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>