[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MacTCP



    Date: Thu, 12 Mar 1992 16:37 CST
    From: shaff@elements.rpal.rockwell.com (Mike Shaff)

    We have stumbled onto a problem which we believe is related to this
    minimum case:

    ? (dotimes (i 8)
       (let ((s (open-tcp-stream "carbon.elements.rpal.rockwell.com" "exec")))
	(close s)))
    NIL
    ? (open-tcp-stream "carbon.elements.rpal.rockwell.com" "exec")
    > Error: Error #-23048
    > While executing: TCP-HOST-ADDRESS
    > Type Command-. to abort.
    See the RestartsI menu item for further choices.

    Any clues?

I have been unable to get the name resolver to work, too.  If you know
the Internet address of you target machine, a workaround is to translate
it into the internal representation by hand:

    (defun dot-string-to-address (dot-string)
      (loop with address = 0
	    for  position from 24 downto 0 by 8
	    for  start = 0 then (1+ end)
	    as   end = (position #\. dot-string :start start)
	    as   byte = (parse-integer dot-string
				       :start start
				       ;; BTW, PARSE-INTEGER bombs in MCL 2.0 p3
				       ;; beta when given an explicit :END
				       ;; argument of NIL.
				       :end (or end (length dot-string)))
	    do   (setf (ldb (byte 8 position) address) byte)
	    finally (return address)))

As in:

    (open-tcp-stream (dot-string-to-address "134.149.2.3") 25)

--David Gadbois