1 /* orckit_quirks.c ...... fix quirks in orckit adsl modems
2 * mulix <mulix@actcom.co.il>
4 * $Id: orckit_quirks.c,v 1.3 2002/03/01 01:23:36 quozl Exp $
9 #include <netinet/in.h>
11 #include "pptp_options.h"
12 #include "pptp_ctrl.h"
17 /* return 0 on success, non zero otherwise */
19 orckit_atur3_build_hook(struct pptp_out_call_rqst
* packet
)
21 unsigned int name_length
= 10;
23 struct pptp_out_call_rqst fixed_packet
= {
24 PPTP_HEADER_CTRL(PPTP_OUT_CALL_RQST
),
25 0, /* hton16(call->callid) */
26 0, /* hton16(call->sernum) */
27 hton32(PPTP_BPS_MIN
), hton32(PPTP_BPS_MAX
),
28 hton32(PPTP_BEARER_DIGITAL
), hton32(PPTP_FRAME_ANY
),
29 hton16(PPTP_WINDOW
), 0, hton16(name_length
), 0,
30 {'R','E','L','A','Y','_','P','P','P','1',0}, {0}
36 memcpy(packet
, &fixed_packet
, sizeof(*packet
));
41 /* return 0 on success, non zero otherwise */
43 orckit_atur3_set_link_hook(struct pptp_set_link_info
* packet
,
46 struct pptp_set_link_info fixed_packet
= {
47 PPTP_HEADER_CTRL(PPTP_SET_LINK_INFO
),
56 memcpy(packet
, &fixed_packet
, sizeof(*packet
));
60 /* return 0 on success, non 0 otherwise */
62 orckit_atur3_start_ctrl_conn_hook(struct pptp_start_ctrl_conn
* packet
)
64 struct pptp_start_ctrl_conn fixed_packet
= {
65 {0}, /* we'll set the header later */
66 hton16(PPTP_VERSION
), 0, 0,
67 hton32(PPTP_FRAME_ASYNC
), hton32(PPTP_BEARER_ANALOG
),
68 hton16(0) /* max channels */,
70 {'R','E','L','A','Y','_','P','P','P','1',0}, /* hostname */
71 {'M','S',' ','W','i','n',' ','N','T',0} /* vendor */
77 /* grab the header from the original packet, since we dont
78 know if this is a request or a reply */
79 memcpy(&fixed_packet
.header
, &packet
->header
, sizeof(struct pptp_header
));
81 /* and now overwrite the full packet, effectively preserving the header */
82 memcpy(packet
, &fixed_packet
, sizeof(*packet
));