summaryrefslogtreecommitdiffstats
path: root/src/include/cm.h
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2013-04-10 18:10:52 -0400
committerGreg Hudson <ghudson@mit.edu>2013-04-12 11:03:48 -0400
commite4de1f768e818911e6c035ddcbaf0127e0eccb40 (patch)
treebad540f170548f0b5e188e59eda0fb63aa3bbb5a /src/include/cm.h
parent5b48c74845df82b3ae5a2f7cb8e64c521583e373 (diff)
downloadkrb5-e4de1f768e818911e6c035ddcbaf0127e0eccb40.tar.gz
krb5-e4de1f768e818911e6c035ddcbaf0127e0eccb40.tar.xz
krb5-e4de1f768e818911e6c035ddcbaf0127e0eccb40.zip
Trace log with a subset of struct conn_state
In struct conn_state, collect together the fields for the remote address and put them in a substructure. Pass this substructure to trace logging macros instead of the entire conn_state structure, so that trace.c doesn't have to know about the whole structure.
Diffstat (limited to 'src/include/cm.h')
-rw-r--r--src/include/cm.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/include/cm.h b/src/include/cm.h
index d9c23fce1f..837a549b0c 100644
--- a/src/include/cm.h
+++ b/src/include/cm.h
@@ -63,6 +63,12 @@ struct incoming_krb5_message {
unsigned char bufsizebytes[4];
size_t n_left;
};
+struct remote_address {
+ int family;
+ int type;
+ socklen_t len;
+ struct sockaddr_storage saddr;
+};
struct conn_state {
SOCKET fd;
krb5_error_code err;
@@ -70,10 +76,7 @@ struct conn_state {
unsigned int is_udp : 1;
int (*service)(krb5_context context, struct conn_state *,
struct select_state *, int);
- int socktype;
- int family;
- size_t addrlen;
- struct sockaddr_storage addr;
+ struct remote_address addr;
struct {
struct {
sg_buf sgbuf[2];