vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / kernel / network / ppp / modem / Modem.h
blob9507b43344156b1abbfe8496e838c6a52f51d3bf
1 /*
2 * Copyright 2003-2004, Waldemar Kornewald <wkornew@gmx.net>
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef MODEM__H
6 #define MODEM__H
8 #include <SupportDefs.h>
9 #include <net/if.h>
11 #include <net_buffer.h>
12 #include <net_stack.h>
15 class ModemDevice;
17 #define CONTROL_ESCAPE 0x7d
18 #define FLAG_SEQUENCE 0x7e
19 #define ALL_STATIONS 0xff
20 #define UI 0x03
22 #define ESCAPE_DELAY 1000000
23 #define ESCAPE_SEQUENCE "+++"
24 #define AT_HANG_UP "ATH0"
26 #define MODEM_MTU 1502
27 #define PACKET_OVERHEAD 8
28 #define MODEM_TIMEOUT 3000000
29 // 3 seconds
30 #define MODEM_PORT_KEY "Port"
31 #define MODEM_INIT_KEY "Init"
32 #define MODEM_DIAL_KEY "Dial"
34 extern net_stack_module_info *gStackModule;
35 extern net_buffer_module_info *gBufferModule;
38 #if DEBUG
39 // defined in ModemDevice.cpp
40 extern void dump_packet(net_buffer *packet);
41 #endif // DEBUG
44 #endif