xref: /haiku/src/add-ons/kernel/network/ppp/modem/Modem.h (revision 1d9d47fc72028bb71b5f232a877231e59cfe2438)
1 /*
2  * Copyright 2003-2004, Waldemar Kornewald <wkornew@gmx.net>
3  * Distributed under the terms of the MIT License.
4  */
5 
6 #ifndef MODEM__H
7 #define MODEM__H
8 
9 #include <SupportDefs.h>
10 #include <net/if.h>
11 #include <netinet/if_ether.h>
12 
13 class ModemDevice;
14 
15 
16 #define CONTROL_ESCAPE		0x7d
17 #define FLAG_SEQUENCE		0x7e
18 #define ALL_STATIONS		0xff
19 #define UI					0x03
20 
21 #define ESCAPE_DELAY			1000000
22 #define ESCAPE_SEQUENCE			"+++"
23 #define AT_HANG_UP				"ATH0"
24 
25 #define MODEM_MTU				1502
26 #define PACKET_OVERHEAD			8
27 #define MODEM_TIMEOUT			3000000
28 	// 3 seconds
29 #define MODEM_PORT_KEY		"Port"
30 #define MODEM_INIT_KEY			"Init"
31 #define MODEM_DIAL_KEY			"Dial"
32 
33 extern struct core_module_info *core;
34 
35 
36 #if DEBUG
37 // defined in ModemDevice.cpp
38 extern void dump_packet(struct mbuf *packet);
39 #endif // DEBUG
40 
41 
42 #endif
43