From owner-freebsd-net Mon Dec 11 11:17:49 2000 From owner-freebsd-net@FreeBSD.ORG Mon Dec 11 11:17:46 2000 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from web4903.mail.yahoo.com (web4903.mail.yahoo.com [216.115.106.28]) by hub.freebsd.org (Postfix) with SMTP id 4B45737B400 for ; Mon, 11 Dec 2000 11:17:46 -0800 (PST) Message-ID: <20001211191746.25563.qmail@web4903.mail.yahoo.com> Received: from [206.191.16.98] by web4903.mail.yahoo.com; Mon, 11 Dec 2000 11:17:46 PST Date: Mon, 11 Dec 2000 11:17:46 -0800 (PST) From: Michael Yeung Subject: IP aliases and TCP socket To: net@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I have a few of questions and would greatly appreciate for some advise. 1) What I want to do is to create an application that can receive packets destined to two IP addresses from different subnet/network. Essentially have a host sitting at the broader of two networks. I noticed IP aliases restrict the alias IP address to be in the same subnet/network as the primary IP address. Is that a true restriction? If so, any advise on alternative to IP alias? 2) Assume IP aliases works for my needs as stated in question1. When I send a packet out over a TCP socket connection, how can I specify which address to be used as the source IP address (i.e. primary or alias address)? 3) Assume I can use IP aliases technique to receive packet destined to different IP addresses in the same application. If I am to use a TCP socket to retrieve the packet, how can I tell which IP address what the packet destined to (i.e. the primary or alias address)? Would packets for all addresses goes to the same socket or would it be through multiple sockets? 4) Is there direct API calls to the TCP/UDP for connection creation, sending and receiving? Or do I have to go thru the socket interface. Are they tcp_open, udp_open, tcp_send, udp_send, tcp_receive and udp_receive? Where can I find these APIs and their function prototypes? thanx very much, Michael __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message