Skip to contentSkip to conversation

: Move the IPv4 specific bits from proto.c to ipv4.c

PATCH In review Arnaldo Carvalho de Melo 1 participant 1 message Feb 23, 2006 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 7/7 : Move the IPv4 specific bits from proto.c to ipv4.c

With this patch in place we can break down the complexity by better compartmentalizing the code that is common to ipv6 and ipv4.

Now we have these modules:

Module                  Size  Used by
dccp_diag               1344  0
inet_diag               9448  1 dccp_diag
dccp_ccid3             15856  0
dccp_tfrc_lib          12320  1 dccp_ccid3
dccp_ccid2              5764  0
dccp_ipv4              16996  2
dccp                   48208  4 dccp_diag,dccp_ccid3,dccp_ccid2,dccp_ipv4

dccp_ipv6 still requires dccp_ipv4 due to dccp_ipv6_mapped, that is the next target to work on the "hey, ipv4 is legacy, I only want ipv6 dude!" direction.

---

 net/dccp/Makefile  |    7 +--
 net/dccp/dccp.h    |    6 --
 net/dccp/ipv4.c    |  140 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 net/dccp/options.c |    2 +
 net/dccp/output.c  |    2 +
 net/dccp/proto.c   |  132 ++-----------------------------------------------
 6 files changed, 148 insertions(+), 141 deletions(-)

63d1742ba27197d1678bd5cc05cfa8a1fde3c6d4

net/dccp/Makefile +4 -3
index 7af0569..7696e21 100644
@@ -2,10 +2,11 @@ obj-$(CONFIG_IPV6) += dccp_ipv6.o
 
 dccp_ipv6-y := ipv6.o
 
-obj-$(CONFIG_IP_DCCP) += dccp.o
+obj-$(CONFIG_IP_DCCP) += dccp.o dccp_ipv4.o
 
-dccp-y := ccid.o feat.o input.o ipv4.o minisocks.o options.o output.o proto.o \
-	  timer.o
+dccp-y := ccid.o feat.o input.o minisocks.o options.o output.o proto.o timer.o
+
+dccp_ipv4-y := ipv4.o
 
 dccp-$(CONFIG_IP_DCCP_ACKVEC) += ackvec.o
 
net/dccp/dccp.h +0 -6
index b6ea4cc..46aa481 100644
@@ -59,8 +59,6 @@ extern void dccp_time_wait(struct sock *
 
 #define DCCP_RTO_MAX ((unsigned)(120 * HZ)) /* FIXME: using TCP value */
 
-extern struct proto dccp_prot;
-
 /* is seq1 < seq2 ? */
 static inline int before48(const u64 seq1, const u64 seq2)
 {
@@ -209,10 +207,6 @@ extern struct sock *dccp_create_openreq_
 
 extern int dccp_v4_do_rcv(struct sock *sk, struct sk_buff *skb);
 
-extern void dccp_v4_err(struct sk_buff *skb, u32);
-
-extern int dccp_v4_rcv(struct sk_buff *skb);
-
 extern struct sock *dccp_v4_request_recv_sock(struct sock *sk,
 					      struct sk_buff *skb,
 					      struct request_sock *req,
net/dccp/ipv4.c +134 -5

180 lines not on this page · raw message

net/dccp/options.c +2 -0
index 3ecd319..79d228e 100644
@@ -258,6 +258,8 @@ out_invalid_option:
 	return -1;
 }
 
+EXPORT_SYMBOL_GPL(dccp_parse_options);
+
 static void dccp_encode_value_var(const u32 value, unsigned char *to,
 				  const unsigned int len)
 {
net/dccp/output.c +2 -0
index 6bd21e3..8c83aa5 100644
@@ -526,6 +526,8 @@ void dccp_send_sync(struct sock *sk, con
 	dccp_transmit_skb(sk, skb);
 }
 
+EXPORT_SYMBOL_GPL(dccp_send_sync);
+
 /*
  * Send a DCCP_PKT_CLOSE/CLOSEREQ. The caller locks the socket for us. This
  * cannot be allowed to fail queueing a DCCP_PKT_CLOSE/CLOSEREQ frame under
net/dccp/proto.c +5 -125

205 lines not on this page · raw message

Signature · 1 line
1.2.2.gd27d