diff --git a/log.c b/log.c index 3591a76..e2b9ee6 100644 --- a/log.c +++ b/log.c @@ -395,6 +395,22 @@ log_content_format_pathspec(const char *logspec, elem = addrbuf; elem_len = strlen(addrbuf); break; + case 'f': + elem = dsthost; + elem_len = strlen(dsthost); + break; + case 'h': + elem = dstport; + elem_len = strlen(dstport); + break; + case 't': + elem = srchost; + elem_len = strlen(srchost); + break; + case 'v': + elem = srcport; + elem_len = strlen(srcport); + break; case 'x': if (exec_path) { char *match = exec_path; diff --git a/main.c b/main.c index e4a0423..366c59f 100644 --- a/main.c +++ b/main.c @@ -154,7 +154,11 @@ main_usage(void) " -F pathspec content log: full data to sep files with %% subst (excl. -L/-S):\n" " %%T - initial connection time as an ISO 8601 UTC timestamp\n" " %%d - destination host and port\n" +" %%f - destination host\n" +" %%h - destination port\n" " %%s - source host and port\n" +" %%t - source host\n" +" %%v - source port\n" #ifdef HAVE_LOCAL_PROCINFO " %%x - base name of local process (requires -i)\n" " %%X - full path to local process (requires -i)\n"