MINOR: remove the client/server side distinction in SI addresses
Stream interfaces used to distinguish between client and server addresses
because they were previously of different types (sockaddr_storage for the
client, sockaddr_in for the server). This is not the case anymore, and this
distinction is confusing at best and has caused a number of regressions to
be introduced in the process of converting everything to full-ipv6. We can
now remove this and have a much cleaner code.
diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h
index 27a2f97..4f0bfa2 100644
--- a/include/types/stream_interface.h
+++ b/include/types/stream_interface.h
@@ -178,16 +178,10 @@
} cli;
} ctx; /* used by stats I/O handlers to dump the stats */
} applet;
- union {
- struct {
- struct sockaddr_storage from; /* the client address */
- struct sockaddr_storage to; /* the address reached by the client if SN_FRT_ADDR_SET is set */
- } c; /* client side */
- struct {
- struct sockaddr_storage from; /* the address to spoof when connecting to the server (transparent mode) */
- struct sockaddr_storage to; /* the address to connect to */
- } s; /* server side */
- } addr; /* addresses of the remote side */
+ struct {
+ struct sockaddr_storage from; /* client address, or address to spoof when connecting to the server */
+ struct sockaddr_storage to; /* address reached by the client if SN_FRT_ADDR_SET is set, or address to connect to */
+ } addr; /* addresses of the remote side, client for producer and server for consumer */
};
/* An applet designed to run in a stream interface */