Movatterモバイル変換


[0]ホーム

URL:


Wayback Machine
9 captures
18 Mar 2008 - 04 Oct 2025
MarMAYAug
Previous capture30Next capture
200920102015
success
fail
COLLECTED BY
Organization:Alexa Crawls
Starting in 1996,Alexa Internet has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to theWayback Machine after an embargo period.
Collection:alexa_web_2010
this data is currently not publicly accessible.
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20100530225453/http://www.lst.de:80/~okir/blackhats/node77.html
nextupprevious
Next:Fixed Length Strings Up:Presentation Layer Issues Previous:Text Based Protocols

Binary Representation Protocols

For some applications, text based protocols aren't very well suited,for instance because of space constraints. Protocols that presentdata such as integer values etc as binary values are usually much morecompact and can be processed much more efficiently than protocols thatrepresent all data as ASCII strings no matter what the underlying datatype is.

There isn't reallythe method of devising binaryrepresentation protocols; there are just a few techniques you'll encounterquite often.

For instance, it is very common to represent integer values as two'scomplement numbers using big-endian byte order (i.e. the most significantbyte first).7.3 It is quite important for a network protocol to define things likethis, otherwise machines with different sizes for integers, or with adifferent byte order, will not be able to talk to one another. Thus,no matter how your machine represents integers natively, it has toconvert them to thecanonical ornetwork representationdefined by the protocol before it can send them. Likewise, when itreceives data from the network, it has to convert it from the canonicalrepresentation to its native one. The same is true for all other datatypes; be it strings, floating point numbers or complex types suchas linked lists of structs (of course, not all protocols try to do thingssuch as sending linked lists across the network, but some do!). Theprocess of converting data objects to the network representation isfrequently calledserialization because potentially complex datastructures are converted to a sequence of bytes. The reverse operation(converting from network representation to host presentation) is calleddeserialization.

As you might expect, encoding complex data types means quite a bit ofcode complexity during serialization and deserialization. And of course,there's a potential for security bugs.


nextupprevious
Next:Fixed Length Strings Up:Presentation Layer Issues Previous:Text Based ProtocolsOlaf Kirch2002-01-16
[8]
ページ先頭

©2009-2025 Movatter.jp