Skip to content
Snippets Groups Projects
Commit 6153782c authored by Electronic Vision(s)'s avatar Electronic Vision(s)
Browse files

Initial commit for GitHub

Change-Id: If9ea4bce97e8180ddbdcc34339307e62f3505c5a
parents
No related branches found
No related tags found
No related merge requests found
Showing
with 97 additions and 0 deletions
[gerrit]
host=brainscales-r.kip.uni-heidelberg.de
port=29418
project=sctrltp
defaultbranch=master
defaultremote=review
defaultrebase=0
AUTHORS 0 → 100644
SCtrlTP was originally created in 2009 at Electronic Vision(s) Group,
Kirchhoff-Institute for Physics, Ruprecht-Karls-Universität Heidelberg,
Germany.
Here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --
people who have submitted patches, reported bugs, added translations, helped
answer newbie questions, and generally made SCtrlTP that much better:
Moritz Schilling, the main author
Eric Müller
Christian Mauch
This diff is collapsed.
# Slow Control Transport Protocol ('sctrltp')
developed by the
Electronic Vision(s) Group, Kirchhoff-Institute for Physics,
Ruprecht-Karls-Universität Heidelberg, Germany.
This diff is collapsed.
doc/data/full_duplex.png

147 KiB

doc/data/iso-bits-in-flight3-DebugTrue.png

443 KiB

This diff is collapsed.
doc/data/iso-bits-in-flight3.png

329 KiB

This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
doc/data/sweep_sw_ackdelays.png

128 KiB

This diff is collapsed.
doc/data/sweep_ws_ack_vs_throughput2.png

273 KiB

#pragma once
/** \brief Headerfile for Packethandling in SCTP
* Implements some short but necessary funcs to de/encapsulate packetcontents
*/
#include <linux/types.h>
#define MTU 1500
#define MIN_PACKET_SIZE 12
#define ETH_HEADER_SIZE 14 /*in bytes*/
#define ARQ_HEADER_SIZE 12 /*in bytes*/
#define TYPLEN_SIZE 4 /*in bytes*/
/*Constraints of hardware*/
#define MAX_WINSIZ SEDIT
#define MAX_NRFRAMES 65536 /*Maximum number of frames in buffer equals maximum SEQ number+1*/
/* static define checks below */
#if MAX_WINSIZ * 2 >= MAX_NRFRAMES
#error "reduce window size to max. seq number / 2 => ((MAX_NRFRAMES-1)/2)!"
#endif
#define UDP_DATA_PORT 1234
#define UDP_RESET_PORT 0xaffe
#define PTYPE_LOOPBACK 0x0f0f /* loopback data */
#define PTYPE_DUMMYDATA0 0x0000
#define PTYPE_DUMMYDATA1 0x0001
#define PTYPE_ARQSTAT 0x0002
/* FIXME: more PTYPES here... enum unroll maybe? */
#define PDU_SIZE (MTU - ETH_HEADER_SIZE - ARQ_HEADER_SIZE)
#define WORD_SIZE 8 /*64-bit words!*/
#define MAX_PDUWORDS 176 /* could be (PDU_SIZE/8)? */
struct arq_frame {
__u32 ACK; /*Acknowledge to packet with sequenceno = ACK (other direction)*/
__u32 SEQ; /*Sequencenumber*/
__u32 VALID; /*Single valid bit (yes, unpacked to 32 bits ;))*/
__u16 PTYPE; /*Type of packet (called "packet id" in docs)*/
__u16 LEN; /*Length (64-bit words)*/
__u64 COMMANDS[MAX_PDUWORDS];
}__attribute__ ((packed));
void parse_mac (char *in, __u8 *out);
void print_mac (const char *prefix, __u8 *mac);
/**** FUNCS USED BY SCTP LAYER ****/
/*SCTPREQ_* These funtions are used by the sending side of the layer*/
struct arq_frame *sctpreq_get_ptr (struct arq_frame *packet);
void sctpreq_set_header (struct arq_frame *packet, __u16 PTYPE, __u16 LEN);
/*seq valid bit will be set too!!*/
void sctpreq_set_seq (struct arq_frame *packet, __u32 SEQ);
void sctpreq_set_ack (struct arq_frame *packet, __u32 ACK);
/*get length in words*/
__u16 sctpreq_get_len (struct arq_frame *packet);
/*get size in bytes*/
__u32 sctpreq_get_size (struct arq_frame *packet);
__u32 sctpreq_get_ack (struct arq_frame *packet);
__u32 sctpreq_get_seq (struct arq_frame *packet);
__u16 sctpreq_get_typ (struct arq_frame *packet);
void *sctpreq_get_pload (struct arq_frame *packet);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment