network-protocols

Any difference between socket connection and tcp connection?

人走茶凉 提交于 2019-12-04 07:51:27
问题 Are these 2 concepts refer to the same thing? Do they have difference? In my opinion, they are different, and socket connection is based on tcp connection. A socket contains an IP address and port and it could only connect to another socket, but an IP address and port in the same machine could be connected with many other IP addresses and ports with TCP connection. Is this right? 回答1: TCP/IP is a protocol stack for communication, a socket is an endpoint in a (bidirectional) communication. A

Efficient decoding of binary and text structures (packets)

两盒软妹~` 提交于 2019-12-04 05:14:36
Background There is a well-known tool called Wireshark . I've been using it for ages. It is great, but performance is the problem. Common usage scenario includes several data preparation steps in order to extract a data subset to be analyzed later. Without that step it takes minutes to do filtering (with big traces Wireshark is next to unusable). The actual idea is to create a better solution, fast, parallel and efficient, to be used as a data aggregator/storage. Requirements The actual requirement is to use all power provided by modern hardware. I should say there is a room for different

In protocol design, why would you ever use 2 ports?

こ雲淡風輕ζ 提交于 2019-12-04 02:46:49
问题 When a TCP Server does a socket accept on a port, it gets a new socket to work with that Client. The accepting socket remains valid for that port and can accept further clients on that port. Why did the original FTP specification RFC 959 decide to create both a control port and a data port? Would there be any reason to do this in a similar custom protocol? It seems to me that this could have been easily specified on a single port. Given all the problems with firewalls and NATS with FTP, it

Is SMTP based on TCP or UDP?

 ̄綄美尐妖づ 提交于 2019-12-03 22:07:28
Is SMTP based on TCP or UDP ? I really can't confirm it . In my opinion, SMTP should be based on UDP, but someone told me that is must be TCP. In theory SMTP can be handled by either TCP, UDP, or some 3rd party protocol. As defined in RFC 821 , RFC 2821 , and RFC 5321 : SMTP is independent of the particular transmission subsystem and requires only a reliable ordered data stream channel. In addition, the Internet Assigned Numbers Authority has allocated port 25 for both TCP and UDP for use by SMTP. In practice however, most if not all organizations and applications only choose to implement the

possible web protocols in javascript

孤者浪人 提交于 2019-12-03 15:06:22
What are the alternatives to HTTP (per XMLHttpRequest ) when establishing a server connection in JavaScript? The only one I know is the WebSocket protocol (per WebSocket ). Their corresponding secure variants https and wss included. Would it be possible to choose an arbitrary protocol with JavaScript? How do you communicate with NTP, IMAP, UDP etc. -services for example in Node.js? From Node.js, you can do pretty much anything. E.g. UDP is directly supported ( dgram module which is shipped with node.js), and npm has a plethora of third-party modules for many other protocols, such as SMTP, IMAP

SCTP with Multihoming as a Drop In Replacement for TCP

一世执手 提交于 2019-12-03 14:08:00
SCTP has native multi-homing support which if I understand it correctly will automatically reroute your packets over a secondary NIC if the primary interface goes down. I duplicated this functionality with TCP by writing a custom routing deamon to modify the routing tables if my primary NIC goes down. I would like to try using SCTP instead. In Steven's Unix Network Programming V1 3rd Edition on page 288 it says: For this example, we use a one-to-many-style server. We make this choice for one important reason. The examples in Chapter 5 can be modified to run over SCTP with one minor change:

How to correctly represent message class in SMPP

早过忘川 提交于 2019-12-03 13:42:13
I am currently trying to figure out how sms classes are correctly represented in SMPP. However I am by now completely confused by the standard and it's documentation. In normal sms we have Class0: Flash sms, which are shown on the display Class1: Normal Sms to be stored on the sim or internally in the device Looking at the SMPP spec, I first find the parameter data_coding in the submit_sm operation, which is used to set the DCS sent via MAP. As far as I understand this, if we want to explicitly set the message class we need to set the first four bits of this parameter to ones, then two bits

Java and CANopen

荒凉一梦 提交于 2019-12-03 12:04:07
问题 Background I am required to create a Java program on a laptop to receive/send CANopen messages. RJ45 is chosen to be the network's physical medium. I am new to CANopen and Java communications programming. Pardon me if I appear to be uninitiated. The truth is, I have been reading up a lot, but I still do not know how to get started. Questions Other than connecting a PC to the CANbus network, what else does the CAN-PC adapter do? Is it possible to connect the laptop to the CANbus network

Big endian or Little endian on net?

有些话、适合烂在心里 提交于 2019-12-03 11:15:25
问题 In what byte order does data transfer occur on net? Is it Little Endian or big endian? How is it converted to the respective byte order once the data reaches the host ? 回答1: "Network byte order" is Big Endian, and protocols such as TCP use this for integer fields (e.g. port numbers). Functions such as htons and ntohs can be used to do conversion. The data itself doesn't have any endianness it's entirely application defined, unless you're using a Presentation Layer such as XDR. 回答2: Its

What kind of SCTP support is there on various Windows versions?

梦想与她 提交于 2019-12-03 09:21:02
问题 What kind of SCTP support is there on various Windows versions? 回答1: Out of the box, there are none, on any versions of Windows.(Microsoft has claimed there is no customer demand, so I always encourage anyone looking for SCTP on windows contact Microsoft and express their need for one..) There are 3rd party implementations, e.g. sctplib SctpDrv 回答2: Recently, Windows support has been added to this userspace SCTP stack: http://sctp.fh-muenster.de/sctp-user-land-stack.html It will have a paper