netsec-ethz / scion-apps

Public repository for SCION applications
Apache License 2.0
20 stars 43 forks source link

netcat: add -N/-q, cleanup logging #204

Closed matzf closed 3 years ago

matzf commented 3 years ago

Add functionality -N/-q to shutdown connection after stdin is closed, analogous to the corresponding flags in BSD netcat.

Cleanup logging; use only one logger library, write logs to stderr (not stdout). Simplify the different log levels, keep only debug or error messages, and correspondingly only have a -v flag for for debug logs.

Integrate the netcat/modes/ subpackage into the main netcat package to simplify the structure, and to share helper functions (for logging).

Note: disabled a "NoPanic" check in the integration tests that depends on specific logging messages. This will be fixed in a follow-up.


This change is Reviewable