91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 777KB
    文件類型: .gz
    金幣: 1
    下載: 0 次
    發布日期: 2021-06-01
  • 語言: 其他
  • 標簽:

資源簡介

基于linux arm-mx335平臺,串口網口透傳映射源碼,直接編譯測試通過,實現全雙工 串口網口透傳映射

資源截圖

代碼片段和文件信息

/*
?*??ser2net?-?A?program?for?allowing?telnet?connection?to?serial?ports
?*??Copyright?(C)?2001??Corey?Minyard?
?*
?*??This?program?is?free?software;?you?can?redistribute?it?and/or?modify
?*??it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
?*??the?Free?Software?Foundation;?either?version?2?of?the?License?or
?*??(at?your?option)?any?later?version.
?*
?*??This?program?is?distributed?in?the?hope?that?it?will?be?useful
?*??but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?*??MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
?*??GNU?General?Public?License?for?more?details.
?*
?*??You?should?have?received?a?copy?of?the?GNU?General?Public?License
?*??along?with?this?program;?if?not?write?to?the?Free?Software
?*??Foundation?Inc.?59?Temple?Place?Suite?330?Boston?MA??02111-1307??USA
?*/

#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?

#include?“controller.h“
#include?“selector.h“
#include?“dataxfer.h“
#include?“utils.h“
#include?“telnet.h“


extern?selector_t?*ser2net_sel;

/**?baseD?ON?sshd.c?FROM?openssh.com?*/
#ifdef?HAVE_TCPD_H
#include?
int?allow_severity?=?LOG_INFO;
int?deny_severity?=?LOG_WARNING;
static?char?*progname?=?“ser2net-control“;
#endif?/*?HAVE_TCPD_H?*/

/*?This?file?holds?the?code?that?runs?the?control?port.?*/

static?int?acceptfd; /*?The?file?descriptor?for?the?accept?port.?*/

static?int?max_controller_ports?=?4; /*?How?many?control?connections
???do?we?allow?at?a?time.?*/
static?int?num_controller_ports?=?0; /*?How?many?control?connections
???are?currently?active.?*/

#define?INBUF_SIZE?255 /*?The?size?of?the?maximum?input?command.?*/

char?*prompt?=?“->?“;

/*?This?data?structure?is?kept?for?each?control?connection.?*/
typedef?struct?controller_info?{
????int????????????tcpfd; /*?When?connected?the?file
???????????????????????????????????????????descriptor?for?the?TCP
???????????????????????????????????????????port?used?for?I/O.?*/
????struct?sockaddr_in?remote; /*?The?socket?address?of?who
???is?connected?to?this?port.?*/

????unsigned?char?inbuf[INBUF_SIZE+1]; /*?Buffer?to?receive?command?on.?*/
????int??inbuf_count; /*?The?number?of?bytes?currently
???in?the?inbuf.?*/

????char?*outbuf; /*?The?output?buffer?NULL?if
???no?output.?*/
????int??outbufsize; /*?Total?size?of?the?memory
???allocated?in?outbuf.?*/
????int??outbuf_pos; /*?The?current?position?in?the
???output?buffer.?*/
????int??outbuf_count; /*?The?number?of?bytes
???(starting?at?outbuf_pos)
???left?to?transmit.?*/

????void?*monitor_port_id; /*?When?port?monitoring?this?is
???the?id?given?when?the?monitoring
???is?started.??It?is?used?to?stop
???monitoring.?*/

????struct?controller_info?*next; /*?Used?to?keep?these?items?in
???a?linked?list.?*/

???

評論

共有 條評論

相關資源