Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368133
b: refs/heads/master
c: c031e23
h: refs/heads/master
i:
  368131: 79567f7
v: v3
  • Loading branch information
Andy King authored and David S. Miller committed Mar 8, 2013
1 parent 4ed8664 commit 584fa4e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7f0e44ac9f7f12a2519bfed9ea4df3c1471bd8bb
refs/heads/master: c031e234ee304b507b79f76a7677ea0a7a8890e8
23 changes: 23 additions & 0 deletions trunk/include/linux/vm_sockets.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* VMware vSockets Driver
*
* Copyright (C) 2007-2013 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation version 2 and no later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/

#ifndef _VM_SOCKETS_H
#define _VM_SOCKETS_H

#include <uapi/linux/vm_sockets.h>

int vm_sockets_get_local_cid(void);

#endif /* _VM_SOCKETS_H */
23 changes: 8 additions & 15 deletions trunk/include/uapi/linux/vm_sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@
* more details.
*/

#ifndef _VM_SOCKETS_H_
#define _VM_SOCKETS_H_
#ifndef _UAPI_VM_SOCKETS_H
#define _UAPI_VM_SOCKETS_H

#if !defined(__KERNEL__)
#include <sys/socket.h>
#endif
#include <linux/socket.h>

/* Option name for STREAM socket buffer size. Use as the option name in
* setsockopt(3) or getsockopt(3) to set or get an unsigned long long that
Expand Down Expand Up @@ -137,14 +135,13 @@
#define VM_SOCKETS_VERSION_MINOR(_v) (((_v) & 0x0000FFFF))

/* Address structure for vSockets. The address family should be set to
* whatever vmci_sock_get_af_value_fd() returns. The structure members should
* all align on their natural boundaries without resorting to compiler packing
* directives. The total size of this structure should be exactly the same as
* that of struct sockaddr.
* AF_VSOCK. The structure members should all align on their natural
* boundaries without resorting to compiler packing directives. The total size
* of this structure should be exactly the same as that of struct sockaddr.
*/

struct sockaddr_vm {
sa_family_t svm_family;
__kernel_sa_family_t svm_family;
unsigned short svm_reserved1;
unsigned int svm_port;
unsigned int svm_cid;
Expand All @@ -156,8 +153,4 @@ struct sockaddr_vm {

#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9)

#if defined(__KERNEL__)
int vm_sockets_get_local_cid(void);
#endif

#endif
#endif /* _UAPI_VM_SOCKETS_H */

0 comments on commit 584fa4e

Please sign in to comment.