11
votes

In practice, what is the most appropriate term for the communications transmitted over a network in higher level protocols (those above TCP/IP, for example)? Specifically, I am referring to small, binary units of data.

I have seen both "message" and "packet" referred to in various client/server libraries, but I was interested in the community's consensus.

4
I would call a single TCP PDU a "segment" not "message" or "packet", seeing as TCP uses MSS (Max Segment Size) to detmined how much data it can send over one IP PDU payload (and in turn one Ethernet PDU payload). Ethernet PDUs I call datagrams, IP PDUs I call packets and TCP/UDP PDUs I call segments. I guess "message" would be fine for above TCP, I've heard that several times.jwbensley

4 Answers

14
votes

These are definitely messages. A "packet" is a layer-3 (in ISO terminology) protocol unit, such as an IP packet; and a "datagram" is a layer-1 or layer-2 unit, such as the several Ethernet datagrams that might make up the fragments of an IP packet.

So a message might be split across several packets, particularly if you're using a streaming protocol such as TCP, and a packet might be split across several datagrams.

2
votes

Just my take. It probably depends on what level you are working at. When I think of the entire transmission (all headers, data, etc) I would call that a Message. A packet, especially in TCP/IP, is just a part of a message. Multiple packets are pushed across the network comprising an entire message.

1
votes

I think packet refers to the chunks of data transferred on a lower layer like Ethernet and message is used for higher level information exchange.

imo they basically mean the same...

edit:

There's also another terminology called frame, which is defined in RFC 1122 as "the unit of transmission in a link layer protocol, and consists of a link-layer header followed by a packet." [wikipedia]

0
votes

msgs is packet in Network Layer

it is segement in TCP protocol(Transmission Layer)

it is msgs in HTTP or FTP(Application Layer)