From owner-freebsd-net@FreeBSD.ORG Wed May 30 16:07:52 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44E0B16A469 for ; Wed, 30 May 2007 16:07:52 +0000 (UTC) (envelope-from senrohan@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id 78DD813C447 for ; Wed, 30 May 2007 16:07:49 +0000 (UTC) (envelope-from senrohan@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so846092anc for ; Wed, 30 May 2007 09:07:47 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type; b=K9APYUkKod17UDuZvca/QhMOklqvz3DFRPZ/BMHyxBG4E8Y5vRzzdChOmu/TpgZP3V0sUMS79ivIFJM0alLHFw8ZIFciPJjHqEE/cW7F1qjtaGHQokJ1wLV68b4/MsxhLHIqxiREWFSnrpOHetxswFpAoxMlCRsjQwLJN2cFvu4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:mime-version:content-type; b=KPkG/2R0nYdYXNAssBMOBs/+O0bKHFvzdlcIvz/tfwMs/t09Qepn6eNvqj/ViYzAGI3nBGuE7w2UXJlthQUStkFU5uxl5fd4Y/3n5y0GoTwHCoXloweBbGgB86tUGMZVdZ7ydNXietkRxgjNcoLjMjaZRUY+yZGH44HPhafi65Y= Received: by 10.100.124.5 with SMTP id w5mr6108363anc.1180537137121; Wed, 30 May 2007 07:58:57 -0700 (PDT) Received: by 10.100.94.8 with HTTP; Wed, 30 May 2007 07:58:56 -0700 (PDT) Message-ID: <8320074d0705300758g47152ca0g89294a3aa41e2687@mail.gmail.com> Date: Wed, 30 May 2007 20:28:56 +0530 From: "Rohan Sen" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: senrohan@gmail.com Subject: Get/Set IP/UDP options from/to UDP datagram socket. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2007 16:07:52 -0000 Hi Everybody, I had a code in Linux using datagram sockets to run over UDP and get/set some ancillary options as well. Following are those options. The socket has been opened using the following call. sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); 1> To send UDP datagram with UDP-Checksum 2> To send UDP datagram without UDP-Checksum 3> To accept UDP datagram with UDP-Checksum 4> To accept UDP datagram without UDP-Checksum 5> Join the socket to the supplied multicast group on the specified interface. 6> Get IP TTL from a received udp datagram. 7> Set IP TTL to a sent udp dataram. 8> Get IP TOS from a received udp datagram. 9> Set IP TOS to a sent udp datagram. 10> Get IP Option from a received udp datagram. 11> Set IP Option to a sent udp datagram. 12> Get all ICMP error message received from IP layer 13> Get source and destination IP address from the received UDP datagram. These options do not seem to be compatible with FreeBSD implementation of sockets. Could you please let me know any reference, book or any material which I can refer to for getting information about how to perform these tasks in FreeBSD 6.2? -- thanks and regards, Rohan Sen