diff options
-rw-r--r-- | include/net/iucv/iucv.h | 36 | ||||
-rw-r--r-- | net/iucv/iucv.c | 23 |
2 files changed, 58 insertions, 1 deletions
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 1121baa9f695..0894ced31957 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 | }; | 123 | } __packed; |
124 | 124 | ||
125 | /* | 125 | /* |
126 | * struct iucv_handler | 126 | * struct iucv_handler |
@@ -459,3 +459,37 @@ int __iucv_message_send(struct iucv_path *path, struct iucv_message *msg, | |||
459 | int iucv_message_send2way(struct iucv_path *path, struct iucv_message *msg, | 459 | int 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 | |||
463 | struct 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 | |||
495 | extern struct iucv_interface iucv_if; | ||
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 075a3808aa40..403be43b793d 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c | |||
@@ -1974,6 +1974,27 @@ out: | |||
1974 | return rc; | 1974 | return rc; |
1975 | } | 1975 | } |
1976 | 1976 | ||
1977 | struct iucv_interface iucv_if = { | ||
1978 | .message_receive = iucv_message_receive, | ||
1979 | .__message_receive = __iucv_message_receive, | ||
1980 | .message_reply = iucv_message_reply, | ||
1981 | .message_reject = iucv_message_reject, | ||
1982 | .message_send = iucv_message_send, | ||
1983 | .__message_send = __iucv_message_send, | ||
1984 | .message_send2way = iucv_message_send2way, | ||
1985 | .message_purge = iucv_message_purge, | ||
1986 | .path_accept = iucv_path_accept, | ||
1987 | .path_connect = iucv_path_connect, | ||
1988 | .path_quiesce = iucv_path_quiesce, | ||
1989 | .path_resume = iucv_path_resume, | ||
1990 | .path_sever = iucv_path_sever, | ||
1991 | .iucv_register = iucv_register, | ||
1992 | .iucv_unregister = iucv_unregister, | ||
1993 | .bus = NULL, | ||
1994 | .root = NULL, | ||
1995 | }; | ||
1996 | EXPORT_SYMBOL(iucv_if); | ||
1997 | |||
1977 | /** | 1998 | /** |
1978 | * iucv_init | 1999 | * iucv_init |
1979 | * | 2000 | * |
@@ -2038,6 +2059,8 @@ static int __init iucv_init(void) | |||
2038 | rc = bus_register(&iucv_bus); | 2059 | rc = bus_register(&iucv_bus); |
2039 | if (rc) | 2060 | if (rc) |
2040 | goto out_reboot; | 2061 | goto out_reboot; |
2062 | iucv_if.root = iucv_root; | ||
2063 | iucv_if.bus = &iucv_bus; | ||
2041 | return 0; | 2064 | return 0; |
2042 | 2065 | ||
2043 | out_reboot: | 2066 | out_reboot: |