Commit a915a462 authored by Pavel Emelyanov's avatar Pavel Emelyanov

inet: Move inet sk cpt and rst structs to header

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 65e48c41
#ifndef __CR_SK_INET_H__ #ifndef __CR_SK_INET_H__
#define __CR_SK_INET_H__ #define __CR_SK_INET_H__
struct inet_sk_info;
#define INET_ADDR_LEN 40
struct inet_sk_desc {
struct socket_desc sd;
unsigned int type;
unsigned int proto;
unsigned int src_port;
unsigned int dst_port;
unsigned int state;
unsigned int rqlen;
unsigned int wqlen;
unsigned int src_addr[4];
unsigned int dst_addr[4];
};
struct inet_sk_info {
struct inet_sk_entry ie;
struct file_desc d;
};
int inet_bind(int sk, struct inet_sk_info *); int inet_bind(int sk, struct inet_sk_info *);
int inet_connect(int sk, struct inet_sk_info *); int inet_connect(int sk, struct inet_sk_info *);
#endif #endif
...@@ -15,21 +15,6 @@ ...@@ -15,21 +15,6 @@
#include "sockets.h" #include "sockets.h"
#include "sk-inet.h" #include "sk-inet.h"
#define INET_ADDR_LEN 40
struct inet_sk_desc {
struct socket_desc sd;
unsigned int type;
unsigned int proto;
unsigned int src_port;
unsigned int dst_port;
unsigned int state;
unsigned int rqlen;
unsigned int wqlen;
unsigned int src_addr[4];
unsigned int dst_addr[4];
};
static void show_one_inet(const char *act, const struct inet_sk_desc *sk) static void show_one_inet(const char *act, const struct inet_sk_desc *sk)
{ {
char src_addr[INET_ADDR_LEN] = "<unknown>"; char src_addr[INET_ADDR_LEN] = "<unknown>";
...@@ -175,11 +160,6 @@ int inet_collect_one(struct nlmsghdr *h, int family, int type, int proto) ...@@ -175,11 +160,6 @@ int inet_collect_one(struct nlmsghdr *h, int family, int type, int proto)
return ret; return ret;
} }
struct inet_sk_info {
struct inet_sk_entry ie;
struct file_desc d;
};
static int open_inet_sk(struct file_desc *d); static int open_inet_sk(struct file_desc *d);
static struct file_desc_ops inet_desc_ops = { static struct file_desc_ops inet_desc_ops = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment