* Re: ip.h & tcp.h
@ 2002-04-08 2:14 Wu Yongwei
2002-04-08 8:03 ` Christopher Faylor
0 siblings, 1 reply; 11+ messages in thread
From: Wu Yongwei @ 2002-04-08 2:14 UTC (permalink / raw)
To: cygwin
Christopher Faylor wrote:
>On Mon, Apr 08, 2002 at 10:00:58AM +0800, Wu Yongwei wrote:
>>Thank you for all the responses, even the one telling me not to SHOUT. A
>>message is better than nothing, and I shouted because it seemed no one
>>noticed my message.
>>
>>But I am not here to argue. I ask. Should I simply supply the ip.h, tcp.h,
>>and udp.h here? I did not because I am not sure about the licence issue.
>>And I asked first.
>
>You DO NOT "simply supply" anything. I suggested that you supply a
>patch, as I have done repeatedly in the past. I gave you the URL that
>explains what you need to do.
Yes, I will if I do anything at all. I have already mentioned that the
current ip.h and tcp.h are empty. But they are there to overwrite mine.
>
>If you are going to be copying directly from some other file, then of
>course there are licensing issues.
I asked whether there are any policies on adopting other header files (open
source), but no one answered. By the way, Linux includes the BSD header too.
>
>You should just adapt whatever you need from the Single UNIX
>Specification.
Sorry but SUSv2 says nothing about the struct definitions. Or at least I
cannot get any meaningful search results.
>
>I'll leave it to the collective wisdom of this mailing list to help you
>on your painful road of enlightenment with regard to submitting a patch.
>Your last effort was a good first try but you still have a ways to go.
I know what a patch is. But I would like to ask, plan, and do. It is really
painful to learn to first do and then ask.
>
>cgf
Wu Yongwei
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ip.h & tcp.h
2002-04-08 2:14 ip.h & tcp.h Wu Yongwei
@ 2002-04-08 8:03 ` Christopher Faylor
0 siblings, 0 replies; 11+ messages in thread
From: Christopher Faylor @ 2002-04-08 8:03 UTC (permalink / raw)
To: cygwin
On Mon, Apr 08, 2002 at 05:14:27PM +0800, Wu Yongwei wrote:
>>You should just adapt whatever you need from the Single UNIX
>>Specification.
>
>Sorry but SUSv2 says nothing about the struct definitions. Or at least
>I cannot get any meaningful search results.
Ok. In that case we'll have to make do with the Berkeley code. Just
include the license info in your patch.
>>I'll leave it to the collective wisdom of this mailing list to help you
>>on your painful road of enlightenment with regard to submitting a
>>patch. Your last effort was a good first try but you still have a ways
>>to go.
>
>I know what a patch is. But I would like to ask, plan, and do. It is
>really painful to learn to first do and then ask.
I guess it depends on where you want to place the pain. If you'd
submitted a patch and mentioned that you'd searched the SUSv2 without
finding anything, the patch probably would have gone in already. You
have mentioned several times that you've incorporated some changes in
your local tree so the act of doing a 'cvs diff -up' should not cause
too much pain. That just leaves writing a Changelog which you'd have to
do regardless.
You could have sent email to cygwin-patches with the patch and the
ChangeLog and your change would have been in by now, after (from
experience) two or three mail messages telling you that your ChangeLog
was incorrect.
What I'm trying to do is cut down on 27 messages saying
"Why doesn't cygwin have this functionality???"
"It seems to me that this should work!!!"
"Did I mention that it works for me???"
when all that is required is a patch and a ChangeLog.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ip.h & tcp.h
@ 2002-04-08 18:58 Wu Yongwei
0 siblings, 0 replies; 11+ messages in thread
From: Wu Yongwei @ 2002-04-08 18:58 UTC (permalink / raw)
To: cygwin, cygwin-patches
[-- Attachment #1: Type: text/plain, Size: 1202 bytes --]
ChangeLog: BSD-style header files ip.h, tcp.h, and udp.h are added, which
include definitions for IP, TCP, and UDP packet header structures.
Positions:
* ip.h.diff is against /usr/include/netinet/ip.h
* tcp.h.diff is against /usr/include/netinet/tcp.h
* udp.h should be added to /usr/include/netinet
* ip.h in /usr/include/cygwin contains only a comment and I suppose it could
be dropped.
BSD licence:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
Best regards,
Wu Yongwei
[-- Attachment #2: ip.h.diff --]
[-- Type: application/octet-stream, Size: 8578 bytes --]
--- ip.h.old Tue Apr 9 09:34:37 2002
+++ ip.h Wed Dec 19 13:57:00 2001
@@ -1,16 +1,197 @@
-/* netinet/ip.h
-
- Copyright 1998, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ip.h 8.2 (Berkeley) 6/1/94
+ * $FreeBSD: src/sys/netinet/ip.h,v 1.17 1999/12/22 19:13:20 shin Exp $
+ */
#ifndef _NETINET_IP_H
#define _NETINET_IP_H
-#include <cygwin/ip.h>
+/* Added by Wu Yongwei */
+#ifndef LITTLE_ENDIAN
+#define LITTLE_ENDIAN 1234
+#define BIG_ENDIAN 4321
+#endif
+#ifndef BYTE_ORDER
+#define BYTE_ORDER LITTLE_ENDIAN
+#endif
+
+/*
+ * Definitions for internet protocol version 4.
+ * Per RFC 791, September 1981.
+ */
+#define IPVERSION 4
+
+/*
+ * Structure of an internet header, naked of options.
+ */
+struct ip {
+#ifdef _IP_VHL
+ u_char ip_vhl; /* version << 4 | header length >> 2 */
+#else
+#if BYTE_ORDER == LITTLE_ENDIAN
+ u_int ip_hl:4, /* header length */
+ ip_v:4; /* version */
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+ u_int ip_v:4, /* version */
+ ip_hl:4; /* header length */
+#endif
+#endif /* not _IP_VHL */
+ u_char ip_tos; /* type of service */
+ u_short ip_len; /* total length */
+ u_short ip_id; /* identification */
+ u_short ip_off; /* fragment offset field */
+#define IP_RF 0x8000 /* reserved fragment flag */
+#define IP_DF 0x4000 /* dont fragment flag */
+#define IP_MF 0x2000 /* more fragments flag */
+#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
+ u_char ip_ttl; /* time to live */
+ u_char ip_p; /* protocol */
+ u_short ip_sum; /* checksum */
+ struct in_addr ip_src,ip_dst; /* source and dest address */
+};
+
+#ifdef _IP_VHL
+#define IP_MAKE_VHL(v, hl) ((v) << 4 | (hl))
+#define IP_VHL_HL(vhl) ((vhl) & 0x0f)
+#define IP_VHL_V(vhl) ((vhl) >> 4)
+#define IP_VHL_BORING 0x45
+#endif
+
+#define IP_MAXPACKET 65535 /* maximum packet size */
+
+/*
+ * Definitions for IP type of service (ip_tos)
+ */
+#define IPTOS_LOWDELAY 0x10
+#define IPTOS_THROUGHPUT 0x08
+#define IPTOS_RELIABILITY 0x04
+#define IPTOS_MINCOST 0x02
+/* ECN bits proposed by Sally Floyd */
+#define IPTOS_CE 0x01 /* congestion experienced */
+#define IPTOS_ECT 0x02 /* ECN-capable transport */
+
+
+/*
+ * Definitions for IP precedence (also in ip_tos) (hopefully unused)
+ */
+#define IPTOS_PREC_NETCONTROL 0xe0
+#define IPTOS_PREC_INTERNETCONTROL 0xc0
+#define IPTOS_PREC_CRITIC_ECP 0xa0
+#define IPTOS_PREC_FLASHOVERRIDE 0x80
+#define IPTOS_PREC_FLASH 0x60
+#define IPTOS_PREC_IMMEDIATE 0x40
+#define IPTOS_PREC_PRIORITY 0x20
+#define IPTOS_PREC_ROUTINE 0x00
+
+/*
+ * Definitions for options.
+ */
+#define IPOPT_COPIED(o) ((o)&0x80)
+#define IPOPT_CLASS(o) ((o)&0x60)
+#define IPOPT_NUMBER(o) ((o)&0x1f)
+
+#define IPOPT_CONTROL 0x00
+#define IPOPT_RESERVED1 0x20
+#define IPOPT_DEBMEAS 0x40
+#define IPOPT_RESERVED2 0x60
+
+#define IPOPT_EOL 0 /* end of option list */
+#define IPOPT_NOP 1 /* no operation */
+
+#define IPOPT_RR 7 /* record packet route */
+#define IPOPT_TS 68 /* timestamp */
+#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
+#define IPOPT_LSRR 131 /* loose source route */
+#define IPOPT_SATID 136 /* satnet id */
+#define IPOPT_SSRR 137 /* strict source route */
+#define IPOPT_RA 148 /* router alert */
+
+/*
+ * Offsets to fields in options other than EOL and NOP.
+ */
+#define IPOPT_OPTVAL 0 /* option ID */
+#define IPOPT_OLEN 1 /* option length */
+#define IPOPT_OFFSET 2 /* offset within option */
+#define IPOPT_MINOFF 4 /* min value of above */
+
+/*
+ * Time stamp option structure.
+ */
+struct ip_timestamp {
+ u_char ipt_code; /* IPOPT_TS */
+ u_char ipt_len; /* size of structure (variable) */
+ u_char ipt_ptr; /* index of current entry */
+#if BYTE_ORDER == LITTLE_ENDIAN
+ u_int ipt_flg:4, /* flags, see below */
+ ipt_oflw:4; /* overflow counter */
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+ u_int ipt_oflw:4, /* overflow counter */
+ ipt_flg:4; /* flags, see below */
+#endif
+ union ipt_timestamp {
+ n_long ipt_time[1];
+ struct ipt_ta {
+ struct in_addr ipt_addr;
+ n_long ipt_time;
+ } ipt_ta[1];
+ } ipt_timestamp;
+};
+
+/* flag bits for ipt_flg */
+#define IPOPT_TS_TSONLY 0 /* timestamps only */
+#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
+#define IPOPT_TS_PRESPEC 3 /* specified modules only */
+
+/* bits for security (not byte swapped) */
+#define IPOPT_SECUR_UNCLASS 0x0000
+#define IPOPT_SECUR_CONFID 0xf135
+#define IPOPT_SECUR_EFTO 0x789a
+#define IPOPT_SECUR_MMMM 0xbc4d
+#define IPOPT_SECUR_RESTR 0xaf13
+#define IPOPT_SECUR_SECRET 0xd788
+#define IPOPT_SECUR_TOPSECRET 0x6bc5
+
+/*
+ * Internet implementation parameters.
+ */
+#define MAXTTL 255 /* maximum time to live (seconds) */
+#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
+#define IPFRAGTTL 60 /* time to live for frags, slowhz */
+#define IPTTLDEC 1 /* subtracted when forwarding */
+
+#define IP_MSS 576 /* default maximum segment size */
-#endif /* _NETINET_IP_H */
+#endif
[-- Attachment #3: tcp.h.diff --]
[-- Type: application/octet-stream, Size: 6358 bytes --]
--- tcp.h.old Tue Apr 9 09:39:30 2002
+++ tcp.h Wed Dec 19 13:55:59 2001
@@ -1,16 +1,142 @@
-/* netinet/tcp.h
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)tcp.h 8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/tcp.h,v 1.13 2000/01/09 19:17:25 shin Exp $
+ */
- Copyright 2000, 2001 Red Hat, Inc.
+#ifndef _NETINET_TCP_H
+#define _NETINET_TCP_H
-This file is part of Cygwin.
+/* Added by Wu Yongwei */
+#ifndef LITTLE_ENDIAN
+#define LITTLE_ENDIAN 1234
+#define BIG_ENDIAN 4321
+#endif
+#ifndef BYTE_ORDER
+#define BYTE_ORDER LITTLE_ENDIAN
+#endif
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
+typedef u_int32_t tcp_seq;
+typedef u_int32_t tcp_cc; /* connection count per rfc1644 */
-#ifndef _NETINET_TCP_H
-#define _NETINET_TCP_H
+#define tcp6_seq tcp_seq /* for KAME src sync over BSD*'s */
+#define tcp6hdr tcphdr /* for KAME src sync over BSD*'s */
+
+/*
+ * TCP header.
+ * Per RFC 793, September, 1981.
+ */
+struct tcphdr {
+ u_short th_sport; /* source port */
+ u_short th_dport; /* destination port */
+ tcp_seq th_seq; /* sequence number */
+ tcp_seq th_ack; /* acknowledgement number */
+#if BYTE_ORDER == LITTLE_ENDIAN
+ u_int th_x2:4, /* (unused) */
+ th_off:4; /* data offset */
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+ u_int th_off:4, /* data offset */
+ th_x2:4; /* (unused) */
+#endif
+ u_char th_flags;
+#define TH_FIN 0x01
+#define TH_SYN 0x02
+#define TH_RST 0x04
+#define TH_PUSH 0x08
+#define TH_ACK 0x10
+#define TH_URG 0x20
+#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
+
+ u_short th_win; /* window */
+ u_short th_sum; /* checksum */
+ u_short th_urp; /* urgent pointer */
+};
+
+#define TCPOPT_EOL 0
+#define TCPOPT_NOP 1
+#define TCPOPT_MAXSEG 2
+#define TCPOLEN_MAXSEG 4
+#define TCPOPT_WINDOW 3
+#define TCPOLEN_WINDOW 3
+#define TCPOPT_SACK_PERMITTED 4 /* Experimental */
+#define TCPOLEN_SACK_PERMITTED 2
+#define TCPOPT_SACK 5 /* Experimental */
+#define TCPOPT_TIMESTAMP 8
+#define TCPOLEN_TIMESTAMP 10
+#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
+#define TCPOPT_TSTAMP_HDR \
+ (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
+
+#define TCPOPT_CC 11 /* CC options: RFC-1644 */
+#define TCPOPT_CCNEW 12
+#define TCPOPT_CCECHO 13
+#define TCPOLEN_CC 6
+#define TCPOLEN_CC_APPA (TCPOLEN_CC+2)
+#define TCPOPT_CC_HDR(ccopt) \
+ (TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
+
+/*
+ * Default maximum segment size for TCP.
+ * With an IP MSS of 576, this is 536,
+ * but 512 is probably more convenient.
+ * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
+ */
+#define TCP_MSS 512
+
+/*
+ * Default maximum segment size for TCP6.
+ * With an IP6 MSS of 1280, this is 1220,
+ * but 1024 is probably more convenient. (xxx kazu in doubt)
+ * This should be defined as MIN(1024, IP6_MSS - sizeof (struct tcpip6hdr))
+ */
+#define TCP6_MSS 1024
+
+#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */
+#define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */
+
+#define TCP_MAX_WINSHIFT 14 /* maximum window shift */
+
+#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */
+#define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
+ /* max space left for options */
-/* Maybe add some definitions, someday */
+/*
+ * User-settable options (used with setsockopt).
+ */
+#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
+#define TCP_MAXSEG 0x02 /* set maximum segment size */
+#define TCP_NOPUSH 0x04 /* don't push last block of write */
+#define TCP_NOOPT 0x08 /* don't use TCP options */
#endif
[-- Attachment #4: udp.h --]
[-- Type: application/octet-stream, Size: 2296 bytes --]
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)udp.h 8.1 (Berkeley) 6/10/93
* $FreeBSD: src/sys/netinet/udp.h,v 1.7 1999/08/28 00:49:34 peter Exp $
*/
#ifndef _NETINET_UDP_H
#define _NETINET_UDP_H
/*
* Udp protocol header.
* Per RFC 768, September, 1981.
*/
struct udphdr {
u_short uh_sport; /* source port */
u_short uh_dport; /* destination port */
u_short uh_ulen; /* udp length */
u_short uh_sum; /* udp checksum */
};
#endif
[-- Attachment #5: Type: text/plain, Size: 214 bytes --]
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ip.h & tcp.h
2002-04-07 19:01 Wu Yongwei
@ 2002-04-07 19:16 ` Christopher Faylor
0 siblings, 0 replies; 11+ messages in thread
From: Christopher Faylor @ 2002-04-07 19:16 UTC (permalink / raw)
To: cygwin
On Mon, Apr 08, 2002 at 10:00:58AM +0800, Wu Yongwei wrote:
>Thank you for all the responses, even the one telling me not to SHOUT. A
>message is better than nothing, and I shouted because it seemed no one
>noticed my message.
>
>But I am not here to argue. I ask. Should I simply supply the ip.h, tcp.h,
>and udp.h here? I did not because I am not sure about the licence issue. And
>I asked first.
You DO NOT "simply supply" anything. I suggested that you supply a
patch, as I have done repeatedly in the past. I gave you the URL that
explains what you need to do.
If you are going to be copying directly from some other file, then of
course there are licensing issues.
You should just adapt whatever you need from the Single UNIX
Specification.
I'll leave it to the collective wisdom of this mailing list to help you
on your painful road of enlightenment with regard to submitting a patch.
Your last effort was a good first try but you still have a ways to go.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ip.h & tcp.h
@ 2002-04-07 19:01 Wu Yongwei
2002-04-07 19:16 ` Christopher Faylor
0 siblings, 1 reply; 11+ messages in thread
From: Wu Yongwei @ 2002-04-07 19:01 UTC (permalink / raw)
To: cygwin
Thank you for all the responses, even the one telling me not to SHOUT. A
message is better than nothing, and I shouted because it seemed no one
noticed my message.
But I am not here to argue. I ask. Should I simply supply the ip.h, tcp.h,
and udp.h here? I did not because I am not sure about the licence issue. And
I asked first.
Maybe I should state again that using the BSD files I successfully built my
Linux project on Windows. It uses BSD-style TCP and UDP struct definition.
Best regards,
Wu Yongwei
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ip.h & tcp.h
2002-04-05 6:57 Robinow, David
@ 2002-04-05 10:35 ` Jason Tishler
0 siblings, 0 replies; 11+ messages in thread
From: Jason Tishler @ 2002-04-05 10:35 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
On Fri, Apr 05, 2002 at 09:57:31AM -0500, Robinow, David wrote:
> Well, I'm somewhat to blame for this situation.
> See http://sources.redhat.com/ml/cygwin/2000-09/msg00010.html
>
> Is the suggestion of "include <winsock.h>" reasonable?
No. IIRC, this caused problems. See the following:
http://cygwin.com/ml/cygwin-cvs/2000-q4/msg00016.html
Jason
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: ip.h & tcp.h
@ 2002-04-05 6:57 Robinow, David
2002-04-05 10:35 ` Jason Tishler
0 siblings, 1 reply; 11+ messages in thread
From: Robinow, David @ 2002-04-05 6:57 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
Well, I'm somewhat to blame for this situation.
See http://sources.redhat.com/ml/cygwin/2000-09/msg00010.html
Is the suggestion of "include <winsock.h>" reasonable?
> -----Original Message-----
> From: Christopher Faylor [mailto:cygwin@cygwin.com]
> Sent: Friday, April 05, 2002 8:50 AM
> To: cygwin@cygwin.com
> Subject: Re: ip.h & tcp.h
>
>
> On Fri, Apr 05, 2002 at 04:34:42PM +0800, Wu Yongwei wrote:
> >Um, no one willing to answer?
> >
> >OK, I am changing my request now. CAN CYGWIN DROP IP.H AND TCP.H IN
> >DISTRIBUTION FOR NOW?
>
> http://www.cygwin.com/ml/cygwin/2002-03/msg01461.html
>
> http://cygwin.com/contrib.html
>
> cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ip.h & tcp.h
2002-04-05 0:35 Wu Yongwei
2002-04-05 1:33 ` Corinna Vinschen
@ 2002-04-05 5:50 ` Christopher Faylor
1 sibling, 0 replies; 11+ messages in thread
From: Christopher Faylor @ 2002-04-05 5:50 UTC (permalink / raw)
To: cygwin
On Fri, Apr 05, 2002 at 04:34:42PM +0800, Wu Yongwei wrote:
>Um, no one willing to answer?
>
>OK, I am changing my request now. CAN CYGWIN DROP IP.H AND TCP.H IN
>DISTRIBUTION FOR NOW?
http://www.cygwin.com/ml/cygwin/2002-03/msg01461.html
http://cygwin.com/contrib.html
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ip.h & tcp.h
2002-04-05 0:35 Wu Yongwei
@ 2002-04-05 1:33 ` Corinna Vinschen
2002-04-05 5:50 ` Christopher Faylor
1 sibling, 0 replies; 11+ messages in thread
From: Corinna Vinschen @ 2002-04-05 1:33 UTC (permalink / raw)
To: cygwin
On Fri, Apr 05, 2002 at 04:34:42PM +0800, Wu Yongwei wrote:
> Um, no one willing to answer?
>
> OK, I am changing my request now. CAN CYGWIN DROP IP.H AND TCP.H IN
> DISTRIBUTION FOR NOW?
No reason to shout.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ip.h & tcp.h
@ 2002-04-05 0:35 Wu Yongwei
2002-04-05 1:33 ` Corinna Vinschen
2002-04-05 5:50 ` Christopher Faylor
0 siblings, 2 replies; 11+ messages in thread
From: Wu Yongwei @ 2002-04-05 0:35 UTC (permalink / raw)
To: cygwin
Um, no one willing to answer?
OK, I am changing my request now. CAN CYGWIN DROP IP.H AND TCP.H IN
DISTRIBUTION FOR NOW?
Reasons:
1. They are empty and so they do not help. They may even frustrate users
because it is more difficult to find the cause from a lot of parse errors
than a simple "cannot find xxx.h" or so.
2. They harms. I have put new ip.h and tcp.h under /usr/include/netinet to
ease compilation of *NIX code. But they will be overwritten sometimes by
updating my Cygwin installation.
Best regards,
Wu Yongwei
----- Original Message -----
From: "Wu Yongwei" <adah@netstd.com>
To: <cygwin@cygwin.com>
Sent: Wednesday, April 03, 2002 9:59 AM
Subject: ip.h & tcp.h
> I noticed that these two header files in /usr/include/netinet is really
> missing. I have been using the ones from FreeBSD and that fit very well. I
> just need to add the following lines to the beginning of ip.h:
>
> /* Added by Wu Yongwei */
> #ifndef LITTLE_ENDIAN
> #define LITTLE_ENDIAN 1234
> #define BIG_ENDIAN 4321
> #endif
> #ifndef BYTE_ORDER
> #define BYTE_ORDER LITTLE_ENDIAN
> #endif
>
> Could Cygwin just use the modified FreeBSD files, or are there any other
> considerations? I don't think there are any licence issues -- it only asks
> for an acknowledgement in ads. (BTW, udp.h is good, too.)
>
> Best regards,
>
> Wu Yongwei
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* ip.h & tcp.h
@ 2002-04-02 17:59 Wu Yongwei
0 siblings, 0 replies; 11+ messages in thread
From: Wu Yongwei @ 2002-04-02 17:59 UTC (permalink / raw)
To: cygwin
I noticed that these two header files in /usr/include/netinet is really
missing. I have been using the ones from FreeBSD and that fit very well. I
just need to add the following lines to the beginning of ip.h:
/* Added by Wu Yongwei */
#ifndef LITTLE_ENDIAN
#define LITTLE_ENDIAN 1234
#define BIG_ENDIAN 4321
#endif
#ifndef BYTE_ORDER
#define BYTE_ORDER LITTLE_ENDIAN
#endif
Could Cygwin just use the modified FreeBSD files, or are there any other
considerations? I don't think there are any licence issues -- it only asks
for an acknowledgement in ads. (BTW, udp.h is good, too.)
Best regards,
Wu Yongwei
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2002-04-09 1:58 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08 2:14 ip.h & tcp.h Wu Yongwei
2002-04-08 8:03 ` Christopher Faylor
-- strict thread matches above, loose matches on Subject: below --
2002-04-08 18:58 Wu Yongwei
2002-04-07 19:01 Wu Yongwei
2002-04-07 19:16 ` Christopher Faylor
2002-04-05 6:57 Robinow, David
2002-04-05 10:35 ` Jason Tishler
2002-04-05 0:35 Wu Yongwei
2002-04-05 1:33 ` Corinna Vinschen
2002-04-05 5:50 ` Christopher Faylor
2002-04-02 17:59 Wu Yongwei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).