From 3ed08b68d4d4bd51d85334aa1a21690737b95cfe Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Thu, 30 Jun 2016 21:11:19 -0400 Subject: Start work to support client code on Mac OS X. Includes preliminary support for the magic Mac-specific ioctl() to see line speed, but has not yet been tested, that's waiting for some supporting tweaks to the RPC code from Paul. Includes some general cleanup which isn't really specific to Mac OS X per se but which needed doing and which simplifies adding the Mac code. --- hal_internal.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'hal_internal.h') diff --git a/hal_internal.h b/hal_internal.h index bd8e97d..4bf0e7c 100644 --- a/hal_internal.h +++ b/hal_internal.h @@ -450,6 +450,34 @@ typedef enum { #define RPC_CLIENT_MIXED 2 #define RPC_CLIENT_NONE 3 +/* + * Maximum size of a HAL RPC packet. + */ + +#ifndef HAL_RPC_MAX_PKT_SIZE +#define HAL_RPC_MAX_PKT_SIZE 4096 +#endif + +/* + * Location of AF_UNIX socket for RPC client mux daemon. + */ + +#ifndef HAL_CLIENT_DAEMON_DEFAULT_SOCKET_NAME +#define HAL_CLIENT_DAEMON_DEFAULT_SOCKET_NAME "/tmp/cryptech_rpcd.socket" +#endif + +/* + * Default device name and line speed for HAL RPC serial connection to HSM. + */ + +#ifndef HAL_CLIENT_SERIAL_DEFAULT_DEVICE +#define HAL_CLIENT_SERIAL_DEFAULT_DEVICE "/dev/ttyUSB0" +#endif + +#ifndef HAL_CLIENT_SERIAL_DEFAULT_SPEED +#define HAL_CLIENT_SERIAL_DEFAULT_SPEED 921600 +#endif + #endif /* _HAL_INTERNAL_H_ */ /* -- cgit v1.2.3