Contributed by tbert on from the in-ur-base-scripting-yr-kernel dept.
Given the need for constant feature implementation, and the difficulty normal users have altering their running kernels, the OpenBSD project, after nearly a year of testing and rejecting candidates, is proud to announce the selection of LOLCODE as the in-kernel scripting language.
Example code implementing a basic firewall function is found below:
KAN HAZ INTERNETZ? BTW Filter packets based on source address HOW DUZ I SOURCEFILTER YR MBUF I HAZ A IPHDR ITZ mtod(MBUF, (IPHDR *)) IZ IPHDR->srcip "192.168.1.1"? YARLY BTW Have matched a blacklisted address; drop packet m_freem(MBUF) NOWAI BTW Just pass the packet KTHX IF U SAY SO
One of the factors driving the adoption of LOLCODE was the unparalleled ability for writing interpreters for other languages, meaning that your options for kernel hacking are virtually limitless.
LOLCODE scripts are loaded/unloaded through the new lolctl(8) command, which accesses the new lol(4) device.
This should be currently available in snapshots; as always, widespread testing is key to a quality release!
(Comments are closed)
By Denis (Denis) openbsd@ledeuns.net on
Comments
By sigflup (75.168.38.106) on http://www.theadesilva.com
Comments
By d.c. (212.67.86.138) on
And a good one!
By Anonymous Coward (204.80.187.239) on
Comments
By Noryungi (noryungi) on
ORLY?? :-D
By Anonymous Coward (160.83.30.147) peb.nowarra@bluewin.ch on
By sneaker (sneaker) sneaker@noahpugsley.net on
By Anonymous Coward (186.15.115.46) on
Comments
By better not to say my name (156.35.97.35) on
Indeed, NAT is supported too, but not shown on the firewall example. ;-)