Merge commit 'dharmatech/master'

release
Slava Pestov 2007-11-13 02:47:01 -05:00
commit 001456e4bb
2 changed files with 44 additions and 0 deletions
extra/unix/linux

View File

@ -0,0 +1,39 @@
USING: alien.syntax ;
IN: unix.linux.route
C-STRUCT: struct-rtentry
{ "ulong" "rt_pad1" }
{ "struct-sockaddr" "rt_dst" }
{ "struct-sockaddr" "rt_gateway" }
{ "struct-sockaddr" "rt_genmask" }
{ "ushort" "rt_flags" }
{ "short" "rt_pad2" }
{ "ulong" "rt_pad3" }
{ "uchar" "rt_tos" }
{ "uchar" "rt_class" }
{ "short" "rt_pad4" }
{ "short" "rt_metric" }
{ "char*" "rt_dev" }
{ "ulong" "rt_mtu" }
{ "ulong" "rt_window" }
{ "ushort" "rt_irtt" } ;
: RTF_UP HEX: 0001 ; ! Route usable.
: RTF_GATEWAY HEX: 0002 ; ! Destination is a gateway.
: RTF_HOST HEX: 0004 ; ! Host entry (net otherwise).
: RTF_REINSTATE HEX: 0008 ; ! Reinstate route after timeout.
: RTF_DYNAMIC HEX: 0010 ; ! Created dyn. (by redirect).
: RTF_MODIFIED HEX: 0020 ; ! Modified dyn. (by redirect).
: RTF_MTU HEX: 0040 ; ! Specific MTU for this route.
: RTF_MSS RTF_MTU ; ! Compatibility.
: RTF_WINDOW HEX: 0080 ; ! Per route window clamping.
: RTF_IRTT HEX: 0100 ; ! Initial round trip time.
: RTF_REJECT HEX: 0200 ; ! Reject route.
: RTF_STATIC HEX: 0400 ; ! Manually injected route.
: RTF_XRESOLVE HEX: 0800 ; ! External resolver.
: RTF_NOFORWARD HEX: 1000 ; ! Forwarding inhibited.
: RTF_THROW HEX: 2000 ; ! Go to next class.
: RTF_NOPMTUDISC HEX: 4000 ; ! Do not send packets with DF.

View File

@ -3,6 +3,11 @@ IN: unix.linux.sockios
! Imported from linux-headers-2.6.15-28-686 on Ubuntu 6.06
! Routing table calls
: SIOCADDRT HEX: 890B ; ! add routing table entry
: SIOCDELRT HEX: 890C ; ! delete routing table entry
: SIOCRTMSG HEX: 890D ; ! call to routing system
! Socket configuration controls
: SIOCGIFNAME HEX: 8910 ; ! get iface name