Re: Suggestions for custom application-layer protocol?

From: Glyn Davies (gryn_at_riffraff.plig.net)
Date: 05/27/05


Date: Fri, 27 May 2005 10:55:40 +0000 (UTC)

In comp.os.linux.embedded Grant Edwards <grante@visi.com> wrote:
> On 2005-05-26, Mark <mark_2811nospam@excite.com> wrote:

>> I expect I will end up with a text-based protocol, with a header
>> that indicates the number of bytes in the payload.

> If you're using a text-based protocol, you don't nead a header
> with a payload count to tell you where the message ends. Use
> an end-of-message character or string. The cr/lf pair is used
> as the end-of-message delimiter by a lot of text-based
> runs-on-top of TCP protocols. That approach works wonderfully
> with line-oriented high-level text-handling libraries and
> utilties -- you can do all sorts of useful stuff using nothing
> but a few utilities like netcat, expect, and so on.

> I've also seen protocols that use STX/ETX to frame messages,
> and that works nicely as well, but isn't as compatible with
> pre-existing utilities.

<snip>

Most STX/ETX stuff I have seen was over serial comms.
Not seen it in use over TCP - except where there was an annex box
feeding out a bunch of serial lines converted to TCP.

Glyn

-- 
------------------------------------------------------------------------
Glyn Davies / gryn@plig.net / www.technobobbins.com / Insert quote here?
------------------------------------------------------------------------


Relevant Pages

  • Re: Suggestions for custom application-layer protocol?
    ... > with a payload count to tell you where the message ends. ... > pre-existing utilities. ... Most STX/ETX stuff I have seen was over serial comms. ... Not seen it in use over TCP - except where there was an annex box ...
    (comp.unix.programmer)
  • Re: Port Scanning.
    ... > The only thing that isn't currently easy to do is TCP full connection ... > payload injection from spoofed IP's. ... talking about in the last email was a way to actually introduce the TCP ... Robert E. Lee ...
    (Pen-Test)
  • Re: tool for creating packets
    ... > or linux based which help me to create tcp and udp packets with m own ... > payload. ... where can I fond such a tool? ...
    (Security-Basics)
  • Re: Libpcap based: packet generator + capture file editor + bridge for IEEE802.3 on FreeBSD
    ... in Ethernet, ARP, IP, ICMP, TCP, and UDP headers and you can specify ... It is possible for the payload to cover the ICMP, ... TCP, or UDP header itself (checksum is corrected ...
    (freebsd-net)
  • Re: Non-blocking sockets
    ... Let's assume that the payload is less than 4 bytes ... when issuing a HEAD request). ... mean the 'recv' will block trying to receive 8 bytes, no, it will not. ... which way from a TCP connection, ...
    (comp.unix.programmer)