Update of /project/movitz/cvsroot/movitz/losp/lib/net In directory common-lisp.net:/tmp/cvs-serv4654
Modified Files: ip4.lisp Log Message: *** empty log message *** Date: Thu Oct 21 22:52:11 2004 Author: ffjeld
Index: movitz/losp/lib/net/ip4.lisp diff -u movitz/losp/lib/net/ip4.lisp:1.6 movitz/losp/lib/net/ip4.lisp:1.7 --- movitz/losp/lib/net/ip4.lisp:1.6 Thu Apr 1 19:29:44 2004 +++ movitz/losp/lib/net/ip4.lisp Thu Oct 21 22:52:11 2004 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Wed Apr 30 13:52:57 2003 ;;;; -;;;; $Id: ip4.lisp,v 1.6 2004/04/01 17:29:44 ffjeld Exp $ +;;;; $Id: ip4.lisp,v 1.7 2004/10/21 20:52:11 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -252,10 +252,27 @@
;;;; UDP
+(defun udp-src-port (packet &optional (start 34)) + (bvref-u16 packet start 0)) + +(defun (setf udp-src-port) (value packet &optional (start 34)) + (setf (bvref-u16 packet start 0) value)) + +(defun udp-dst-port (packet &optional (start 34)) + (bvref-u16 packet start 2)) + +(defun udp-length (packet &optional (start 34)) + (bvref-u16 packet start 4)) + +(defun udp-checksum (packet &optional (start 34)) + (bvref-u16 packet start 6)) + + (defmethod udp-input ((stack ip4-stack) packet ip-start udp-start) (warn "Got UDP packet of length ~D from ~@v/ip4:pprint-ip4/." (- (length packet) udp-start) ip-start packet)) +
;;;; TCP