~mdw
/
fwd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename entire project from `fw' to `fwd'.
[fwd]
/
socket.c
diff --git
a/socket.c
b/socket.c
index
c92faad
..
f8f8dec
100644
(file)
--- a/
socket.c
+++ b/
socket.c
@@
-1,67
+1,30
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: socket.c,v 1.12 2004/04/08 01:36:25 mdw Exp $
- *
* Socket source and target definitions
*
* (c) 1999 Straylight/Edgeware
*/
* Socket source and target definitions
*
* (c) 1999 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
*
- * This file is part of the `fw' port forwarder.
+ * This file is part of the `fw
d
' port forwarder.
*
*
- * `fw' is free software; you can redistribute it and/or modify
+ * `fw
d
' is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
- * `fw' is distributed in the hope that it will be useful,
+ *
+ * `fw
d
' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
+ * along with `fw
d
'; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*----- Header files ------------------------------------------------------*/
-
-#include "config.h"
-
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <mLib/alloc.h>
-#include <mLib/conn.h>
-#include <mLib/dstr.h>
-#include <mLib/fdflags.h>
-#include <mLib/sel.h>
-#include <mLib/sub.h>
-
-#include "addr.h"
-#include "conf.h"
-#include "endpt.h"
-#include "fw.h"
-#include "scan.h"
-#include "socket.h"
-#include "target.h"
-
-#include "inet.h"
-#include "un.h"
+#include "fwd.h"
/*----- Data structures ---------------------------------------------------*/
/*----- Data structures ---------------------------------------------------*/
@@
-372,9
+335,10
@@
static source *ssource_read(scanner *sc)
ss->a = getaddr(sc, ADDR_SRC);
if (ss->a->ops->initsrcopts)
ss->ao = ss->a->ops->initsrcopts();
ss->a = getaddr(sc, ADDR_SRC);
if (ss->a->ops->initsrcopts)
ss->ao = ss->a->ops->initsrcopts();
- else
+ else
{
ss->ao = CREATE(addr_opts);
ss->ao = CREATE(addr_opts);
- *ss->ao = gsao;
+ *ss->ao = gsao;
+ }
ss->o = ssgo;
return (&ss->s);
}
ss->o = ssgo;
return (&ss->s);
}
@@
-633,9
+597,10
@@
static target *starget_read(scanner *sc)
st->a = getaddr(sc, ADDR_DEST);
if (st->a->ops->inittargopts)
st->ao = st->a->ops->inittargopts();
st->a = getaddr(sc, ADDR_DEST);
if (st->a->ops->inittargopts)
st->ao = st->a->ops->inittargopts();
- else
+ else
{
st->ao = CREATE(addr_opts);
st->ao = CREATE(addr_opts);
- *st->ao = gtao;
+ *st->ao = gtao;
+ }
dstr_puts(&d, "socket.");
st->a->ops->print(st->a, ADDR_DEST, &d);
st->t.desc = xstrdup(d.buf);
dstr_puts(&d, "socket.");
st->a->ops->print(st->a, ADDR_DEST, &d);
st->t.desc = xstrdup(d.buf);