Skip to contentSkip to conversation

Vjhc patch

PATCH Tommy McCabe 2 participants 7 messages Jul 17, 2004 – Jul 19, 2004

lore
Share & tools
lore
#0 lore raw

Gets rid of the function to define a function which causes errors in elksnet/ktcp/vjhc.c.

__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

elkscurr/elksnet/ktcp/vjhc.c renamed from elkscomp/elksnet/ktcp/vjhc.c +6 -12
@@ -113,10 +113,8 @@
 	}
 }
 
-DEFUN
-(int ip_vjhc_compress, (pkt),
-	pkt_ut *pkt
-)
+int ip_vjhc_compress(pkt_ut *pkt)
+
 {
 	iphdr_t *ip_hdr, *oip_hdr;
 	tcphdr_t *tcp_hdr, *otcp_hdr;
@@ -388,10 +386,8 @@
 	return PPP_TYPE_VJHC_COMPR;
 }
 
-DEFUN
-(void ip_vjhc_arr_uncompr, (pkt),
-	pkt_ut *pkt
-)
+void ip_vjhc_arr_uncompr(pkt_ut *pkt)
+
 {
 	rcv_state_ut *state;
 	iphdr_t *ip_hdr;
@@ -430,10 +426,8 @@
 
 }
 
-DEFUN
-(void ip_vjhc_arr_compr, (pkt),
-	pkt_ut *pkt
-)
+void ip_vjhc_arr_compr(pkt_ut *pkt)
+
 {
 	iphdr_t *ip_hdr;
 	tcphdr_t *tcp_hdr;
#1 lore raw
Quoted 2 lines · Tommy McCabe

Gets rid of the function to define a function which causes errors in elksnet/ktcp/vjhc.c.

I guess that there was a reason to use DEFUN(), probably due to support of different function declaration styles, on different compilers. If we choose to remove DEFUN(), I guess that we should remove because we know it is not needed for anything, not because of building errors that can be caused by errors in other places, not by the use of DEFUN().

And, if you get errors when building, I think that is good to show which erros you see. It is not possible to review your fixes, if we don't know what is the real reason for you making those changes.

For example: ktcp builds without problems here, so I am very interested to see why do you get errors on your system, but I don't see any errors here. Could you show us the error messages?

Quoted 41 lines
elkscurr/elksnet/ktcp/vjhc.c renamed from elkscomp/elksnet/ktcp/vjhc.c +6 -12
@@ -113,10 +113,8 @@
 	}
 }
 
-DEFUN
-(int ip_vjhc_compress, (pkt),
-	pkt_ut *pkt
-)
+int ip_vjhc_compress(pkt_ut *pkt)
+
 {
 	iphdr_t *ip_hdr, *oip_hdr;
 	tcphdr_t *tcp_hdr, *otcp_hdr;
@@ -388,10 +386,8 @@
 	return PPP_TYPE_VJHC_COMPR;
 }
 
-DEFUN
-(void ip_vjhc_arr_uncompr, (pkt),
-	pkt_ut *pkt
-)
+void ip_vjhc_arr_uncompr(pkt_ut *pkt)
+
 {
 	rcv_state_ut *state;
 	iphdr_t *ip_hdr;
@@ -430,10 +426,8 @@
 
 }
 
-DEFUN
-(void ip_vjhc_arr_compr, (pkt),
-	pkt_ut *pkt
-)
+void ip_vjhc_arr_compr(pkt_ut *pkt)
+
 {
 	iphdr_t *ip_hdr;
 	tcphdr_t *tcp_hdr;
Signature · 1 line
Eduardo
#2 lore raw

--- Eduardo Pereira Habkost

Quoted 24 lines · <[email protected]> wrote:
Quoted 1 line · Tommy McCabe

Gets rid of the function to define a function

which

Quoted 1 line

causes errors in elksnet/ktcp/vjhc.c.

I guess that there was a reason to use DEFUN(), probably due to support
of different function declaration styles, on different compilers. If we
choose to remove DEFUN(), I guess that we should remove because we know
it is not needed for anything, not because of building errors that can
be caused by errors in other places, not by the use of DEFUN().

And, if you get errors when building, I think that is good to show which
erros you see. It is not possible to review your fixes, if we don't know
what is the real reason for you making those changes.

Quoted 5 lines

For example: ktcp builds without problems here, so I am very interested
to see why do you get errors on your system, but I don't see any errors
here. Could you show us the error messages?

Look at vjhc.h. There are two definitions of DEFUN, depending on some parameter. One defines a function. The other doesn't. For some reason, the parameter got changed over the years, so now anything using DEFUn comes out as gibberish to the compiler.

Quoted 34 lines
Quoted 1 line

--- ./elkscomp/elksnet/ktcp/vjhc.c 2002-07-28

11:45:45.000000000 -0400

Quoted 1 line

+++ ./elkscurr/elksnet/ktcp/vjhc.c 2004-07-17

19:46:40.000000000 -0400

Quoted 30 lines
elkscurr/elksnet/ktcp/vjhc.c renamed from elkscomp/elksnet/ktcp/vjhc.c +4 -8
@@ -113,10 +113,8 @@
 	}
 }
 
