File: README

package info (click to toggle)
lsfcc 0.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 324 kB
  • ctags: 217
  • sloc: ansic: 1,551; yacc: 408; sh: 337; lex: 85; makefile: 55
file content (23 lines) | stat: -rw-r--r-- 1,086 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-*- text -*-

  This is lsfcc, a compiler producing Linux Socket Filter instructions
(which are not-so-incidentally identical to Berkeley Packet Filter
instructions, although BPF, being restricted to super-users only, is
somewhat less useful than LSF to the average user) out of a vaguely
C-like toy language.

  It's currently in usable, if crude, shape. I've only included packet 
formats for tcp, udp, ipv4 and ethernet headers since that's all that
I've tested with. The construction of the header files is fairly
obvious, so feel free to contribute additional ones.

  The compiler itself builds as lsfcc1 - since it doesn't have any
kind of IO directives, this makes it of limited use. Therefore, there
is a script called lsfcc included, which runs cpp over the input
source files. The setup is appropriate for gcc's cpp - it removes the
standard C include paths, and adds a path to the installed lsfcc
headers.

  One thing (amongst many) that it doesn't yet do is autodetect
endianness at build-time and set the appropriate defines. Oh
well. Version 0.1 isn't meant to be easy.