summaryrefslogtreecommitdiff
path: root/fd.h
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-08-05 15:08:54 +0200
committerPeter Wu <peter@lekensteyn.nl>2015-08-05 16:55:44 +0200
commitca3ef39738daca07466e139a3dc684e4c10df5db (patch)
tree5c0e92747d1125f0206f82263cd4c64b68f6aba2 /fd.h
parentd8267b3d67c517c31db35982409c2f1289cf1936 (diff)
downloadxscope-ca3ef39738daca07466e139a3dc684e4c10df5db.tar.gz
Add support for process ID and namespeerinfo
Adds the process ID and name of the other side. Useful if you have multiple clients. Support for OpenBSD could be added in theory since it has a similar "struct sockpeercred" structure (not sure about process name though). After this change, the process ID and name (when available) will be appended between parentheses: 0.01: Client (pid 23433 xdpyinfo) --> 4 bytes ............REQUEST: ListExtensions 0.01: 332 bytes <-- X11 Server (pid 8290 Xorg) ..............REPLY: ListExtensions names: (29) Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'fd.h')
-rw-r--r--fd.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fd.h b/fd.h
index 59b4889..a3ddbce 100644
--- a/fd.h
+++ b/fd.h
@@ -75,6 +75,7 @@ struct FDDescriptor {
#ifdef USE_XTRANS
XtransConnInfo trans_conn;
#endif
+ char *peer_info;
};
extern struct FDDescriptor *FDD; /* array of FD descriptors */
@@ -103,4 +104,7 @@ extern int MainLoop(void);
extern XtransConnInfo GetXTransConnInfo(FD fd);
#endif
+extern char *ReadPeerInfo(FD fd);
+extern const char *GetPeerInfo(FD fd);
+
#endif /* XSCOPE_FD_H */