Pass buffer size to NetlinkUtils.netlinkSocketForProto

Pass buffer size to netlinkSocketForProto to allow callers to specify
buffer size. The buffer size is not set if 0 is passed in.

Following callers of netlinkSocketForProto passes SOCKET_RECV_BUFFERSIZE
to keep same behavior as before:
 * OffloadHardwareInterface.createConntrackSocket()
 * NetlinkUtils.sendOneShotKernelMessage()
 * IpSecXfrmController.Dependencies.newNetlinkSocket()
 * InetDiagMessage.getConnectionOwnerUid()
Following callers pass 0 to not update the buffer size:
 * TunInterfaceController - it uses the socket only for writing
 * NetlinkUtils.createNetLinkInetDiagSocket() same behavior as before
Added a SOCKET_DUMP_RECV_BUFFERSIZE of 128k to be used by socket
requesting dump information from kernel:
 * NetlinkUtils.getAndProcessNetlinkDumpMessages() - sends dump request
   and expecting multiple reply messages.

Bug: 320420453

Test: atest NetworkStaticLibTests
atest FrameworksNetTests

Change-Id: I3dcb76963cf2646eb311602b50ab4e44b8ad3e8f
6 files changed