Packet types: Abstract specification of network protocol messages

Citation
Pj. Mccann et S. Chandra, Packet types: Abstract specification of network protocol messages, COMP COM R, 30(4), 2000, pp. 321-333
Citations number
24
Categorie Soggetti
Information Tecnology & Communication Systems
Journal title
SIGCOMM computer communication review
ISSN journal
01464833 → ACNP
Volume
30
Issue
4
Year of publication
2000
Pages
321 - 333
Database
ISI
SICI code
0146-4833(200010)30:4<321:PTASON>2.0.ZU;2-G
Abstract
In writing networking code, one is often faced with the task of interpretin g a raw buffer according to a standardized packet format. This is needed, f or example, when monitoring network traffic for specific kinds of packets, or when unmarshaling an incoming packet for protocol processing. In such ca ses, a programmer typically writes C code that understands the grammar of a packet and that also performs any necessary byte-order and alignment adjus tments. Because of the complexity of certain protocol formats, and because of the low-level of programming involved, writing such code is usually a cu mbersome and error-prone process. Furthermore, code written in this style l oses the domain-specific information, viz, the packet format? in its detail s, making it difficult to maintain. We propose to use the idea of types to eliminate the need for writing such low-level code manually. Unfortunately, types in programming languages, suc h as C, are not well-suited for the purpose of describing packet formats. T herefore, we have designed PACKETTYPES, a small packet specification langua ge that serves as a type system for packet formats. PACKETTYPES convenientl y expresses features commonly found in protocol formats, including layering of protocols by encapsulation, variable-sized fields, and optional fields. A compiler for this language generates efficient code for type checking a packet, i.e., matching a packet against a type. In this paper, we describe the design, implementation, and some uses of this language.