2016-03-27 16:44:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
#include "cisco.h"
|
2016-04-02 17:07:35 +02:00
|
|
|
#include "include/cipwap_items.h"
|
2016-03-27 16:44:16 +02:00
|
|
|
#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:
|
2016-04-02 09:05:07 +02:00
|
|
|
mbag_set_byte(conn->incomming,CIPWAP_ITEM_TELNET_ENABLE,enable);
|
2016-03-27 16:44:16 +02:00
|
|
|
break;
|
|
|
|
case 1:
|
2016-04-02 09:05:07 +02:00
|
|
|
mbag_set_byte(conn->incomming,CIPWAP_ITEM_SSH_ENABLE,enable);
|
2016-03-27 16:44:16 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
cw_dbg(DBG_ELEM_ERR,"Unknown Telnet/SSH Type: %d",type);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|