Commit fb57cd12 authored by Pavel Emelyanov's avatar Pavel Emelyanov

proto: Add comments describing why we need two IDs for unix and inet sockets

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4ff60cd8
......@@ -2,6 +2,14 @@ import "fown.proto";
import "sk-opts.proto";
message inet_sk_entry {
/*
* We have two IDs here -- id and ino. The first one
* is used when restoring socket behind a file descriprot.
* The fdinfo image's id is it. The second one is used
* in sk-inet.c internally, in particular we identify
* a TCP stream to restore into this socket using the
* ino value.
*/
required uint32 id = 1;
required uint32 ino = 2;
required uint32 family = 3;
......
......@@ -2,6 +2,17 @@ import "fown.proto";
import "sk-opts.proto";
message unix_sk_entry {
/*
* Few words about why we need both -- id and ino.
*
* The former one is used to link file descriptor from
* fdinfo image with the unix_sk_entry that should be
* opened under it.
*
* The latter one ties together unix peers -- the peer
* member on this structure is the ino one of its peer
* and simetimes vise-versa.
*/
required uint32 id = 1;
required uint32 ino = 2;
required uint32 type = 3;
......
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