fedora core 2.6.9-1.11-FC2
[linux-2.6.git] / drivers / net / netdump.h
1 /*
2  *  linux/drivers/net/netdump.h
3  *
4  *  Copyright (C) 2001  Ingo Molnar <mingo@redhat.com>
5  *
6  *  This file contains the implementation of an IRQ-safe, crash-safe
7  *  kernel console implementation that outputs kernel messages to the
8  *  network.
9  *
10  * Modification history:
11  *
12  * 2001-09-17    started by Ingo Molnar.
13  */
14
15 /****************************************************************
16  *      This program is free software; you can redistribute it and/or modify
17  *      it under the terms of the GNU General Public License as published by
18  *      the Free Software Foundation; either version 2, or (at your option)
19  *      any later version.
20  *
21  *      This program is distributed in the hope that it will be useful,
22  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
23  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24  *      GNU General Public License for more details.
25  *
26  *      You should have received a copy of the GNU General Public License
27  *      along with this program; if not, write to the Free Software
28  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  *
30  ****************************************************************/
31
32 #define NETDUMP_VERSION 0x04
33
34 enum netdump_commands {
35         COMM_NONE = 0,
36         COMM_SEND_MEM = 1,
37         COMM_EXIT = 2,
38         COMM_REBOOT = 3,
39         COMM_HELLO = 4,
40         COMM_GET_NR_PAGES = 5,
41         COMM_GET_PAGE_SIZE = 6,
42         COMM_START_NETDUMP_ACK = 7,
43         COMM_GET_REGS = 8,
44         COMM_SHOW_STATE = 9,
45 };
46
47 #define NETDUMP_REQ_SIZE (8+4*4)
48
49 typedef struct netdump_req_s {
50         u64 magic;
51         u32 nr;
52         u32 command;
53         u32 from;
54         u32 to;
55         struct list_head list; 
56 } req_t;
57
58 enum netdump_replies {
59         REPLY_NONE = 0,
60         REPLY_ERROR = 1,
61         REPLY_LOG = 2,
62         REPLY_MEM = 3,
63         REPLY_RESERVED = 4,
64         REPLY_HELLO = 5,
65         REPLY_NR_PAGES = 6,
66         REPLY_PAGE_SIZE = 7,
67         REPLY_START_NETDUMP = 8,
68         REPLY_END_NETDUMP = 9,
69         REPLY_REGS = 10,
70         REPLY_MAGIC = 11,
71         REPLY_SHOW_STATE = 12,
72 };
73
74 typedef struct netdump_reply_s {
75         u32 nr;
76         u32 code;
77         u32 info;
78 } reply_t;
79
80 #define HEADER_LEN (1 + sizeof(reply_t))
81