54 lerr <<
"socketchan: Connect without name!!!\n";
65 const char *str =
a.getString(4);
68 if (!strncmp(str,
"INFO", 4)) {
74 a.addStringT(
"Series 3");
77 a.addStringT(
"Series 5");
80 lerr <<
"ncpd: protocol version not known" << endl;
81 a.addStringT(
"Unknown!");
86 }
else if (!strncmp(str,
"CONN", 4)) {
91 }
else if (!strncmp(str,
"CHAL", 4)) {
97 }
else if (!strncmp(str,
"RESP", 4)) {
103 }
else if (!strncmp(str,
"GSPD", 4)) {
110 }
else if (strncmp(str,
"REGS", 4) == 0) {
114 const char *name =
a.getString(8);
125 lerr <<
"SocketChannel:: received unknown NCP command (" <<
a <<
")" << endl;
189 if (memchr(
a.getString(), 0,
a.getLen()) == 0) {
191 lerr <<
"ncpd: command " <<
a <<
" unrecognized."
203 if (
a.getLen() > 8 && !strncmp(
a.getString(),
"NCP$", 4)) {
205 lerr <<
"ncpd: command " <<
a <<
" unrecognized."
234 }
else if (res == 1) {
235 if (
a.getLen() > 8 && !strncmp(
a.getString(),
"NCP$", 4)) {
237 lerr <<
"ncpd: command " <<
a <<
" unrecognized."
SocketChannel(TCPSocket *socket, NCP *ncp)
const char * getNcpRegisterName()
bool ncpCommand(bufferStore &a)
void ncpConnectTerminate()
void ncpDataCallback(bufferStore &a)
A class for dealing with sockets.
bool closeSocket(void)
Closes the connection.
int getBufferStore(bufferStore &a, bool wait=true)
Receive data into a bufferStore .
bool sendBufferStore(const bufferStore &a)
Sends data from a bufferStore .
A generic container for an array of bytes.
void ncpSend(bufferStore &a)
void ncpRegisterPcServer(TCPSocket *skt, const char *name)
PcServer * ncpFindPcServer(const char *name)
void terminateWhenAsked()
short int ncpProtocolVersion()