From owner-freebsd-net Fri Sep 29 9:41:55 2000 Delivered-To: freebsd-net@freebsd.org Received: from ece.rice.edu (ece.rice.edu [128.42.4.34]) by hub.freebsd.org (Postfix) with ESMTP id 2194837B61B for ; Fri, 29 Sep 2000 09:40:09 -0700 (PDT) Received: from teddy (teddy.ece.rice.edu [128.42.4.66]) by ece.rice.edu (8.9.0/8.9.0) with SMTP id LAA08676; Fri, 29 Sep 2000 11:40:00 -0500 (CDT) Message-ID: <007a01c02a33$f910f270$42042a80@teddy.ece.rice.edu> From: "Ping Yuan" To: "Ruslan Ermilov" Cc: Subject: Re: IP header. Date: Fri, 29 Sep 2000 11:40:26 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3612.1700 X-MIMEOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >On Fri, Sep 29, 2000 at 11:04:39AM -0500, Ping Yuan wrote: >> Hi, >> >> I am now writing a traffic generator. I want to write something in the IP >> header of every packet before I send it out. Is this possible? If yes, how >> to implement it? If not, is there any other solutions? >> >You can do that by constructing an IP packet with header and sending it to >raw IP socket with IP_HDRINCL socket option set. See ip(4) page for details. > Then, will this IP header be the header of the UDP packet I generated? I mean, if I run tcpdump at the destination host to monitor all the UDP packets, can the bits I set in the ip header be identified? Thanks, -ping > >Cheers, >-- >Ruslan Ermilov Oracle Developer/DBA, >ru@sunbay.com Sunbay Software AG, >ru@FreeBSD.org FreeBSD committer, >+380.652.512.251 Simferopol, Ukraine > >http://www.FreeBSD.org The Power To Serve >http://www.oracle.com Enabling The Information Age > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message