#define HOST_BOX_TITLE "Host Name (or IP address)"
#define PORT_BOX_TITLE "Port"
-/*
- * Convenience function: determine whether this binary supports a
- * given backend.
- */
-static int have_backend(int protocol)
-{
- struct backend_list *p = backends;
- for (p = backends; p->name; p++) {
- if (p->protocol == protocol)
- return 1;
- }
- return 0;
-}
-
static void config_host_handler(union control *ctrl, void *dlg,
void *data, int event)
{
hp->port = c;
ctrl_columns(s, 1, 100);
- if (!have_backend(PROT_SSH)) {
+ if (!backend_from_proto(PROT_SSH)) {
ctrl_radiobuttons(s, "Connection type:", NO_SHORTCUT, 3,
HELPCTX(session_hostname),
config_protocolbuttons_handler, P(hp),
{
char *sshlogname, *sshrawlogname;
if ((midsession && protocol == PROT_SSH) ||
- (!midsession && have_backend(PROT_SSH))) {
+ (!midsession && backend_from_proto(PROT_SSH))) {
sshlogname = "SSH packets";
sshrawlogname = "SSH packets and raw data";
} else {
dlg_stdcheckbox_handler, I(offsetof(Config,logflush)));
if ((midsession && protocol == PROT_SSH) ||
- (!midsession && have_backend(PROT_SSH))) {
+ (!midsession && backend_from_proto(PROT_SSH))) {
s = ctrl_getset(b, "Session/Logging", "ssh",
"Options specific to SSH packet logging");
ctrl_checkbox(s, "Omit known password fields", 'k',
* when we're not doing SSH.
*/
- if (have_backend(PROT_SSH) && (!midsession || protocol == PROT_SSH)) {
+ if (backend_from_proto(PROT_SSH) && (!midsession || protocol == PROT_SSH)) {
/*
* The Connection/SSH panel.