UDP - No C

Some time ago, I promised to replace the C code in the udp library of Stanislav (on loper-os.org) with assembly code.
I've finally done so for 64bit intel linux.

This release is divided in two parts, (a) to replace the string to ip address functions with pure ada functions and (b) to replace the C calls with assembly equivalents. For other platforms (b) will need to be changed and the tree forked at that point.

The replacement of the string to ip address functions only works for the most common way to write ip-addresses12.

Next, the actual replacement of the C functions. This adds an extra module to provide Ada versions of some of the linux syscalls. Note that some of the code is a bit non-Ada, I wanted to keep the interfaces to the original C functions intact.

Finally, my signatures for the earlier patches.

  1. As 4 decimal numbers, each separated by a dot; "127.0.0.1". Each decimal number may range from 0 to 255 []
  2. The C-library version of these functions also accept hexadecimal and octal numbers and can handle space characters at the start of each number []

Leave a Reply