transports: Resize socket send buffer if needed

This was originally added in openbmc/pldm to make the socket send buffer
big enough to send a message if the message is longer than the current
send buffer size.

When you call set_sock_opt with buffer size X, given that X is within a
certain range, the send buffer is actually set to 2*X. get_sock_opt
returns the 2*X value, not X. So add in some helper functions.

Change-Id: I8ded9357db4268cd264cf0ecfb80479223106c09
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
diff --git a/src/transport/meson.build b/src/transport/meson.build
index 1fcc06a..511b1c4 100644
--- a/src/transport/meson.build
+++ b/src/transport/meson.build
@@ -1,5 +1,6 @@
 libpldm_sources += files(
   'af-mctp.c',
   'mctp-demux.c',
+  'socket.c',
   'transport.c'
 )