-int ustcomm_pack_sock_path(struct ustcomm_header *header,
- struct ustcomm_sock_path *sock_path_inf,
- const char *socket_path)
-{
- int offset = 0;
-
- sock_path_inf->sock_path =
- ustcomm_print_data(sock_path_inf->data,
- sizeof(sock_path_inf->data),
- &offset,
- socket_path);
-
- if (sock_path_inf->sock_path == USTCOMM_POISON_PTR) {
- return -ENOMEM;
- }
-
- header->size = COMPUTE_MSG_SIZE(sock_path_inf, offset);
-
- return 0;
-}
-
-int ustcomm_unpack_sock_path(struct ustcomm_sock_path *sock_path_inf)
-{
- sock_path_inf->sock_path =
- ustcomm_restore_ptr(sock_path_inf->sock_path,
- sock_path_inf->data,
- sizeof(sock_path_inf->data));
- if (!sock_path_inf->sock_path) {
- return -EINVAL;
- }
-
- return 0;
-}
-