aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/iucv
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/net/iucv
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'include/net/iucv')
-rw-r--r--include/net/iucv/af_iucv.h57
-rw-r--r--include/net/iucv/iucv.h36
2 files changed, 3 insertions, 90 deletions
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h
index cc7c1973238..f82a1e87737 100644
--- a/include/net/iucv/af_iucv.h
+++ b/include/net/iucv/af_iucv.h
@@ -14,7 +14,6 @@
14#include <linux/list.h> 14#include <linux/list.h>
15#include <linux/poll.h> 15#include <linux/poll.h>
16#include <linux/socket.h> 16#include <linux/socket.h>
17#include <net/iucv/iucv.h>
18 17
19#ifndef AF_IUCV 18#ifndef AF_IUCV
20#define AF_IUCV 32 19#define AF_IUCV 32
@@ -27,13 +26,13 @@ enum {
27 IUCV_OPEN, 26 IUCV_OPEN,
28 IUCV_BOUND, 27 IUCV_BOUND,
29 IUCV_LISTEN, 28 IUCV_LISTEN,
29 IUCV_SEVERED,
30 IUCV_DISCONN, 30 IUCV_DISCONN,
31 IUCV_CLOSING, 31 IUCV_CLOSING,
32 IUCV_CLOSED 32 IUCV_CLOSED
33}; 33};
34 34
35#define IUCV_QUEUELEN_DEFAULT 65535 35#define IUCV_QUEUELEN_DEFAULT 65535
36#define IUCV_HIPER_MSGLIM_DEFAULT 128
37#define IUCV_CONN_TIMEOUT (HZ * 40) 36#define IUCV_CONN_TIMEOUT (HZ * 40)
38#define IUCV_DISCONN_TIMEOUT (HZ * 2) 37#define IUCV_DISCONN_TIMEOUT (HZ * 2)
39#define IUCV_CONN_IDLE_TIMEOUT (HZ * 60) 38#define IUCV_CONN_IDLE_TIMEOUT (HZ * 60)
@@ -58,52 +57,8 @@ struct sock_msg_q {
58 spinlock_t lock; 57 spinlock_t lock;
59}; 58};
60 59
61#define AF_IUCV_FLAG_ACK 0x1
62#define AF_IUCV_FLAG_SYN 0x2
63#define AF_IUCV_FLAG_FIN 0x4
64#define AF_IUCV_FLAG_WIN 0x8
65#define AF_IUCV_FLAG_SHT 0x10
66
67struct af_iucv_trans_hdr {
68 u16 magic;
69 u8 version;
70 u8 flags;
71 u16 window;
72 char destNodeID[8];
73 char destUserID[8];
74 char destAppName[16];
75 char srcNodeID[8];
76 char srcUserID[8];
77 char srcAppName[16]; /* => 70 bytes */
78 struct iucv_message iucv_hdr; /* => 33 bytes */
79 u8 pad; /* total 104 bytes */
80} __packed;
81
82enum iucv_tx_notify {
83 /* transmission of skb is completed and was successful */
84 TX_NOTIFY_OK = 0,
85 /* target is unreachable */
86 TX_NOTIFY_UNREACHABLE = 1,
87 /* transfer pending queue full */
88 TX_NOTIFY_TPQFULL = 2,
89 /* general error */
90 TX_NOTIFY_GENERALERROR = 3,
91 /* transmission of skb is pending - may interleave
92 * with TX_NOTIFY_DELAYED_* */
93 TX_NOTIFY_PENDING = 4,
94 /* transmission of skb was done successfully (delayed) */
95 TX_NOTIFY_DELAYED_OK = 5,
96 /* target unreachable (detected delayed) */
97 TX_NOTIFY_DELAYED_UNREACHABLE = 6,
98 /* general error (detected delayed) */
99 TX_NOTIFY_DELAYED_GENERALERROR = 7,
100};
101
102#define iucv_sk(__sk) ((struct iucv_sock *) __sk) 60#define iucv_sk(__sk) ((struct iucv_sock *) __sk)
103 61
104#define AF_IUCV_TRANS_IUCV 0
105#define AF_IUCV_TRANS_HIPER 1
106
107struct iucv_sock { 62struct iucv_sock {
108 struct sock sk; 63 struct sock sk;
109 char src_user_id[8]; 64 char src_user_id[8];
@@ -114,26 +69,17 @@ struct iucv_sock {
114 spinlock_t accept_q_lock; 69 spinlock_t accept_q_lock;
115 struct sock *parent; 70 struct sock *parent;
116 struct iucv_path *path; 71 struct iucv_path *path;
117 struct net_device *hs_dev;
118 struct sk_buff_head send_skb_q; 72 struct sk_buff_head send_skb_q;
119 struct sk_buff_head backlog_skb_q; 73 struct sk_buff_head backlog_skb_q;
120 struct sock_msg_q message_q; 74 struct sock_msg_q message_q;
121 unsigned int send_tag; 75 unsigned int send_tag;
122 u8 flags; 76 u8 flags;
123 u16 msglimit; 77 u16 msglimit;
124 u16 msglimit_peer;
125 atomic_t msg_sent;
126 atomic_t msg_recv;
127 atomic_t pendings;
128 int transport;
129 void (*sk_txnotify)(struct sk_buff *skb,
130 enum iucv_tx_notify n);
131}; 78};
132 79
133/* iucv socket options (SOL_IUCV) */ 80/* iucv socket options (SOL_IUCV) */
134#define SO_IPRMDATA_MSG 0x0080 /* send/recv IPRM_DATA msgs */ 81#define SO_IPRMDATA_MSG 0x0080 /* send/recv IPRM_DATA msgs */
135#define SO_MSGLIMIT 0x1000 /* get/set IUCV MSGLIMIT */ 82#define SO_MSGLIMIT 0x1000 /* get/set IUCV MSGLIMIT */
136#define SO_MSGSIZE 0x0800 /* get maximum msgsize */
137 83
138/* iucv related control messages (scm) */ 84/* iucv related control messages (scm) */
139#define SCM_IUCV_TRGCLS 0x0001 /* target class control message */ 85#define SCM_IUCV_TRGCLS 0x0001 /* target class control message */
@@ -148,6 +94,7 @@ unsigned int iucv_sock_poll(struct file *file, struct socket *sock,
148 poll_table *wait); 94 poll_table *wait);
149void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); 95void iucv_sock_link(struct iucv_sock_list *l, struct sock *s);
150void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); 96void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s);
97int iucv_sock_wait_cnt(struct sock *sk, unsigned long timeo);
151void iucv_accept_enqueue(struct sock *parent, struct sock *sk); 98void iucv_accept_enqueue(struct sock *parent, struct sock *sk);
152void iucv_accept_unlink(struct sock *sk); 99void iucv_accept_unlink(struct sock *sk);
153struct sock *iucv_accept_dequeue(struct sock *parent, struct socket *newsock); 100struct sock *iucv_accept_dequeue(struct sock *parent, struct socket *newsock);
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h
index 0894ced3195..1121baa9f69 100644
--- a/include/net/iucv/iucv.h
+++ b/include/net/iucv/iucv.h
@@ -120,7 +120,7 @@ struct iucv_message {
120 u32 reply_size; 120 u32 reply_size;
121 u8 rmmsg[8]; 121 u8 rmmsg[8];
122 u8 flags; 122 u8 flags;
123} __packed; 123};
124 124
125/* 125/*
126 * struct iucv_handler 126 * struct iucv_handler
@@ -459,37 +459,3 @@ int __iucv_message_send(struct iucv_path *path, struct iucv_message *msg,
459int iucv_message_send2way(struct iucv_path *path, struct iucv_message *msg, 459int iucv_message_send2way(struct iucv_path *path, struct iucv_message *msg,
460 u8 flags, u32 srccls, void *buffer, size_t size, 460 u8 flags, u32 srccls, void *buffer, size_t size,
461 void *answer, size_t asize, size_t *residual); 461 void *answer, size_t asize, size_t *residual);
462
463struct iucv_interface {
464 int (*message_receive)(struct iucv_path *path, struct iucv_message *msg,
465 u8 flags, void *buffer, size_t size, size_t *residual);
466 int (*__message_receive)(struct iucv_path *path,
467 struct iucv_message *msg, u8 flags, void *buffer, size_t size,
468 size_t *residual);
469 int (*message_reply)(struct iucv_path *path, struct iucv_message *msg,
470 u8 flags, void *reply, size_t size);
471 int (*message_reject)(struct iucv_path *path, struct iucv_message *msg);
472 int (*message_send)(struct iucv_path *path, struct iucv_message *msg,
473 u8 flags, u32 srccls, void *buffer, size_t size);
474 int (*__message_send)(struct iucv_path *path, struct iucv_message *msg,
475 u8 flags, u32 srccls, void *buffer, size_t size);
476 int (*message_send2way)(struct iucv_path *path,
477 struct iucv_message *msg, u8 flags, u32 srccls, void *buffer,
478 size_t size, void *answer, size_t asize, size_t *residual);
479 int (*message_purge)(struct iucv_path *path, struct iucv_message *msg,
480 u32 srccls);
481 int (*path_accept)(struct iucv_path *path, struct iucv_handler *handler,
482 u8 userdata[16], void *private);
483 int (*path_connect)(struct iucv_path *path,
484 struct iucv_handler *handler,
485 u8 userid[8], u8 system[8], u8 userdata[16], void *private);
486 int (*path_quiesce)(struct iucv_path *path, u8 userdata[16]);
487 int (*path_resume)(struct iucv_path *path, u8 userdata[16]);
488 int (*path_sever)(struct iucv_path *path, u8 userdata[16]);
489 int (*iucv_register)(struct iucv_handler *handler, int smp);
490 void (*iucv_unregister)(struct iucv_handler *handler, int smp);
491 struct bus_type *bus;
492 struct device *root;
493};
494
495extern struct iucv_interface iucv_if;