-DEFUN
-(int ip_vjhc_compress, (pkt),
-	pkt_ut *pkt
-)
+int ip_vjhc_compress(pkt_ut *pkt)
+
 {
 	iphdr_t *ip_hdr, *oip_hdr;
 	tcphdr_t *tcp_hdr, *otcp_hdr;
@@ -388,10 +386,8 @@
 	return PPP_TYPE_VJHC_COMPR;
 }
 
-DEFUN
-(void ip_vjhc_arr_uncompr, (pkt),
-	pkt_ut *pkt
-)
+void ip_vjhc_arr_uncompr(pkt_ut *pkt)
+
 {
 	rcv_state_ut *state;
 	iphdr_t *ip_hdr;
@@ -430,10 +426,8 @@
 
 }
 
Quoted 16 lines
Quoted 9 lines
elkscurr/elksnet/ktcp/vjhc.c renamed from elkscomp/elksnet/ktcp/vjhc.c +2 -4
-DEFUN
-(void ip_vjhc_arr_compr, (pkt),
-	pkt_ut *pkt
-)
+void ip_vjhc_arr_compr(pkt_ut *pkt)
+
 {
 	iphdr_t *ip_hdr;
 	tcphdr_t *tcp_hdr;
Signature · 4 lines
Eduardo


ATTACHMENT part 2 application/pgp-signature 

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

#3 lore raw

On Mon, Jul 19, 2004 at 10:53:41AM -0700, Tommy McCabe wrote:
<snip>

Quoted 6 lines

Look at vjhc.h. There are two definitions of DEFUN, depending on some parameter. One defines a function. The other doesn't. For some reason, the parameter got changed over the years, so now anything using DEFUn comes out as gibberish to the compiler.

The first one uses ansi function declaration, the other K&R function declarations. DEFUN is used to make vjhc support both.

I can't see where is the error. As I said before: ktcp (including vjhc.c) builds cleanly on my system, and I would like to know which error occurs on your system.

Signature · 1 line
Eduardo
#4 lore raw

--- Eduardo Pereira Habkost

Quoted 19 lines · <[email protected]> wrote:

On Mon, Jul 19, 2004 at 10:53:41AM -0700, Tommy
McCabe wrote:
<snip>

Quoted 2 lines

Look at vjhc.h. There are two definitions of

DEFUN,

Quoted 1 line

depending on some parameter. One defines a

function.

Quoted 1 line

The other doesn't. For some reason, the parameter

got

Quoted 1 line

changed over the years, so now anything using

DEFUn

Quoted 1 line

comes out as gibberish to the compiler.

The first one uses ansi function declaration, the
other K&R function
declarations. DEFUN is used to make vjhc support
both.

Quoted 5 lines

I can't see where is the error. As I said before:
ktcp (including vjhc.c)
builds cleanly on my system, and I would like to
know which error occurs
on your system.

1. What version of ELKS and BCC do you have?
2. Did you turn on SLIP header compression in the ELKS kernel config?

Quoted 5 lines
Signature · 4 lines
Eduardo


ATTACHMENT part 2 application/pgp-signature 

__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

#5 lore raw

Things would be easier if you just show which error is occurring on your system. :)

On Mon, Jul 19, 2004 at 11:51:17AM -0700, Tommy McCabe wrote:
<snip>

Quoted 2 lines

1. What version of ELKS and BCC do you have?

elks from current CVS
bcc from dev86-0.16.16

Quoted 2 lines

2. Did you turn on SLIP header compression in the ELKS kernel config?

No. I can check using CONFIG_CSLIP=y later.

Signature · 1 line
Eduardo
#6 lore raw

--- Eduardo Pereira Habkost

Quoted 11 lines · <[email protected]> wrote:

Things would be easier if you just show which error is occurring on
your system. :)

On Mon, Jul 19, 2004 at 11:51:17AM -0700, Tommy
McCabe wrote:
<snip>

Quoted 2 lines

1. What version of ELKS and BCC do you have?

Quoted 8 lines

elks from current CVS
bcc from dev86-0.16.16

Quoted 1 line

2. Did you turn on SLIP header compression in the

ELKS

Quoted 1 line

kernel config?

No. I can check using CONFIG_CSLIP=y later.

No wonder. vjhc.c is the program that does CSLIP
header compression.

Quoted 5 lines
Signature · 4 lines
Eduardo


ATTACHMENT part 2 application/pgp-signature 

__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/