version 1.27, 2014/07/20 10:32:23 |
version 1.28, 2014/07/20 10:55:26 |
|
|
#define SB_EOF() (subpointer >= subend) |
#define SB_EOF() (subpointer >= subend) |
#define SB_LEN() (subend - subpointer) |
#define SB_LEN() (subend - subpointer) |
|
|
|
static void lm_will(unsigned char *, int); |
|
static void lm_wont(unsigned char *, int); |
|
static void lm_do(unsigned char *, int); |
|
static void lm_dont(unsigned char *, int); |
|
|
|
static void slc_init(void); |
|
static void slc_import(int); |
|
static void slc_export(void); |
|
static void slc_start_reply(void); |
|
static void slc_add_reply(unsigned char, unsigned char, cc_t); |
|
static void slc_end_reply(void); |
|
static void slc(unsigned char *, int); |
|
static int slc_update(void); |
|
|
|
static void env_opt(unsigned char *, int); |
|
static void env_opt_start(void); |
|
|
char options[256]; /* The combined options */ |
char options[256]; /* The combined options */ |
char do_dont_resp[256]; |
char do_dont_resp[256]; |
char will_wont_resp[256]; |
char will_wont_resp[256]; |
|
|
} |
} |
|
|
|
|
void |
static void |
willoption(option) |
willoption(option) |
int option; |
int option; |
{ |
{ |
|
|
|
|
} |
} |
|
|
void |
static void |
wontoption(option) |
wontoption(option) |
int option; |
int option; |
{ |
{ |
|
|
set_my_state_dont(option); |
set_my_state_dont(option); |
} |
} |
|
|
static void |
static void |
dooption(option) |
dooption(option) |
int option; |
int option; |
{ |
{ |
|
|
set_my_state_will(option); |
set_my_state_will(option); |
} |
} |
|
|
static void |
static void |
dontoption(option) |
dontoption(option) |
int option; |
int option; |
{ |
{ |
|
|
|
|
static unsigned char str_lm[] = { IAC, SB, TELOPT_LINEMODE, 0, 0, IAC, SE }; |
static unsigned char str_lm[] = { IAC, SB, TELOPT_LINEMODE, 0, 0, IAC, SE }; |
|
|
void |
static void |
lm_will(cmd, len) |
lm_will(cmd, len) |
unsigned char *cmd; |
unsigned char *cmd; |
int len; |
int len; |
|
|
} |
} |
} |
} |
|
|
void |
static void |
lm_wont(cmd, len) |
lm_wont(cmd, len) |
unsigned char *cmd; |
unsigned char *cmd; |
int len; |
int len; |
|
|
} |
} |
} |
} |
|
|
void |
static void |
lm_do(cmd, len) |
lm_do(cmd, len) |
unsigned char *cmd; |
unsigned char *cmd; |
int len; |
int len; |
|
|
} |
} |
} |
} |
|
|
void |
static void |
lm_dont(cmd, len) |
lm_dont(cmd, len) |
unsigned char *cmd; |
unsigned char *cmd; |
int len; |
int len; |
|
|
#define SLC_RVALUE 2 |
#define SLC_RVALUE 2 |
static int slc_mode = SLC_EXPORT; |
static int slc_mode = SLC_EXPORT; |
|
|
void |
static void |
slc_init() |
slc_init() |
{ |
{ |
struct spc *spcp; |
struct spc *spcp; |
|
|
IAC, SB, TELOPT_LINEMODE, LM_SLC, 0, SLC_DEFAULT, 0, IAC, SE |
IAC, SB, TELOPT_LINEMODE, LM_SLC, 0, SLC_DEFAULT, 0, IAC, SE |
}; |
}; |
|
|
void |
static void |
slc_import(def) |
slc_import(def) |
int def; |
int def; |
{ |
{ |
|
|
/*@*/ else printf("slc_import: not enough room\n"); |
/*@*/ else printf("slc_import: not enough room\n"); |
} |
} |
|
|
void |
static void |
slc_export() |
slc_export() |
{ |
{ |
struct spc *spcp; |
struct spc *spcp; |
|
|
setconnmode(1); /* Make sure the character values are set */ |
setconnmode(1); /* Make sure the character values are set */ |
} |
} |
|
|
void |
static void |
slc(cp, len) |
slc(cp, len) |
unsigned char *cp; |
unsigned char *cp; |
int len; |
int len; |
|
|
return *slc_replyp++ = ch; |
return *slc_replyp++ = ch; |
} |
} |
|
|
void |
static void |
slc_start_reply() |
slc_start_reply() |
{ |
{ |
slc_replyp = slc_reply; |
slc_replyp = slc_reply; |
|
|
slc_add(LM_SLC); |
slc_add(LM_SLC); |
} |
} |
|
|
void |
static void |
slc_add_reply(func, flags, value) |
slc_add_reply(func, flags, value) |
unsigned char func; |
unsigned char func; |
unsigned char flags; |
unsigned char flags; |
|
|
slc_add(IAC); |
slc_add(IAC); |
} |
} |
|
|
void |
static void |
slc_end_reply() |
slc_end_reply() |
{ |
{ |
int len; |
int len; |
|
|
/*@*/else printf("slc_end_reply: not enough room\n"); |
/*@*/else printf("slc_end_reply: not enough room\n"); |
} |
} |
|
|
int |
static int |
slc_update() |
slc_update() |
{ |
{ |
struct spc *spcp; |
struct spc *spcp; |
|
|
return(need_update); |
return(need_update); |
} |
} |
|
|
void |
static void |
env_opt(buf, len) |
env_opt(buf, len) |
unsigned char *buf; |
unsigned char *buf; |
int len; |
int len; |
|
|
return; |
return; |
*opt_replyp++ = ch; |
*opt_replyp++ = ch; |
} |
} |
void |
static void |
env_opt_start() |
env_opt_start() |
{ |
{ |
unsigned char *p; |
unsigned char *p; |