Friday, June 18, 2004

OpenBSD gets its SMP on...

SMP support is now in OpenBSD-current! -- link2

This has been a long time coming... congrats to the OpenBSD team.

Saturday, June 12, 2004

VIM and arrow keys under FreeBSD

For some reason in insert-mode under FreeBSD, VIM doesn't process the arrow keys (up, down, right, left) such that the cursor moves in the expected direction. Instead I was getting [ABCD] every time I hit (up|down|left|right), respectively.

Under OpenBSD, this works fine with the "pcansi" terminal setting (under FreeBSD I am using the "screen" terminal setting, but have tried others to no avail). I suppose I am still a little unclear why this happens on FreeBSD and not on OpenBSD, and how it can be fixed such that they both work. In the mean time, I solved the problem with the help of the VIM Tips portal.

http://www.vim.org/tips/tip.php?tip_id=550

The solution I used is the one suggested by the first comment. Here it is:

1. Create a .vimrc using VIM.
2. Enter the following.

set t_ku=[CTRL-V][UP-ARROW]
set t_kd=[CTRL-V][DOWN-ARROW]
set t_kr=[CTRL-V][RIGHT-ARROW]
set t_kl=[CTRL-V][LEFT-ARROW]

Where [CTRL-V] is the actual control-V keypress, [UP-ARROW] is the up arrow and so on.

3. Save and quit VIM.

When you restart VIM and enter insert-mode ("i"), the arrow keys should move the cursor and not display ASCII characters.

Sunday, June 06, 2004

OpenBSD gains pf source routing...

Cedric Berger has committed changes to the OpenBSD routing subsystem that allows packets to be routed based on their source address. Cool stuff.

Here's the commit message:

CVSROOT: /cvs
Module name: src
Changes by: cedric@cvs.openbsd.org 2004/06/06 10:49:09

Modified files:
sys/conf : files
sys/net : pf.c route.c route.h rtsock.c
sys/netinet : in.h in_pcb.c ip_icmp.c ip_input.c ip_output.c
ip_var.h
Added files:
sys/net : route_src.c

Log message:
extend routing table to be able to match and route packets based on their *source* IP address in addition to their destination address. routing table "destination" now contains a "struct sockaddr_rtin" for IPv4 instead of a "struct sockaddr_in". the routing socket has been extended in a backward-compatible way. todo: PMTU enhancements, IPv6. ok deraadt@ mcbride@