forked from Xilinx/linux-xlnx
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: add rpmsg sockets and a userland demo app
Warning: this is still completely preliminary and buggy. It's only here to assist folks who needs this for development. Signed-off-by: Ohad Ben-Cohen <[email protected]>
- Loading branch information
1 parent
66e4e3a
commit bb8616d
Showing
8 changed files
with
864 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Remote processor messaging sockets | ||
* | ||
* Copyright (C) 2011 Texas Instruments, Inc | ||
* | ||
* Ohad Ben-Cohen <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* version 2 as published by the Free Software Foundation. | ||
* | ||
* 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 __NET_RPMSG_H | ||
#define __NET_RPMSG_H | ||
|
||
#include <linux/types.h> | ||
#include <linux/socket.h> | ||
|
||
/* user space needs this */ | ||
#ifndef AF_RPMSG | ||
#define AF_RPMSG 40 | ||
#define PF_RPMSG AF_RPMSG | ||
#endif | ||
|
||
/* Connection and socket states */ | ||
enum { | ||
RPMSG_CONNECTED = 1, /* wait_for_packet() wants this... */ | ||
RPMSG_OPEN, | ||
RPMSG_LISTENING, | ||
RPMSG_CLOSED, | ||
}; | ||
|
||
struct sockaddr_rpmsg { | ||
sa_family_t family; | ||
__u32 vproc_id; | ||
__u32 addr; | ||
}; | ||
|
||
#define RPMSG_LOCALHOST ((__u32) ~0UL) | ||
|
||
#ifdef __KERNEL__ | ||
|
||
#include <net/sock.h> | ||
#include <linux/rpmsg.h> | ||
|
||
struct rpmsg_socket { | ||
struct sock sk; | ||
struct rpmsg_channel *rpdev; | ||
bool unregister_rpdev; | ||
}; | ||
|
||
#endif /* __KERNEL__ */ | ||
#endif /* __NET_RPMSG_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
obj-$(CONFIG_RPMSG) += rpmsg_proto.o |
Oops, something went wrong.