Allow IPv6 address entry in tools>ping - Loosens valid character check
[tomato/davidwu.git] / release / src / router / pptp-client / pptp_quirks.c
blobe4c90139b811010707fffe6b428ae890efedd1fe
1 /* pptp_quirks.c ...... various options to fix quirks found in buggy adsl modems
2 * mulix <mulix@actcom.co.il>
4 * $Id: pptp_quirks.c,v 1.2 2001/11/23 03:42:51 quozl Exp $
5 */
7 #include <string.h>
8 #include "orckit_quirks.h"
9 #include "pptp_quirks.h"
11 static int quirk_index = -1;
13 struct pptp_fixup pptp_fixups[] = {
14 {BEZEQ_ISRAEL, ORCKIT, ORCKIT_ATUR3,
15 orckit_atur3_build_hook,
16 orckit_atur3_start_ctrl_conn_hook,
17 orckit_atur3_set_link_hook}
20 static int fixups_sz = sizeof(pptp_fixups)/sizeof(pptp_fixups[0]);
22 /* return 0 on success, non 0 otherwise */
23 int set_quirk_index(int index)
25 if (index >= 0 && index < fixups_sz) {
26 quirk_index = index;
27 return 0;
30 return -1;
33 int get_quirk_index()
35 return quirk_index;
38 /* return the index for this isp in the quirks table, -1 if not found */
39 int find_quirk(const char* isp_name)
41 int i = 0;
42 if (isp_name) {
43 while (i < fixups_sz && pptp_fixups[i].isp) {
44 if (!strcmp(pptp_fixups[i].isp, isp_name)) {
45 return i;
47 ++i;
51 return -1;