【文章內(nèi)容簡介】
操作之前,需要給你要發(fā)送數(shù)據(jù)的目標(biāo)建立一個地址結(jié)構(gòu)體; 基于 NUCLEUS NET的應(yīng)用程序開發(fā) ? Network Configuration – Local Host Adapters Definition ( NU_DEVICE): ? dv_name : Unique device name that is used to look up the interface. ? dv_flags : Any special flags used for configuring the operation of the device, ex DV_NOARP ? (*dv_init) (DV_DEVICE_ENTRY *) : The name of the interface’s initialization routine. ? dv_driver_options: Any driver dependent options, including the possibility of the address of a structure containing driver options. ? dv_ip_addr : The IP number to be used by this Nucleus NET interface. ? ...... 基于 NUCLEUS NET的應(yīng)用程序開發(fā) ? 建立地址的數(shù)據(jù)結(jié)構(gòu) /* Declare the address structure. */ struct addr_struct *test_addr。 /* Allocate memory for the address structure. */ status = NU_Allocate_Memory (amp。System_Memory, (void )amp。test_addr, sizeof(struct addr_struct), NU_SUSPEND)。 /* Indicate this is an IP family address. */ test_addrfamily = NU_FAMILY_IP。 /* Set up the port number. */ test_addrport = 4000。 /* Set up the IP number. */ test_addr[0] = (unsigned char) 100。 test_addr[1] = (unsigned char) 200。 test_addr[2] = (unsigned char) 40。 test_addr[3] = (unsigned char) 1。 /* Set up the name. */ test_addrname = “test_node”。 基于 NUCLEUS NET的應(yīng)用程序開發(fā) ? open a socket: – 例子: Standard Socket like Usage ( Server ) ? Create a socket (NU_Socket). ? Bind the Server port and IP address (NU_Bind). ? Perform a Listen call to establish the number of simultaneous requests that can ? be queued (NU_Listen). ? Perform an Accept service call to ‘wait’ for client connections (NU_Accept). ? After the Accept service call returns (., a connection has been established) data ? can be transferred (control returns from NU_Accept). ? Transfer data (NU_Send and NU_Recv). ? Close the connection (NU_Close_Socket). 其它網(wǎng)絡(luò)協(xié)議 EMail: SMTP / POP3 ? 嵌入式的 EMail Server ; ? 發(fā)送 notification messages; Application SNMTP/POP3 Nucleus PLUS Nucleus NET Driver Nucleus WebServ ? 完全嵌入式的 WWW Server; ? 可以顯示目標(biāo)機(jī)的信息給 client; ? 可以從遠(yuǎn)端配置目標(biāo)機(jī); ? 有 SSI Plugins,代碼更容易使用; Nucleus WebServ ? 存儲器上的文件系統(tǒng); ? 容易和 Nucleus FILE集成; ? 其它的文件系統(tǒng)也可以被集成; Application Nucleus WebServ Nucleus PLUS Nucleus NET Driver Tel ? Tel client 和 server ; ? 可以定義任何 tel接口; ? 容易使用的 API; Application Tel Nucleus PLUS Nucleus NET Driver FTP / TFTP ? 可以定義任何 FTP 接口 ? 可以從任何的 FTP client訪問 ? FTP client和 server Application FTP/TFTP Nucleus PLUS Nucleus NET Driver Nucleus SNMP ? 支持全部的 SNMP v1 V2 V3 ( 兩種版本) . ? 非常容易定制用戶自己的 MIB, 然后也非常易于集成 . ? 包含了 MIB/MIB II的編譯器 . ? 支持 MIB II Application Nucleus SNMP Nucleus NET Nucleus PLUS Nucleus FILE Nucleus WebServ Driver Nucleus SNMP ? RFC1213 MIBII Included. ? 可與 Nucleus RMON(9 Groups)無縫連接 . ? 也可與 Nucleus RMONLite(4 Groups)無縫連接 ? 非常小的代碼開銷( 30K Bytes) ? 分布式結(jié)構(gòu) ? 支持多接口 Application Nucleus SNMP Nucleus NET Nucleus PLUS Nucleus FILE Nucleus WebServ Driver Nucleus VNET ? 可用 Nucleus MNT – 虛擬網(wǎng)絡(luò)原型 ? 在目標(biāo)機(jī)和原型之間通信,可與實際目標(biāo)互聯(lián); Nucleus MNT 1 Nucleus MNT 2 Nucleus MNT 3 Virtual NDIS Driver NDIS Driver Network Node 1 Network Node 2 NET的應(yīng)用 Electronic Access Control from Ramp。D,Infographics Systems Nucleus Software Products Used: ? Nucleus PLUS ? Nucleus NET 與 DOS兼容的文件系統(tǒng) Nucleus NET TCP/IP 協(xié)議包 SNMP TFTP FTP web server SMTP RIP2 OSPF JAVA Nucleus Graphics 圖形包 Nucleus PLUS 系統(tǒng)內(nèi)核 Ether NET Driver Driver Driver Drivers PPP SLIP POP3