#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
#include <linux/bitops.h>
#include <linux/signal.h>
#include <linux/string.h>
#include <linux/device.h>
#include <linux/ip.h>
#include <linux/if_arp.h>
#include <linux/tcp.h>
#include <linux/skbuff.h>
#include <linux/ctype.h>
#include <net/dst.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/ebcdic.h>
#include <net/iucv/iucv.h>
#include "fsm.h"
Go to the source code of this file.
|
#define | KMSG_COMPONENT "netiucv" |
|
#define | pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
|
#define | IUCV_DBF_SETUP_NAME "iucv_setup" |
|
#define | IUCV_DBF_SETUP_LEN 64 |
|
#define | IUCV_DBF_SETUP_PAGES 2 |
|
#define | IUCV_DBF_SETUP_NR_AREAS 1 |
|
#define | IUCV_DBF_SETUP_LEVEL 3 |
|
#define | IUCV_DBF_DATA_NAME "iucv_data" |
|
#define | IUCV_DBF_DATA_LEN 128 |
|
#define | IUCV_DBF_DATA_PAGES 2 |
|
#define | IUCV_DBF_DATA_NR_AREAS 1 |
|
#define | IUCV_DBF_DATA_LEVEL 2 |
|
#define | IUCV_DBF_TRACE_NAME "iucv_trace" |
|
#define | IUCV_DBF_TRACE_LEN 16 |
|
#define | IUCV_DBF_TRACE_PAGES 4 |
|
#define | IUCV_DBF_TRACE_NR_AREAS 1 |
|
#define | IUCV_DBF_TRACE_LEVEL 3 |
|
#define | IUCV_DBF_TEXT(name, level, text) |
|
#define | IUCV_DBF_HEX(name, level, addr, len) |
|
#define | IUCV_DBF_TEXT_(name, level, text...) |
|
#define | IUCV_DBF_SPRINTF(name, level, text...) |
|
#define | IUCV_HEXDUMP16(importance, header, ptr) |
|
#define | PRINTK_HEADER " iucv: " /* for debugging */ |
|
#define | NETIUCV_HDRLEN (sizeof(struct ll_header)) |
|
#define | NETIUCV_BUFSIZE_MAX 65537 |
|
#define | NETIUCV_BUFSIZE_DEFAULT NETIUCV_BUFSIZE_MAX |
|
#define | NETIUCV_MTU_MAX (NETIUCV_BUFSIZE_MAX - NETIUCV_HDRLEN) |
|
#define | NETIUCV_MTU_DEFAULT 9216 |
|
#define | NETIUCV_QUEUELEN_DEFAULT 50 |
|
#define | NETIUCV_TIMEOUT_5SEC 5000 |
|
|
enum | dev_states {
DEV_STATE_STOPPED,
DEV_STATE_STARTWAIT_RXTX,
DEV_STATE_STARTWAIT_RX,
DEV_STATE_STARTWAIT_TX,
DEV_STATE_STOPWAIT_RXTX,
DEV_STATE_STOPWAIT_RX,
DEV_STATE_STOPWAIT_TX,
DEV_STATE_RUNNING,
CTCM_NR_DEV_STATES,
DEV_STATE_STOPPED,
DEV_STATE_STARTWAIT,
DEV_STATE_STOPWAIT,
DEV_STATE_RUNNING,
NR_DEV_STATES
} |
|
enum | dev_events {
DEV_EVENT_START,
DEV_EVENT_STOP,
DEV_EVENT_RXUP,
DEV_EVENT_TXUP,
DEV_EVENT_RXDOWN,
DEV_EVENT_TXDOWN,
DEV_EVENT_RESTART,
CTCM_NR_DEV_EVENTS,
DEV_EVENT_START,
DEV_EVENT_STOP,
DEV_EVENT_CONUP,
DEV_EVENT_CONDOWN,
NR_DEV_EVENTS
} |
|
enum | conn_events {
CONN_EVENT_CONN_REQ,
CONN_EVENT_CONN_ACK,
CONN_EVENT_CONN_REJ,
CONN_EVENT_CONN_SUS,
CONN_EVENT_CONN_RES,
CONN_EVENT_RX,
CONN_EVENT_TXDONE,
CONN_EVENT_TIMER,
CONN_EVENT_START,
CONN_EVENT_STOP,
NR_CONN_EVENTS
} |
|
enum | conn_states {
CONN_STATE_INVALID,
CONN_STATE_STOPPED,
CONN_STATE_STARTWAIT,
CONN_STATE_SETUPWAIT,
CONN_STATE_IDLE,
CONN_STATE_TX,
CONN_STATE_REGERR,
CONN_STATE_CONNERR,
NR_CONN_STATES
} |
|
#define IUCV_DBF_DATA_LEN 128 |
#define IUCV_DBF_DATA_LEVEL 2 |
#define IUCV_DBF_DATA_NAME "iucv_data" |
#define IUCV_DBF_DATA_NR_AREAS 1 |
#define IUCV_DBF_DATA_PAGES 2 |
#define IUCV_DBF_SETUP_LEN 64 |
#define IUCV_DBF_SETUP_LEVEL 3 |
#define IUCV_DBF_SETUP_NAME "iucv_setup" |
Debug Facility stuff
Definition at line 78 of file netiucv.c.
#define IUCV_DBF_SETUP_NR_AREAS 1 |
#define IUCV_DBF_SETUP_PAGES 2 |
#define IUCV_DBF_SPRINTF |
( |
|
name, |
|
|
|
level, |
|
|
|
text... |
|
) |
| |
Value:do { \
debug_sprintf_event(iucv_dbf_trace,
level, ##
text ); \
debug_sprintf_event(iucv_dbf_trace,
level,
text ); \
} while (0)
Definition at line 124 of file netiucv.c.
#define IUCV_DBF_TEXT_ |
( |
|
name, |
|
|
|
level, |
|
|
|
text... |
|
) |
| |
Value:do { \
if (iucv_dbf_passes(iucv_dbf_##
name,
level)) { \
debug_text_event(iucv_dbf_##name,
level, __buf); \
put_cpu_var(iucv_dbf_txt_buf); \
} \
} while (0)
Definition at line 114 of file netiucv.c.
#define IUCV_DBF_TRACE_LEN 16 |
#define IUCV_DBF_TRACE_LEVEL 3 |
#define IUCV_DBF_TRACE_NAME "iucv_trace" |
#define IUCV_DBF_TRACE_NR_AREAS 1 |
#define IUCV_DBF_TRACE_PAGES 4 |
#define IUCV_HEXDUMP16 |
( |
|
importance, |
|
|
|
header, |
|
|
|
ptr |
|
) |
| |
Value:PRINT_##importance(
header "%02x %02x %02x %02x %02x %02x %02x %02x " \
"%02x %02x %02x %02x %02x %02x %02x %02x\n", \
*(((
char*)
ptr)),*(((
char*)
ptr)+1),*(((
char*)
ptr)+2), \
*(((
char*)
ptr)+3),*(((
char*)
ptr)+4),*(((
char*)
ptr)+5), \
*(((
char*)
ptr)+6),*(((
char*)
ptr)+7),*(((
char*)
ptr)+8), \
*(((
char*)
ptr)+9),*(((
char*)
ptr)+10),*(((
char*)
ptr)+11), \
*(((
char*)
ptr)+12),*(((
char*)
ptr)+13), \
*(((
char*)
ptr)+14),*(((
char*)
ptr)+15)); \
PRINT_##importance(
header "%02x %02x %02x %02x %02x %02x %02x %02x " \
"%02x %02x %02x %02x %02x %02x %02x %02x\n", \
*(((
char*)
ptr)+16),*(((
char*)
ptr)+17), \
*(((
char*)
ptr)+18),*(((
char*)
ptr)+19), \
*(((
char*)
ptr)+20),*(((
char*)
ptr)+21), \
*(((
char*)
ptr)+22),*(((
char*)
ptr)+23), \
*(((
char*)
ptr)+24),*(((
char*)
ptr)+25), \
*(((
char*)
ptr)+26),*(((
char*)
ptr)+27), \
*(((
char*)
ptr)+28),*(((
char*)
ptr)+29), \
*(((
char*)
ptr)+30),*(((
char*)
ptr)+31));
some more debug stuff
Definition at line 133 of file netiucv.c.
#define KMSG_COMPONENT "netiucv" |
#define NETIUCV_BUFSIZE_MAX 65537 |
#define NETIUCV_MTU_DEFAULT 9216 |
#define NETIUCV_QUEUELEN_DEFAULT 50 |
#define NETIUCV_TIMEOUT_5SEC 5000 |
#define PRINTK_HEADER " iucv: " /* for debugging */ |
Events of the connection statemachine
- Enumerator:
CONN_EVENT_CONN_REQ |
Events, representing callbacks from lowlevel iucv layer)
|
CONN_EVENT_CONN_ACK |
|
CONN_EVENT_CONN_REJ |
|
CONN_EVENT_CONN_SUS |
|
CONN_EVENT_CONN_RES |
|
CONN_EVENT_RX |
|
CONN_EVENT_TXDONE |
|
CONN_EVENT_TIMER |
Events, representing errors return codes from calls to lowlevel iucv layer Event, representing timer expiry.
|
CONN_EVENT_START |
Events, representing commands from upper levels.
|
CONN_EVENT_STOP |
|
NR_CONN_EVENTS |
MUST be always the last element!!
|
Definition at line 388 of file netiucv.c.
States of the connection statemachine.
- Enumerator:
CONN_STATE_INVALID |
Connection not assigned to any device, initial state, invalid
|
CONN_STATE_STOPPED |
Userid assigned but not operating
|
CONN_STATE_STARTWAIT |
Connection registered, no connection request sent yet, no connection request received
|
CONN_STATE_SETUPWAIT |
Connection registered and connection request sent, no acknowledge and no connection request received yet.
|
CONN_STATE_IDLE |
Connection up and running idle
|
CONN_STATE_TX |
Data sent, awaiting CONN_EVENT_TXDONE
|
CONN_STATE_REGERR |
Error during registration.
|
CONN_STATE_CONNERR |
Error during registration.
|
NR_CONN_STATES |
MUST be always the last element!!
|
Definition at line 441 of file netiucv.c.
Events of the interface statemachine.
- Enumerator:
DEV_EVENT_START |
|
DEV_EVENT_STOP |
|
DEV_EVENT_RXUP |
|
DEV_EVENT_TXUP |
|
DEV_EVENT_RXDOWN |
|
DEV_EVENT_TXDOWN |
|
DEV_EVENT_RESTART |
|
CTCM_NR_DEV_EVENTS |
|
DEV_EVENT_START |
|
DEV_EVENT_STOP |
|
DEV_EVENT_CONUP |
|
DEV_EVENT_CONDOWN |
|
NR_DEV_EVENTS |
MUST be always the last element!!
|
Definition at line 367 of file netiucv.c.
States of the interface statemachine.
- Enumerator:
DEV_STATE_STOPPED |
|
DEV_STATE_STARTWAIT_RXTX |
|
DEV_STATE_STARTWAIT_RX |
|
DEV_STATE_STARTWAIT_TX |
|
DEV_STATE_STOPWAIT_RXTX |
|
DEV_STATE_STOPWAIT_RX |
|
DEV_STATE_STOPWAIT_TX |
|
DEV_STATE_RUNNING |
|
CTCM_NR_DEV_STATES |
|
DEV_STATE_STOPPED |
|
DEV_STATE_STARTWAIT |
|
DEV_STATE_STOPWAIT |
|
DEV_STATE_RUNNING |
|
NR_DEV_STATES |
MUST be always the last element!!
|
Definition at line 346 of file netiucv.c.
DECLARE_PER_CPU |
( |
char |
[256], |
|
|
iucv_dbf_txt_buf |
|
|
) |
| |
DEFINE_PER_CPU |
( |
char |
[256], |
|
|
iucv_dbf_txt_buf |
|
|
) |
| |
MODULE_DESCRIPTION |
( |
"Linux for S/390 IUCV network driver" |
| ) |
|
module_exit |
( |
netiucv_exit |
| ) |
|
module_init |
( |
netiucv_init |
| ) |
|