mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
rpc: Separate out socket code into another static lib
There's nothing RPC specific about virnettlscontext.c or virnetsocket.c. We use TLS for other things than just RPC encryption (e.g. for generating random numbers) and sockets can be used even without RPC. Move these two sources into a static library (virt_socket) so that other areas can use it even when RPC is disabled. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
81025a6a18
commit
1bbcc79e0e
@ -226,62 +226,6 @@ virNetServerServiceTimerActive;
|
||||
virNetServerServiceToggle;
|
||||
|
||||
|
||||
# rpc/virnetsocket.h
|
||||
virNetSocketAccept;
|
||||
virNetSocketAddIOCallback;
|
||||
virNetSocketCheckProtocols;
|
||||
virNetSocketClose;
|
||||
virNetSocketDupFD;
|
||||
virNetSocketGetFD;
|
||||
virNetSocketGetPath;
|
||||
virNetSocketGetPort;
|
||||
virNetSocketGetSELinuxContext;
|
||||
virNetSocketGetUNIXIdentity;
|
||||
virNetSocketHasCachedData;
|
||||
virNetSocketHasPassFD;
|
||||
virNetSocketHasPendingData;
|
||||
virNetSocketIsLocal;
|
||||
virNetSocketListen;
|
||||
virNetSocketLocalAddrStringSASL;
|
||||
virNetSocketNewConnectCommand;
|
||||
virNetSocketNewConnectExternal;
|
||||
virNetSocketNewConnectLibSSH2;
|
||||
virNetSocketNewConnectSockFD;
|
||||
virNetSocketNewConnectSSH;
|
||||
virNetSocketNewConnectTCP;
|
||||
virNetSocketNewConnectUNIX;
|
||||
virNetSocketNewListenFD;
|
||||
virNetSocketNewListenTCP;
|
||||
virNetSocketNewListenUNIX;
|
||||
virNetSocketNewPostExecRestart;
|
||||
virNetSocketPreExecRestart;
|
||||
virNetSocketRead;
|
||||
virNetSocketRecvFD;
|
||||
virNetSocketRemoteAddrStringSASL;
|
||||
virNetSocketRemoteAddrStringURI;
|
||||
virNetSocketRemoveIOCallback;
|
||||
virNetSocketSendFD;
|
||||
virNetSocketSetBlocking;
|
||||
virNetSocketSetTLSSession;
|
||||
virNetSocketUpdateIOCallback;
|
||||
virNetSocketWrite;
|
||||
|
||||
|
||||
# rpc/virnettlscontext.h
|
||||
virNetTLSContextCheckCertificate;
|
||||
virNetTLSContextNewClient;
|
||||
virNetTLSContextNewClientPath;
|
||||
virNetTLSContextNewServer;
|
||||
virNetTLSContextNewServerPath;
|
||||
virNetTLSInit;
|
||||
virNetTLSSessionGetHandshakeStatus;
|
||||
virNetTLSSessionGetKeySize;
|
||||
virNetTLSSessionGetX509DName;
|
||||
virNetTLSSessionHandshake;
|
||||
virNetTLSSessionNew;
|
||||
virNetTLSSessionRead;
|
||||
virNetTLSSessionSetIOCallbacks;
|
||||
virNetTLSSessionWrite;
|
||||
|
||||
|
||||
# Let emacs know we want case-insensitive sorting
|
||||
|
65
src/libvirt_socket.syms
Normal file
65
src/libvirt_socket.syms
Normal file
@ -0,0 +1,65 @@
|
||||
#
|
||||
# TLS and socket specific symbols
|
||||
#
|
||||
|
||||
# rpc/virnetsocket.h
|
||||
virNetSocketAccept;
|
||||
virNetSocketAddIOCallback;
|
||||
virNetSocketCheckProtocols;
|
||||
virNetSocketClose;
|
||||
virNetSocketDupFD;
|
||||
virNetSocketGetFD;
|
||||
virNetSocketGetPath;
|
||||
virNetSocketGetPort;
|
||||
virNetSocketGetSELinuxContext;
|
||||
virNetSocketGetUNIXIdentity;
|
||||
virNetSocketHasCachedData;
|
||||
virNetSocketHasPassFD;
|
||||
virNetSocketHasPendingData;
|
||||
virNetSocketIsLocal;
|
||||
virNetSocketListen;
|
||||
virNetSocketLocalAddrStringSASL;
|
||||
virNetSocketNewConnectCommand;
|
||||
virNetSocketNewConnectExternal;
|
||||
virNetSocketNewConnectLibSSH2;
|
||||
virNetSocketNewConnectSockFD;
|
||||
virNetSocketNewConnectSSH;
|
||||
virNetSocketNewConnectTCP;
|
||||
virNetSocketNewConnectUNIX;
|
||||
virNetSocketNewListenFD;
|
||||
virNetSocketNewListenTCP;
|
||||
virNetSocketNewListenUNIX;
|
||||
virNetSocketNewPostExecRestart;
|
||||
virNetSocketPreExecRestart;
|
||||
virNetSocketRead;
|
||||
virNetSocketRecvFD;
|
||||
virNetSocketRemoteAddrStringSASL;
|
||||
virNetSocketRemoteAddrStringURI;
|
||||
virNetSocketRemoveIOCallback;
|
||||
virNetSocketSendFD;
|
||||
virNetSocketSetBlocking;
|
||||
virNetSocketSetTLSSession;
|
||||
virNetSocketUpdateIOCallback;
|
||||
virNetSocketWrite;
|
||||
|
||||
|
||||
# rpc/virnettlscontext.h
|
||||
virNetTLSContextCheckCertificate;
|
||||
virNetTLSContextNewClient;
|
||||
virNetTLSContextNewClientPath;
|
||||
virNetTLSContextNewServer;
|
||||
virNetTLSContextNewServerPath;
|
||||
virNetTLSInit;
|
||||
virNetTLSSessionGetHandshakeStatus;
|
||||
virNetTLSSessionGetKeySize;
|
||||
virNetTLSSessionGetX509DName;
|
||||
virNetTLSSessionHandshake;
|
||||
virNetTLSSessionNew;
|
||||
virNetTLSSessionRead;
|
||||
virNetTLSSessionSetIOCallbacks;
|
||||
virNetTLSSessionWrite;
|
||||
|
||||
# Let emacs know we want case-insensitive sorting
|
||||
# Local Variables:
|
||||
# sort-fold-case: t
|
||||
# End:
|
@ -1,10 +1,30 @@
|
||||
genprotocol_prog = find_program('genprotocol.pl')
|
||||
gendispatch_prog = find_program('gendispatch.pl')
|
||||
|
||||
rpc_sources = [
|
||||
'virnetmessage.c',
|
||||
socket_sources = [
|
||||
'virnettlscontext.c',
|
||||
'virnetsocket.c',
|
||||
]
|
||||
|
||||
virt_socket_lib = static_library(
|
||||
'virt_socket',
|
||||
[
|
||||
socket_sources,
|
||||
],
|
||||
dependencies: [
|
||||
gnutls_dep,
|
||||
src_dep,
|
||||
],
|
||||
)
|
||||
|
||||
libvirt_libs += [
|
||||
virt_socket_lib
|
||||
]
|
||||
|
||||
used_sym_files += 'libvirt_socket.syms'
|
||||
|
||||
rpc_sources = [
|
||||
'virnetmessage.c',
|
||||
'virkeepalive.c',
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user