From owner-freebsd-hackers Mon Sep 8 21:24:38 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA01088 for hackers-outgoing; Mon, 8 Sep 1997 21:24:38 -0700 (PDT) Received: from hokkshideh.jetcafe.org (hokkshideh.jetcafe.org [207.155.21.4]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA01081; Mon, 8 Sep 1997 21:24:34 -0700 (PDT) Received: from hokkshideh.jetcafe.org (localhost [127.0.0.1]) by hokkshideh.jetcafe.org (8.8.5/8.8.5) with ESMTP id VAA06437; Mon, 8 Sep 1997 21:27:57 -0700 (PDT) Message-Id: <199709090427.VAA06437@hokkshideh.jetcafe.org> X-Mailer: exmh version 2.0delta 6/3/97 To: freebsd-multimedia@freebsd.org, freebsd-hackers@freebsd.org Subject: Multicast socket programming question Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 08 Sep 1997 21:27:57 -0700 From: Dave Hayes Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I really don't know where else to turn to, so I'll see who can answer this one. Consider: fd = socket(AF_INET, SOCK_DGRAM, 0); ... sin.sin_addr.s_addr = ; connect(fd, (struct sockaddr *)&sin, sizeof(sin)); ... c = 0; setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &c, 1); c = 3; setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &c, 1); addr = INADDR_ANY; setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &addr, sizeof(addr)); ... send(fd, (char*)buf, len, 0) The send() call above returns EHOSTUNREACH. UDP multicast datagrams don't connect to a host. Why is this error returned? ------ Dave Hayes - Altadena CA, USA - dave@jetcafe.org >>> The opinions expressed above are entirely my own <<< Freedom Knight of Usenet - http://www.jetcafe.org/~dave/usenet People who dream impossible dreams and strive to achieve them raise man's stature a fraction of an inch in the process, whether they win or lose.