1685a6bf8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 282a54d0eSAsias He /* 382a54d0eSAsias He * VMware vSockets Driver 482a54d0eSAsias He * 582a54d0eSAsias He * Copyright (C) 2007-2013 VMware, Inc. All rights reserved. 682a54d0eSAsias He */ 782a54d0eSAsias He 882a54d0eSAsias He #ifndef _VSOCK_ADDR_H_ 982a54d0eSAsias He #define _VSOCK_ADDR_H_ 1082a54d0eSAsias He 1182a54d0eSAsias He #include <linux/vm_sockets.h> 1282a54d0eSAsias He 1382a54d0eSAsias He void vsock_addr_init(struct sockaddr_vm *addr, u32 cid, u32 port); 1482a54d0eSAsias He int vsock_addr_validate(const struct sockaddr_vm *addr); 1582a54d0eSAsias He bool vsock_addr_bound(const struct sockaddr_vm *addr); 1682a54d0eSAsias He void vsock_addr_unbind(struct sockaddr_vm *addr); 1782a54d0eSAsias He bool vsock_addr_equals_addr(const struct sockaddr_vm *addr, 1882a54d0eSAsias He const struct sockaddr_vm *other); 1982a54d0eSAsias He int vsock_addr_cast(const struct sockaddr *addr, size_t len, 2082a54d0eSAsias He struct sockaddr_vm **out_addr); 2182a54d0eSAsias He 2282a54d0eSAsias He #endif 23