[v5,07/11] unix: Export packets_list and struct packet

Submitted by Kirill Tkhai on June 16, 2016, 1:54 p.m.

Details

Message ID 146608524145.15781.3787807430621835977.stgit@pro
State Rejected
Series "Support for packet's msg_name in receive queue of promiscous DGRAM sockets"
Headers show

Commit Message

Kirill Tkhai June 16, 2016, 1:54 p.m.
v5: New

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 criu/include/sk-queue.h |   11 +++++++++++
 criu/sk-queue.c         |    8 +-------
 2 files changed, 12 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/include/sk-queue.h b/criu/include/sk-queue.h
index 5fd2e01..e3d8dff 100644
--- a/criu/include/sk-queue.h
+++ b/criu/include/sk-queue.h
@@ -1,8 +1,19 @@ 
 #ifndef __CR_SK_QUEUE_H__
 #define __CR_SK_QUEUE_H__
 
+#include "list.h"
+#include "images/sk-packet.pb-c.h"
+
 #define SK_NONAME_SENDER	(~0ULL)
 
+struct sk_packet {
+	struct list_head	list;
+	SkPacketEntry		*entry;
+	off_t			img_off;
+};
+
+extern struct list_head packets_list;
+
 extern struct collect_image_info sk_queues_cinfo;
 extern int dump_sk_queue(int sock_fd, int sock_id, u64 (*get_sender)(const char *, int));
 extern int restore_sk_queue(int fd, unsigned int peer_id);
diff --git a/criu/sk-queue.c b/criu/sk-queue.c
index ded9ca9..8e6556a 100644
--- a/criu/sk-queue.c
+++ b/criu/sk-queue.c
@@ -25,13 +25,7 @@ 
 #include "protobuf.h"
 #include "images/sk-packet.pb-c.h"
 
-struct sk_packet {
-	struct list_head	list;
-	SkPacketEntry		*entry;
-	off_t			img_off;
-};
-
-static LIST_HEAD(packets_list);
+LIST_HEAD(packets_list);
 
 static int collect_one_packet(void *obj, ProtobufCMessage *msg, struct cr_img *img)
 {