Cisco Telnetz SSH
FossilOrigin-Name: 3951e56ccb84515d23060b7f83134d54ef733626591ba99b13395e6a6fcb3437
This commit is contained in:
parent
1be29b9e52
commit
eef12200d6
29
src/mod/cisco/cisco_in_telnet_ssh.c
Normal file
29
src/mod/cisco/cisco_in_telnet_ssh.c
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
|
||||
#include "cisco.h"
|
||||
#include "cw/capwap_items.h"
|
||||
#include "cw/cw.h"
|
||||
#include "cw/dbg.h"
|
||||
|
||||
int cisco_in_telnet_ssh(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
||||
struct sockaddr *from)
|
||||
{
|
||||
int enable=lw_get_byte(data);
|
||||
int type = lw_get_byte(data+1);
|
||||
|
||||
|
||||
switch (type){
|
||||
case 0:
|
||||
mbag_set_byte(conn->incomming,CW_ITEM_TELNET_ENABLE,enable);
|
||||
break;
|
||||
case 1:
|
||||
mbag_set_byte(conn->incomming,CW_ITEM_SSH_ENABLE,enable);
|
||||
break;
|
||||
default:
|
||||
cw_dbg(DBG_ELEM_ERR,"Unknown Telnet/SSH Type: %d",type);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user