Just think, Just do it

出差!
明天出差到北方,做调度监控系统!
posted @ 2005-09-08 15:39 zfly 阅读(171) | 评论 (0) | 编辑 收藏
 
上传以前做的小工具(非常适合工控行业的调试)
自己很早做的串口工具(串口精灵ComX 1.62 ),收发线程分开。
同时支持10进制,16进制显示,不同颜色显示
支持DNP CRC , Modbus CRC ,u4f CRC , CDT CRC 等校验!

http://www.cnitblog.com/Files/zfly/ComX.rar
posted @ 2005-09-07 12:54 zfly 阅读(1167) | 评论 (3) | 编辑 收藏
 
看opentnl(from http://opentnl.sourceforge.net/doxytree/introprogramming.html)

Fundamental Limitations of Computer Networks

Computer networks of any size share some common limitations to varying degrees that must be accounted for in network simulations, with the internet being the most limited in all three regards. These three fundamental problems in network simulation are:

Limited Bandwidth - There is a limit to the rate at which hosts on the network can send data to one another. If a computer is connected to the network with a 56 kbps modem, this might be 5 Kbytes per second, while computers on a local area network might be able to communicate at 128 megabytes per second. For service providers, additional bandwidth capacity can be costly, so even if there is no physical bandwidth limitation, bandwidth conservation is important for many projects.

Packet Loss - Computer networks are inherently unreliable. Information transmitted over a network may become corrupted in transit, or may be dropped at a router where traffic has become congested. Even when (especially when) using a guaranteed message delivery protocol such as TCP, the unreliable nature of the underlying network still must be taken into account for network applications.

Latency - Messages sent from one host to another on the network take time to arrive at the destination. The time can be influenced by many factors, including the medium over which the messages travel, how many intermediate hosts must route the message, an the level of traffic congestion at each of those network nodes. Latency becomes particularly problematic in network simulations that attempt to present a real-time interface to the client, when the latency of the connection may be perceptible in time.

Standard Network Protocols

When computers communicate over networks, they send and receive data using specific network protocols. These protocols ensure that the computers are using the same specifications to address, forward and process data on the network. The internet, certainly the most widely used computer network today, uses a stack of three primary protocols that facilitate communication over the network. They are:

IP - Internet Protocol: The Internet Protocol is the basic building block for internet communications. IP is a routing protocol, which means that it is used to route information packets from a source host to a destination host, specified by an IP address. IP packets are not guaranteed to arrive at the destination specified by the sender, and those packets that do arrive are not guaranteed to arrive in the order they were sent. IP packet payloads may also be corrupted when they are delivered. IP is not useful as an application protocol - it is used mainly as a foundation for the higher level TCP and UDP protocols.

UDP - User Datagram Protocol: The User Datagram Protocol supplies a thin layer on top of IP that performs error detection and application level routing on a single host. UDP packets are addressed using both an IP address to specify the physical host, and a port number, to specify which process on the machine the packet should be delivered to. UDP packets also contain a checksum, so that corrupted packets can be discarded. UDP packets that are corrupted or dropped by an intermediate host are not retransmitted by the sender, because the sender is never notified whether a given packet was delivered or not.

TCP/IP - Transmission Control Protocol: TCP was designed to make internet programming easier by building a reliable, connection-based protocol on top of the unreliable IP. TCP does this by sending acknowledgements when data packets arrive, and resending data that was dropped. TCP is a stream protocol, so the network connection can be treated like any other file stream in the system. TCP is not suitable for simulation data, because any dropped packets will stall the data pipeline until the dropped data can be retransmitted.

Application Network Topologies

Networked applications can be designed to communicate with each other using different topological organization strategies. Some common communcations organization paradigms are discussed below.

Peer-to-Peer: In a peer-to-peer network application, the client processes involved in the network communicate directly with one another. Though there may be one or more hosts with authoritative control over the network of peers, peer-to-peer applications largely distribute the responsibility for the simulation or application amongst the peers.

Client-Server: In the client-server model, one host on the network, the server, acts as a central communications hub for all the other hosts (the clients). Typically the server is authoritative, and is responsible for routing communication between the several clients.

Client-Tiered Server Cluster: In network applications where more clients want to subscribe to a service than can be accomodated by one server, the server's role will be handled by a cluster of servers peered together. The servers in the network communicate using the peer-to-peer model, and communicate with the clients using the client-server model. The servers may also communicate with an authoritative "super-server" to handle logins or resolve conflicts

...............................

There are many Symmetric Encryption algorithms of varying levels of security, but all of them when used alone have several drawbacks. First, both parties to the communication must have a copy of the shared secret key. If a client is attempting to communicate with a service it has never contacted before, and doesn't share a key with, it won't be able to communicate securely with it. Also, although an intermediate eavesdropper cannot read the data sent between the hosts, it can alter the messages, potentially causing one or more of the systems to fail.

Symmetric Encryption加密算法并不适应游戏中,因为游戏者可以任意加入,而且偷窥者虽然不能读懂数据含义,但很有可能更改消息!

Public Key Cryptography and Key Exchange

Public Key Cryptography algorithms were invented to solve the symmetric key distribution problem. In public key algorithms, each participant in the communication has a key pair composed of a public key and a private key. The theory of public keys suggests that a message encrypted with the public key can only be decrypted with the private key and vice-versa.

Key exchange algorithms (Diffie-Helman, ECDH) have certain properties such that two users, A and B can share their public keys with each other in plain text, and then, using each other's public key and their own private keys they can generate the same shared secret key. Eavesdroppers can see the public keys, but, because the private keys are never transmitted, cannot know the shared secret. Because public key algorithms are computationally much more expensive than symmetric cryptography, network applications generally use public key cryptography to share a secret key that is then used as a symmetric cipher key.

Digital Signatures/Certificate Authorization

Public key algorithms still have one vulnerability, known as the Man-in-the-Middle attack. Basically, an eavesdropper in the communication between A and B can intercept the public keys in transit and substitute its own public key, thereby establishing a secure connection with A and B - decrypting incoming data and reencrypting it with its shared key to the opposite party.

To combat this attack, the concept of certificates was introduced. In this model, the public key of one or both of the participants in the communication is digitally signed with the private key of some known, trusted Certificate Authority (CA). Then, using the Certificate Authority's public key, the parties to the communication can validate the public key of the opposite parties.

Malicious Attackers and Denial of Service

A problem facing developers of internet applications and web sites are Denial-of-Service attacks. Malicious users employing custom tools often attempt to shut down publicly available internet servers. There are a variety of well-known categories of DoS attacks.

Traffic flooding: This attack sends a barrage of data to the public address of the server, in an attempt to overwhelm that server's connection to the internet. This attack often employs many machines, hijacked by the attacker and acting in concert. These attacks are often the most difficult to mount since they require a large number of available machines with high-speed internet access in order to attack a remote host effectively.

Connection depletion: The connection depletion attack works by exploting a weakness of some connection based communications protocols. Connection depletion attacks work by initiating a constant flow of spurious connection attempts. When a legitimate user attempts to connect to the server, all available pending connection slots are already taken up by the spoofed connection attempts, thereby denying service to valid clients.

Server CPU depletion: If the server performs public key cryptography as part of the connection sequence, a malicious client could be constructed to initiate bogus connection attempts in an effort to initiate many CPU intesive cryptographic operations on the server.

The TNL uses a two-phase connection protocol to protect against connection depletion attacks, and implements a client-puzzle algorithm to prevent CPU depletion attacks. Also, TNL is built so that bogus packets are discarded as quickly as possible, preventing flooding attacks from impacting the server CPU.

posted @ 2005-09-07 10:45 zfly 阅读(715) | 评论 (0) | 编辑 收藏
 
Digi connect me 固件升级失败后的处理!
前几天升级digi connect me 的固件失败后,抓狂了好几天,幸好现解决
通过短接几个pins即可!

接着看游戏的网络编程的相关知识!

網路遊戲目前的瓶頸在網路 I/O 的部份,因為網路遊戲的連線型態和許多
其他網路應用服務(如 FTP, Web Applications...等)不同,它是屬於高
連線數(動輒數千上萬)、高頻率、低流量(每秒每個連線平均溝通 4~6
KBytes)。所以實作上往往和作業系統綁在一起,造成開發的困難。(例如
在 Windows 上最適合開發網路遊戲的 I/O 模型是 I/O Completion Port
模型,在 Unix 系列,則是 Asynchronous I/O 模型)
posted @ 2005-09-06 12:28 zfly 阅读(509) | 评论 (0) | 编辑 收藏
 
eNet Library 调试成功!
花了一个星期时间,断断续续的,总于调试一个简单服务器端,一个客户端程序,成功对接!

 原来怀疑源代码有bug,结果是自己没有理解原作者的设计意图,没有看懂源程序所致!
posted @ 2005-09-05 13:37 zfly 阅读(538) | 评论 (1) | 编辑 收藏
 
wincvs 登陆不了 enet的cvs服务器

用wincvs登陆不了.... ... 郁闷中!!!!!

cvs -d ":pserver:anonymous@bespin.org:/var/lib/cvs/enet " login
Logging in to :pserver:anonymous@bespin.org:2401:/var/lib/cvs/enet
cvs [login aborted]: Connection to server failed
Error connecting to host bespin.org: 不知道这样的主机。

***** CVS exited normally with code 1 *****

 

posted @ 2005-09-02 13:49 zfly 阅读(469) | 评论 (0) | 编辑 收藏
 
哎,不幸!
女人生来就是不讲理吗?
昨天老婆跟老妈吵架!我只能静观。
真是的,婚姻象坟墓,像地狱,对那些离婚后即将离婚的男人有了更新的
理解和同情!
posted @ 2005-09-01 09:57 zfly 阅读(127) | 评论 (0) | 编辑 收藏
 
仅列出标题
共14页: First 6 7 8 9 10 11 12 13 14 
 
<2008年6月>
日一二三四五六
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

 公告


我创建的群:21159852,欢迎大家加入! ( Scada,DCS,PLC, RTU,VxWorks, Linux,104,101, DNP,MODBUS ...... )

 导航

  • IT博客
  • 首页
  • 发新随笔
  • 发新文章
  • 联系
  • 管理

 统计

  • 随笔: 137
  • 文章: 3
  • 评论: 97
  • 引用: 0

常用链接

  • 我的随笔
  • 我的评论
  • 我参与的随笔

留言簿(9)

  • 给我留言
  • 查看公开留言
  • 查看私人留言

随笔分类(141)

  • 学习C C++(28) (rss)
  • 本人作品 ---下载(3) (rss)
  • 生活(47) (rss)
  • 知识(47) (rss)
  • 通讯规约(16) (rss)

随笔档案(137)

  • 2009年2月 (1)
  • 2008年6月 (3)
  • 2008年4月 (1)
  • 2008年2月 (2)
  • 2007年12月 (1)
  • 2007年11月 (1)
  • 2007年10月 (2)
  • 2007年9月 (1)
  • 2007年8月 (2)
  • 2007年7月 (4)
  • 2007年6月 (4)
  • 2007年5月 (4)
  • 2007年4月 (6)
  • 2007年3月 (4)
  • 2007年2月 (2)
  • 2007年1月 (1)
  • 2006年12月 (1)
  • 2006年11月 (1)
  • 2006年9月 (6)
  • 2006年8月 (12)
  • 2006年7月 (1)
  • 2006年6月 (6)
  • 2006年5月 (9)
  • 2006年4月 (3)
  • 2006年3月 (10)
  • 2006年2月 (10)
  • 2006年1月 (11)
  • 2005年12月 (12)
  • 2005年11月 (2)
  • 2005年10月 (6)
  • 2005年9月 (8)

文章分类(2)

  • 技术类(2) (rss)

文章档案(3)

  • 2013年1月 (1)
  • 2008年4月 (1)
  • 2005年8月 (1)

相册

  • SCADA

上传

  • about apache
  • 学习工业控制方面 -知识的好网站
  • 学学老外的思想!

最新随笔

  • 1. 好久没上来了哦
  • 2. 看看未来的节能车,61850竟然也包括其通讯
  • 3. News on IEC 61850
  • 4. 口乃心户之门!
  • 5. 活着!
  • 6. 在HK
  • 7. On-business
  • 8. life..
  • 9. AB PLC
  • 10. AN OVERVIEW OF REAL-TIME DATABASE SYSTEMS

搜索

  •  

积分与排名

  • 积分 - 112236
  • 排名 - 67

最新评论

  • 1. re: IEC104
  • 能否给我一份代码呢。最近刚开始学习104规约,邮箱是270797194@qq.com。不胜感激啊
  • --兵兵
  • 2. re: IEC104
  • 请将源码发给我学习学习啊,lucas_woo@gmail.com。谢谢!!!
  • --ww
  • 3. re: 哎,老有人问我Modbus CRC 算法!! 今天贴出代码!!(超值)以后不再回答
  • 嗯,楼主,谢谢了
  • --sanwen
  • 4. re: 下步学习内容!(下一代规约... ... ASN.1不学不行啊!!)
  • 貌似asnlab 的 ADT软件确实不错,编解码速度快,
  • --迷你猫
  • 5. re: 下步学习内容!(下一代规约... ... ASN.1不学不行啊!!)
  • 从来没接触过asn。1,如何可以最快上手?期待,lengshu66@163.com
  • --me

阅读排行榜

  • 1. Cygwin(或linux) 中环境变量的配置(要区分BASH 和TCSH)(5017)
  • 2. 下步学习内容!(下一代规约... ... ASN.1不学不行啊!!)(4992)
  • 3. 哎,老有人问我Modbus CRC 算法!! 今天贴出代码!!(超值)以后不再回答(4843)
  • 4.  1M带宽到底是多少?和磁盘的1M有什么区别?(4618)
  • 5. 查看. ODT文件! 同时支持windows 和linux(3454)

评论排行榜

  • 1. IEC104(27)
  • 2. 下步学习内容!(下一代规约... ... ASN.1不学不行啊!!)(11)
  • 3. http://www.xialala.com/(11)
  • 4.  1M带宽到底是多少?和磁盘的1M有什么区别?(10)
  • 5. 查看. ODT文件! 同时支持windows 和linux(6)

Powered by: 博客园
模板提供:沪江博客
Copyright ©2025 zfly