[movitz-cvs] CVS update: movitz/losp/lib/net/ethernet.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Sun Aug 14 12:13:29 UTC 2005


Update of /project/movitz/cvsroot/movitz/losp/lib/net
In directory common-lisp.net:/tmp/cvs-serv24190

Modified Files:
	ethernet.lisp 
Log Message:
Add a print-object method for ethernet devices.

Date: Sun Aug 14 14:13:27 2005
Author: ffjeld

Index: movitz/losp/lib/net/ethernet.lisp
diff -u movitz/losp/lib/net/ethernet.lisp:1.8 movitz/losp/lib/net/ethernet.lisp:1.9
--- movitz/losp/lib/net/ethernet.lisp:1.8	Sun May 22 00:37:21 2005
+++ movitz/losp/lib/net/ethernet.lisp	Sun Aug 14 14:13:27 2005
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Tue Sep 17 15:25:31 2002
 ;;;;                
-;;;; $Id: ethernet.lisp,v 1.8 2005/05/21 22:37:21 ffjeld Exp $
+;;;; $Id: ethernet.lisp,v 1.9 2005/08/14 12:13:27 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -189,6 +189,12 @@
     :initarg :promiscuous-p
     :initform nil
     :accessor promiscuous-p)))
+
+(defmethod print-object ((x ethernet-device) s)
+  (print-unreadable-object (x s :type t :identity t)
+    (when (slot-boundp x 'mac-address)
+      (pprint-mac s (mac-address x)))))
+
 
 (defgeneric transmit (device packet &optional start end))
 (defgeneric receive (device &optional packet start))




More information about the Movitz-cvs mailing list