anchor.diff:  #+(or win32 windows)(defconstant +ip6-multicast-loop+ 11)
   #-(or win32 windows)(defconstant +ip6-multicast-loop+ 19)
   
  -#+(or win32 windows)(defconstant +ip-multicast-if+ 11)
  +#+(or win32 windows)(defconstant +ip-multicast-if+ 9)
   #-(or win32 windows)(defconstant +ip-multicast-if+ 32)
   #+(or win32 windows)(defconstant +ip6-multicast-if+ 9)
   #-(or win32 windows)(defconstant +ip6-multicast-if+ 17)
  
positive.code:   "Set the mutlicast TTL. Value is an integer."
    (set-socket-option-int32 sock +ipproto-ip+ +ip-multicast-ttl+ value))
  
  (defmethod (setf socket-option) (value sock (level (eql :ip)) (option (eql :ip-multicast-if)))
    "Set the local interface to use. VALUE is a 4-octet array indicating the local address."
  
    ;; we convert the address to 32-bit integer in network-byte-order 
    (let ((v (logior (ash (aref value 0) 24)
                     (ash (aref value 1) 16)
                     (ash (aref value 2) 8)
                     (aref value 3))))
      (set-socket-option-uint32 sock +ipproto-ip+ +ip-multicast-if+ v)))
    
  (defmethod (setf socket-option) (value sock (level (eql :ip)) (option (eql :ip-multicast-loop)))
    "Set to use or not use loopback. Value is a boolean"
  
negative.code:           (get-last-error)
            (mem-aref vbuf :int32)))))
  
  (defun get-socket-option-uint32 (sock level option)
    (with-foreign-objects ((vbuf :uint32)
                           (vlen :uint32))
      (setf (mem-aref vlen :uint32) 4)
      (let ((sts (%getsockopt sock 
                              level
                              option
                              vbuf
                              vlen)))
        (if (= sts +socket-error+)
            (get-last-error)
            (mem-aref vbuf :uint32)))))
  
  
  (defmethod socket-option (sock (level (eql :socket)) (option (eql :acceptconn)))
    (get-socket-option-boolean sock +sol-socket+ +so-acceptconn+))
  
  