P2P Format

From Phoenix Labs Wiki

Jump to: navigation, search

The P2P format was created for the original PeerGuardian. It is simple and easily editable with any text editor, but is not very compact for transport in bandwidth limited situations. For that it is recommend you use the P2B format.

Contents

The format

The P2P format had no official specification, but applications always follow the basic format:

Some organization:1.0.0.0-1.255.255.255
Another organization:8.0.0.0-8.255.255.255

The encoding of a P2P list is not formally defined, but many parsers assume they are ASCII or ISO-8859-1. PeerGuardian 2 assumes P2P lists are encoded in ISO-8859-1 if they do not begin with a UTF-8 BOM.

PeerGuardian 2 also treats lines which start with a # as a single-line comment and ignores empty lines, like so:

# This is a comment
Some organization:1.0.0.0-1.255.255.255
Another organization:8.0.0.0-8.255.255.255

# This is another comment
Yet another organization:16.0.0.0-16.255.255.255
And another:32.0.0.0-32.255.255.255

Developing with P2P

A cross-platform C++ library for working with the P2P format is freely available from Phoenix Labs.

See also

External links

Personal tools