Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Support for the SLIP protocol (RFC 1055)

Project Description

sliplib — A module for the SLIP protocol

The sliplib module implements the encoding and decoding functionality for SLIP packets, as described in RFC 1055. It defines encoding and decoding functions and classes, and registers these in the codecs module.


The SLIP protocol is described in RFC 1055 (A Nonstandard for Transmission of IP Datagrams over Serial Lines: SLIP, J. Romkey, June 1988). The original purpose of the protocol is to provide a mechanism to indicate the boundaries of IP packets, in particular when the IP packets are sent over a connection that does not provide a framing mechanism, such as serial lines or dial-up connections.

There is, however, nothing specific to IP in the SLIP protocol. SLIP offers a generic framing method that can be used for any type of message that must be transmitted over a (continuous) byte stream. In fact, the main reason for creating this module was the need to communicate with a third-party application that used SLIP over TCP (which is a continuous byte stream) to frame variable length messages.

The SLIP protocol uses four special byte values:

Byte value Name Purpose
0xc0 END to delimit messages
0xdb ESC to escape END or ESC bytes in the message
0xdc ESC_END the escaped value of the END byte
0xdd ESC_ESC the escaped value of the ESC byte

An END byte in the message is encoded as the sequence ESC+ESC_END (b'\xdb\xdc') in the slip packet, and an ESC byte in the message is encoded as the sequence ESC+ESC_ESC (b'\xdb\xdd').

Original Encoded
b'\xc0' b'\xdb\xdc'
b'\xdb' b'\xdb\xdd'

As a consequence, an ESC byte in a slip packet must always be followed by an ESC_END or an ESC_ESC byte; anything else is a protocol error. Although the implementation code proposed by RFC 1055 ignores such errors, the sliplib module raises an exception in such cases.

Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sliplib-0.0.1.tar.gz (5.6 kB) Copy SHA256 Checksum SHA256 Source Sep 19, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting