From owner-freebsd-hackers Sun Nov 22 12:51:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA11285 for freebsd-hackers-outgoing; Sun, 22 Nov 1998 12:51:10 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mhs.mhs.rosmail.com (mhs.rosmail.com [195.90.130.88]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id MAA11264 for ; Sun, 22 Nov 1998 12:51:05 -0800 (PST) (envelope-from 0824@08700000.mhs.rosmail.com) Received: from NetWare MHS (SMF70) by mhs.mhs.rosmail.com via Connect2-SMTP 4.32.03; Sun, 22 Nov 1998 23:49:52 +0300 Message-ID: <161BD2D781F0D57E%161BD2D781F0D57E@mhs.mhs.rosmail.com> Date: Sun, 22 Nov 1998 23:41:10 +0300 From: Vladislav SAFRONOV <0824@08700000.mhs.rosmail.com> Organization: Rosnet To: freebsd-hackers@FreeBSD.ORG Subject: Help! Modifying Linux sources to compile under 2.2.7R. X-SMF-Hop-Count: 3 MIME-Version: 1.0 Content-type: text/plain; charset="KOI8-R" Content-transfer-encoding: 7bit X-Mailer: Connect2-SMTP 4.32.03 MHS/SMF to SMTP Gateway Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I want to compile a little c program under Freebsd, but the source warns: "Linux 2.0.33 source, will compile on BSD if you modify the ip header etc." I thought small tcp/ip applications could be copmiled under any Unix :(, Well what should I modify? What's the difference between BSD ip header and Linux ip header? the source: ... struct iphdr *iph=(struct iphdr *)buf; struct udphdr *udp=(struct udphdr *)(buf + 20); ... iph->version=4; iph->ihl=5; iph->tos=0; iph->tot_len=htons(sizeof(buf)); iph->id=htons(1234); iph->frag_off=0; iph->ttl=255; iph->protocol=17; iph->saddr=inet_addr(SIP); iph->daddr=resolve_address(argv[1]); Should I modify udp header as well? Sincerely, Vlad Safronov To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message