Commit 97a16c6b authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Federico Vaga

TEMP: zio-sock.h

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 39a7786e
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
#define PF_ZIO 28 #define PF_ZIO 28
#define AF_ZIO PF_ZIO #define AF_ZIO PF_ZIO
#ifndef __KERNEL__ /* For user-space, define sockaddr_zio canonically */ #ifndef __KERNEL__
#include <sys/socket.h> #include <sys/socket.h>
#include <stdint.h> #include <stdint.h>
/* For user-space, define sockaddr_zio canonically, with sa_family_t */
struct sockaddr_zio { struct sockaddr_zio {
sa_family_t sa_family; sa_family_t sa_family;
uint8_t host_type; /* 0 == local, 1 == MAC, ... */ uint8_t host_type; /* 0 == local, 1 == MAC, ... */
...@@ -28,14 +29,14 @@ struct sockaddr_zio { ...@@ -28,14 +29,14 @@ struct sockaddr_zio {
#include <net/sock.h> #include <net/sock.h>
#include <linux/zio-buffer.h> #include <linux/zio-buffer.h>
#define ZN_DEFAULT_BUFFER_LENGTH 16
#define ZN_SOCK_CONNECTED 0x1 #define ZN_SOCK_CONNECTED 0x1
#define ZN_SOCK_BOUND 0x2 #define ZN_SOCK_BOUND 0x2
#define ZN_SOCK_SENDTO 0x4 #define ZN_SOCK_SENDTO 0x4
#define ZN_SOCK_DEV_BOUND 0x8 #define ZN_SOCK_DEV_BOUND 0x8
#define ZN_SOCK_CSET_BOUND 0x10 #define ZN_SOCK_CSET_BOUND 0x10
#define NET_ZIO_ALIGN 2
/* FIXME: this is only used in sock-syscall.c */ /* FIXME: this is only used in sock-syscall.c */
struct zn_dest { struct zn_dest {
uint32_t dev_id; uint32_t dev_id;
...@@ -46,9 +47,9 @@ struct zn_dest { ...@@ -46,9 +47,9 @@ struct zn_dest {
struct zio_ti *ti; struct zio_ti *ti;
}; };
/* pfzio-specific socket instance */
struct zn_sock { struct zn_sock {
struct sock sk; struct sock sk;
/*Add protocol specific member here*/
struct zn_dest connected_chan; struct zn_dest connected_chan;
struct zn_dest sendto_chan; struct zn_dest sendto_chan;
struct zio_block *active_block; struct zio_block *active_block;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment