<commit_before>[![Build Status](https://travis-ci.org/iptube/SPUDlib.svg?branch=master)](https://travis-ci.org/iptube/SPUDlib)
[![Coverage Status](https://coveralls.io/repos/iptube/SPUDlib/badge.svg?branch=master)](https://coveralls.io/r/iptube/SPUDlib?branch=master)
# SPUDlib
Substrate Protocol for User Datagrams (SPUD) Prototype

## Compiling

    ./bootstrap.sh   (To create the ./configure script)
    ./configure   (To create the Makefiles)
    make          (To build the code)

You will end up with two test binaries in samplecode and a library you can link against in src.

sampelcode/spudecho is a simple echo-server that echoes back all UDP packets.
samplecode/spudtest [iface] [ipaddr] sends SPUD packets to the desired IP from the given interface

## Development

### Unit Tests
Turn on unit tests with:

    ./configure --enable-check

This need the check library installed

Build and run the checks with

    make check

If tests fail it can help to run
test/check_spudlib to see where it fails.

(On ubuntu I did not get the ubuntu packaged version of check to work, but
downloading and installing manually did work like a charm. But remember to
uninstall the ubuntu check package first.)
<commit_msg>Say that pkg-config is needed to buuild the ./configure script.<commit_after>[![Build Status](https://travis-ci.org/iptube/SPUDlib.svg?branch=master)](https://travis-ci.org/iptube/SPUDlib)
[![Coverage Status](https://coveralls.io/repos/iptube/SPUDlib/badge.svg?branch=master)](https://coveralls.io/r/iptube/SPUDlib?branch=master)
# SPUDlib
Substrate Protocol for User Datagrams (SPUD) Prototype

## Compiling

    ./bootstrap.sh   (To create the ./configure script)
    ./configure   (To create the Makefiles)
    make          (To build the code)

You will end up with two test binaries in samplecode and a library you can link against in src.

sampelcode/spudecho is a simple echo-server that echoes back all UDP packets.
samplecode/spudtest [iface] [ipaddr] sends SPUD packets to the desired IP from the given interface

## Development

You need to have autoconf, libtool and pkg-config installed to build the ./configure script.

### Unit Tests
Turn on unit tests with:

    ./configure --enable-check

This need the check library installed

Build and run the checks with

    make check

If tests fail it can help to run
test/check_spudlib to see where it fails.

(On ubuntu I did not get the ubuntu packaged version of check to work, but
downloading and installing manually did work like a charm. But remember to
uninstall the ubuntu check package first.)

{'fraction_non_alphanumeric': 0.08333333333333333, 'fraction_numerical': 0.0, 'mean_word_length': 4.011650485436893, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2783507', 'n_tokens_mistral': 781, 'n_tokens_neox': 741, 'n_words': 311}