blob: cf8cc140d68dbd51eef4f1f102ace6408fcfaa61 [file] [log] [blame]
Thomas Gleixner685a6bf2019-05-29 16:57:36 -07001/* SPDX-License-Identifier: GPL-2.0-only */
Andy Kingd021c342013-02-06 14:23:56 +00002/*
3 * VMware vSockets Driver
4 *
5 * Copyright (C) 2007-2013 VMware, Inc. All rights reserved.
Andy Kingd021c342013-02-06 14:23:56 +00006 */
7
8#ifndef _VSOCK_ADDR_H_
9#define _VSOCK_ADDR_H_
10
Stefano Garzarella3603a2e2019-11-14 10:57:38 +010011#include <uapi/linux/vm_sockets.h>
Andy Kingd021c342013-02-06 14:23:56 +000012
13void vsock_addr_init(struct sockaddr_vm *addr, u32 cid, u32 port);
14int vsock_addr_validate(const struct sockaddr_vm *addr);
15bool vsock_addr_bound(const struct sockaddr_vm *addr);
16void vsock_addr_unbind(struct sockaddr_vm *addr);
17bool vsock_addr_equals_addr(const struct sockaddr_vm *addr,
18 const struct sockaddr_vm *other);
Andy Kingd021c342013-02-06 14:23:56 +000019int vsock_addr_cast(const struct sockaddr *addr, size_t len,
20 struct sockaddr_vm **out_addr);
21
22#endif