nash e. foster wrote:
On Thu, Dec 14, 2006 at 04:37:40PM -0800, Stephen Westfold wrote:
  
debugger invoked on a SB-BSD-SOCKETS:UNKNOWN-PROTOCOL: Protocol not 
found: "tcp"
This error occurs while executing
(SB-BSD-SOCKETS:GET-PROTOCOL-BY-NAME "tcp")
    

It actually appears that the getprotobyname function isn't defined by
the win32 sockets back-end. It appeats to be provided by Winsock2, so it
could be a bug. Not being an sbcl developer, I can't say for sure and I
don't have a Windows machine to test for you.

Until there's a patch to fix it, perhaps something like this would work?

  (let ((proto-db '(("ip" . 0) ("icmp" . 1) ("tcp" . 6) ("udp" . 17))))
    (defun get-proto-by-name (proto)
      (declare (string proto))
      (cdr (assoc (string-downcase proto) proto-db :test #'equal))))


Good luck,

  -nash

  
Thanks for the suggestion, but doing this doesn't get me much further. I get the error:

debugger invoked on a SB-BSD-SOCKETS:SOCKET-ERROR:
  Socket error in "socket": 9 (Bad file descriptor)

with stack

0: (SB-BSD-SOCKETS:SOCKET-ERROR "socket")
1: (SB-BSD-SOCKETS:SOCKET-ERROR "socket")
2: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AFTER
     ("#<...>" . "#<...>")) #<error printing object>)
3: ((LAMBDA ()))
4: ((LAMBDA (SWANK-BACKEND::HOST SWANK-BACKEND::PORT)) "127.0.0.1" 0)
5: (SWANK::SETUP-SERVER
    #<unavailable argument>
    #<CLOSURE (LAMBDA #) {E611B5D}>
    NIL
    NIL
    :ISO-LATIN-1-UNIX)
6: (SWANK:START-SERVER
    #<unavailable argument>
    :STYLE
    #<unavailable argument>
    :DONT-CLOSE
    #<unavailable argument>
    :EXTERNAL-FORMAT
    #<unavailable argument>)

stephen