<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[63051] trunk/dports/comms/slirp</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.macports.org/changeset/63051">63051</a></dd>
<dt>Author</dt> <dd>landonf@macports.org</dd>
<dt>Date</dt> <dd>2010-01-24 11:29:31 -0800 (Sun, 24 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Update to slirp 1.0.17. (Upstream) bugs remain with the 64-bit build</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportscommsslirpPortfile">trunk/dports/comms/slirp/Portfile</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportscommsslirpfilesdebianslirp_10173diff">trunk/dports/comms/slirp/files/debian-slirp_1.0.17-3.diff</a></li>
<li><a href="#trunkdportscommsslirpfilesfix17patch">trunk/dports/comms/slirp/files/fix17.patch</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportscommsslirpPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/comms/slirp/Portfile (63050 => 63051)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/comms/slirp/Portfile        2010-01-24 19:25:44 UTC (rev 63050)
+++ trunk/dports/comms/slirp/Portfile        2010-01-24 19:29:31 UTC (rev 63051)
</span><span class="lines">@@ -1,9 +1,10 @@
</span><span class="cx"> # $Id$
</span><span class="cx">
</span><span class="cx"> PortSystem 1.0
</span><ins>+PortGroup muniversal 1.0
</ins><span class="cx">
</span><span class="cx"> name                        slirp
</span><del>-version                        1.0.16
</del><ins>+version                        1.0.17
</ins><span class="cx"> categories                comms
</span><span class="cx"> platforms                darwin
</span><span class="cx"> maintainers                nomaintainer
</span><span class="lines">@@ -14,10 +15,21 @@
</span><span class="cx">                                         your Palm Pilot over the Internet via your Unix box.
</span><span class="cx">
</span><span class="cx"> homepage                http://slirp.sourceforge.net/
</span><del>-master_sites        sourceforge
</del><ins>+
+# No distfile is available for slirp-1.0.17 -- the update is distributed as a
+# patch
+distname                ${name}-1.0.16
+worksrcdir                ${distname}
+master_sites                sourceforge
</ins><span class="cx"> checksums                md5 b712f2fe58aaf87172cfd31c95fc1e31
</span><del>-patchfiles                patch-Makefile.in
</del><span class="cx">
</span><ins>+# Include both the 1.0.17 update and Debian's fixes for compiler warnings
+# and LP64. The Debian maintainer submitted his changes upstream, but no
+# response from the slirp maintainer was forthcoming.
+patchfiles                patch-Makefile.in \
+                        fix17.patch \
+                        debian-slirp_1.0.17-3.diff
+
</ins><span class="cx"> worksrcdir                ${worksrcdir}/src
</span><span class="cx">
</span><span class="cx"> post-destroot        {
</span></span></pre></div>
<a id="trunkdportscommsslirpfilesdebianslirp_10173diff"></a>
<div class="addfile"><h4>Added: trunk/dports/comms/slirp/files/debian-slirp_1.0.17-3.diff (0 => 63051)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/comms/slirp/files/debian-slirp_1.0.17-3.diff         (rev 0)
+++ trunk/dports/comms/slirp/files/debian-slirp_1.0.17-3.diff        2010-01-24 19:29:31 UTC (rev 63051)
</span><span class="lines">@@ -0,0 +1,467 @@
</span><ins>+--- slirp.man
++++ slirp.man
+@@ -1,4 +1,4 @@
+-.TH SLIRP 1 "9 Jan 1996" "Version 1.0b"
++.TH SLIRP 1 "8 Jan 2006" "Version 1.0.17"
+ .\" Start displayed text macro
+ .de DS
+
+@@ -58,7 +58,7 @@
+ second gap between each. This will disconnect Slirp from your shell's
+ terminal and put Slirp in the background. Later, you can type
+ .DS
+- slirp -l 0
++ slirp \-l 0
+ .DE
+ to "reconnect" Slirp again.
+ .PP
+@@ -93,29 +93,29 @@
+ (Notice the quotes, they ARE significant). The reverse is also true. E.g.,
+ if you run slirp as:
+ .DS
+- slirp -P -b 14400
++ slirp \-P \-b 14400
+ .DE
+ you can create your .slirprc file too look like the following:
+ .DS
+- -P
+- -b 14400
++ \-P
++ \-b 14400
+ .DE
+ (Notice that only ONE command per line is allowed in configuration files).
+ The 2 types of options can also be mixed. For example:
+ .DS
+ In .slirprc:
+- -P
+- -b 14400
++ \-P
++ \-b 14400
+ redir 5022 21
+
+ Command line:
+- slirp -P -b 14400 "redir 5022 21"
++ slirp \-P \-b 14400 "redir 5022 21"
+ .DE
+ Note that on the command line, any command/option that does not begin
+ with a '-' or '+', and has spaces in it, MUST be enclosed in quotes.
+ E.g., The following are all legal:
+ .DS
+- slirp -P "redir udp 5022 25" -vj -b 14400
++ slirp \-P "redir udp 5022 25" \-vj \-b 14400
+ slirp "ppp" "baudrate 14400"
+ slirp ppp "baudrate 14400"
+ .DE
+@@ -125,9 +125,9 @@
+ The following are NOT legal:
+ .DS
+ slirp baudrate 14400
+- slirp "-b 14400"
++ slirp "\-b 14400"
+ .DE
+-(Because "-b" starts with a '-' you must NOT enclose it in quotes.)
++(Because "\-b" starts with a '-' you must NOT enclose it in quotes.)
+ Easy, eh?
+ .PP
+ Note: Whenever Slirp expects an IP address as an argument (E.g., in
+@@ -149,8 +149,8 @@
+ A few notes on configuration:
+ .RS 2
+ .IP * 2
+-You should have "ppp" or "-P" before any PPP options (because when
+-Slirp parses -P or ppp, it will initialize all related fields, hence
++You should have "ppp" or "\-P" before any PPP options (because when
++Slirp parses \-P or ppp, it will initialize all related fields, hence
+ clearing anything that was parsed before it).
+ .IP * 2
+ Upon startup, the configuration is done in this order:
+@@ -164,9 +164,9 @@
+ .RE
+ .IP \ 2
+ This is important because, for example, if you have "initiate-options"
+-(a PPP option) in ~/.slirprc-0, and you run slirp with -P,
+-"initiate-options" will not be valid, because -P will clear the fact
+-that you want options initiated by Slirp (remember, -P should always
++(a PPP option) in ~/.slirprc-0, and you run slirp with \-P,
++"initiate-options" will not be valid, because \-P will clear the fact
++that you want options initiated by Slirp (remember, \-P should always
+ come before any PPP options).
+ .RE
+ .SH "COMMANDS AND OPTIONS"
+@@ -202,7 +202,7 @@
+ .br
+ Usable: anywhere
+ .br
+-Command-line: -X
++Command-line: \-X
+ .br
+ Options:
+ .RS 2
+@@ -287,7 +287,7 @@
+ .br
+ Usable: anywhere
+ .br
+-Command-line: -b
++Command-line: \-b
+ .PP
+ Example: baudrate 14400
+ .PP
+@@ -433,8 +433,8 @@
+ wipes out the session, whereas "close N" closes it properly, as a good
+ little tcpip-emulator should :)
+ .PP        
+-"kill -1" shouldn't be used, it will kill the first session it finds
+-with -1, which usually is the command-line connection.
++"kill \-1" shouldn't be used, it will kill the first session it finds
++with \-1, which usually is the command-line connection.
+ .RE
+ .IP "close N"
+ .RS 4
+@@ -792,9 +792,9 @@
+ If your PPP software is unable to escape these characters, or you're
+ using (C)SLIP (which must have an 8bit clean link), your best bet is to
+ try and make the link 8bit clean. For example, on some systems you can
+-give telnet the -8 flag to make the link 8bit, and -E to stop it from
+-interpreting the ^] character. Similarly for rlogin; -8 to make the
+-link 8bit, -E to stop rlogin from interpreting the ~ character. You
++give telnet the \-8 flag to make the link 8bit, and \-E to stop it from
++interpreting the ^] character. Similarly for rlogin; \-8 to make the
++link 8bit, \-E to stop rlogin from interpreting the ~ character. You
+ should look at the telnet and rlogin manual pages ("man telnet" and
+ "man rlogin" respectively) to see if your telnet/rlogin has similar
+ options.
+@@ -815,7 +815,7 @@
+ Now, when you telnet to the host you wish to run the X programs from,
+ you should do as Slirp suggest above; type either of the two commands,
+ depending on which shell you are using. You could also run the X
+-program as "xprog -display IP.ADDRESS:X.Y" as printed above.
++program as "xprog \-display IP.ADDRESS:X.Y" as printed above.
+ .IP
+ If you missed what Slirp displayed on startup, you can telnet to
+ 10.0.2.0 and give Slirp the command "show X", and the above will be
+@@ -886,13 +886,13 @@
+ with the following information:
+ .RS 2
+ .IP * 2
+-Output of the command "uname -a" on the remote system;
++Output of the command "uname \-a" on the remote system;
+ .IP * 2
+ Operating System name and version you run on your PC;
+ .IP * 2
+ Version of Slirp you are using (IMPORTANT!!!);
+ .IP * 2
+-If you managed to get Slirp running, run Slirp as "slirp -S" then try
++If you managed to get Slirp running, run Slirp as "slirp \-S" then try
+ whatever failed. When you exit Slirp, you should have a file called
+ "slirp_stats". Send me this file; and
+ .IP * 2
+--- ppp.c
++++ ppp.c
+@@ -40,6 +40,7 @@
+ #include <syslog.h>
+ #include <utmp.h>
+ #include <pwd.h>
++#include <ctype.h>
+
+ #include <sys/param.h>
+ #include <sys/types.h>
+--- udp.c
++++ udp.c
+@@ -371,7 +371,7 @@
+         struct mbuf *m;
+ {
+         struct sockaddr_in addr;
+- int addrlen = sizeof(addr);
++ socklen_t addrlen = sizeof(addr);
+ #ifdef EMULATE_TALK
+         CTL_MSG_OLD *omsg;
+         CTL_MSG *nmsg;
+@@ -596,7 +596,7 @@
+ {
+         struct sockaddr_in addr;
+         struct socket *so;
+-        int addrlen = sizeof(struct sockaddr_in), opt = 1;
++        socklen_t addrlen = sizeof(struct sockaddr_in), opt = 1;
+         
+         if ((so = socreate()) == NULL) {
+                 free(so);
+--- tcp_subr.c
++++ tcp_subr.c
+@@ -463,7 +463,7 @@
+ {
+         struct socket *so;
+         struct sockaddr_in addr;
+-        int addrlen = sizeof(struct sockaddr_in);
++        socklen_t addrlen = sizeof(struct sockaddr_in);
+         struct tcpcb *tp;
+         int s, opt;
+
+@@ -658,7 +658,7 @@
+                 {
+                         struct socket *tmpso;
+                         struct sockaddr_in addr;
+-                        int addrlen = sizeof(struct sockaddr_in);
++                        socklen_t addrlen = sizeof(struct sockaddr_in);
+                         struct sbuf *so_rcv = &so->so_rcv;
+                         
+                         memcpy(so_rcv->sb_wptr, m->m_data, m->m_len);
+--- Makefile.in
++++ Makefile.in
+@@ -209,3 +209,4 @@
+ .c.o: $(COMMON_H)
+         $(CC) $(CFLAGS) -c $< -o $@
+
++nothing:
+--- main.c
++++ main.c
+@@ -9,6 +9,7 @@
+ #define WANT_SYS_IOCTL_H
+ #define WANT_TERMIOS_H
+ #include <slirp.h>
++#include <ctype.h>
+ #include "main.h"
+
+ struct timeval tt;
+@@ -237,7 +242,7 @@
+
+         /* It's an internet socket */
+         if (sscanf(*argv, "%d,%[^:]:%d,%s", &unit, hn, &port, pwd) != 4) {
+-         lprint("Error: bad arguements to -l\n");
++         lprint("Error: bad arguments to -l\n");
+          slirp_exit(1);
+         }
+         if (strcmp(pwd, "-") == 0) {
+@@ -990,10 +995,10 @@
+                 char *device = dev;
+ #ifndef NO_UNIX_SOCKETS
+                 struct sockaddr_un sock_un;
+-                int sock_len = sizeof(struct sockaddr_un);
++                socklen_t sock_len = sizeof(struct sockaddr_un);
+ #endif
+                 struct sockaddr_in sock_in;
+-                int sock_len2 = sizeof(struct sockaddr_in);
++                socklen_t sock_len2 = sizeof(struct sockaddr_in);
+
+                 fd = -1;
+                 if (slirp_socket_passwd)
+@@ -1029,7 +1034,7 @@
+                         sleep(1);
+                         if (read(fd, buff, 256) < 0) {
+                                 /* Nuke both connections */
+-                                sprintf(buff, "0 Connection timed out");
++                                snprintf(buff, sizeof(buff), "0 Connection timed out");
+                                 write(fd, buff, strlen(buff)+1);
+                                 slirp_socket_wait = curtime;
+                                 close(fd);
+@@ -1041,7 +1046,7 @@
+
+                 if (sscanf(buff, "%d %d %256s", &unit, &pid, device) == 3) {
+                         if (unit >= MAX_INTERFACES || unit < 0) {
+-                                sprintf(buff, "0 Unit out of range (must be between 0 and %d, inclusive)", MAX_INTERFACES-1);
++                                snprintf(buff, sizeof(buff), "0 Unit out of range (must be between 0 and %d, inclusive)", MAX_INTERFACES-1);
+                                 write(fd, buff, strlen(buff)+1);
+                                 slirp_socket_wait = curtime;
+                                 close(fd);
+@@ -1052,7 +1057,7 @@
+                          * (pid is invalid) */
+                         if (slirp_socket_passwd) {
+                                 if (strcmp(slirp_socket_passwd, device) != 0) {
+-                                        sprintf(buff, "0 Incorrect password");
++                                        snprintf(buff, sizeof(buff), "0 Incorrect password");
+                                         write(fd, buff, strlen(buff)+1);
+                                         slirp_socket_wait = curtime;
+                                         close(fd);
+@@ -1076,7 +1081,7 @@
+                          * failure, 1 for exit, and message is printed
+                          */
+                         if (ttyp) {
+-                                sprintf(buff, "0 Unit already attached");
++                                snprintf(buff, sizeof(buff), "0 Unit already attached");
+                                 write(fd, buff, strlen(buff)+1);
+                                 slirp_socket_wait = curtime;
+                                 close(fd);
+@@ -1090,7 +1095,7 @@
+                                  strcpy(buff2, "PPP");
+                                 else
+ #endif
+-                                 sprintf(buff2, "SLIP, MTU %d, MRU %d", if_mtu, if_mru);
++                                 snprintf(buff2, sizeof(buff2), "SLIP, MTU %d, MRU %d", if_mtu, if_mru);
+ #ifndef FULL_BOLT
+                                 snprintf(buff, sizeof(buff),
+                                         "1 Attached as unit %d, device %s\r\n\r\n[talking %s, %d baud]\r\n\r\nSLiRP Ready ...",
+@@ -1111,7 +1116,7 @@
+                                         ttyp->fd = fd;
+                                 }
+                         } else {
+-                                sprintf(buff, "0 %s", strerror(errno));
++                                snprintf(buff, sizeof(buff), "0 %s", strerror(errno));
+                                 write(fd, buff, strlen(buff)+1);
+                                 slirp_socket_wait = curtime;
+                                 close(fd);
+--- mbuf.h
++++ mbuf.h
+@@ -132,6 +132,6 @@
+ extern struct        mbstat mbstat;
+ extern int mbuf_alloced;
+ extern struct mbuf m_freelist, m_usedlist;
+-extern mbuf_max;
++extern int mbuf_max;
+
+ #endif
+--- misc.c
++++ misc.c
+@@ -298,7 +298,7 @@
+ {
+         int s;
+         struct sockaddr_in addr;
+-        int addrlen = sizeof(addr);
++        socklen_t addrlen = sizeof(addr);
+         int opt;
+ int master;
+         char *argv[256];
+@@ -403,7 +403,7 @@
+                  {
+                          char buff[256];
+                         
+-                         sprintf(buff, "Error: execvp of %s failed: %s\n",
++                         snprintf(buff, sizeof(buff), "Error: execvp of %s failed: %s\n",
+                                  argv[0], strerror(errno));
+                          write(2, buff, strlen(buff)+1);
+                  }
+@@ -490,7 +490,7 @@
+                 if (connect(s, (struct sockaddr *)&sock_un,
+                          sizeof(sock_un.sun_family) + sizeof(sock_un.sun_path)) != 0)
+                  slirp_exit(1);
+-                sprintf(buff, "kill none:%d", slirp_socket_unit);
++                snprintf(buff, sizeof(buff), "kill none:%d", slirp_socket_unit);
+                 write(s, buff, strlen(buff)+1);
+         }
+ #endif
+@@ -917,7 +917,7 @@
+
+ /* Ooops, failed, let's tell the user why */
+
+- sprintf(buff, "Error: execlp of %s failed: %s\n",
++ snprintf(buff, sizeof(buff), "Error: execlp of %s failed: %s\n",
+ "rsh", strerror(errno));
+ write(2, buff, strlen(buff)+1);
+ close(0); close(1); close(2); /* XXX */
+--- options.c
++++ options.c
+@@ -27,6 +27,8 @@
+ #define GIDSET_TYPE        int
+ #endif
+
++#include <ctype.h>
++
+ void readable _P((int fd));
+
+ /*
+--- ttys.c
++++ ttys.c
+@@ -11,6 +11,8 @@
+ #endif
+ #include <slirp.h>
+
++void lcp_lowerdown(int unit);
++
+ struct ttys *ttys_unit[MAX_INTERFACES];
+
+ int slirp_forked;
+@@ -92,9 +94,9 @@
+
+         /* Config the new tty */
+         if ((bptr = (char *)getenv("HOME")))
+-         sprintf(buff, "%s/.slirprc-%d", bptr, unit);
++         snprintf(buff, sizeof(buff), "%s/.slirprc-%d", bptr, unit);
+         else
+-         sprintf(buff, ".slirprc-%d", unit);
++         snprintf(buff, sizeof(buff), ".slirprc-%d", unit);
+         config(buff, ttyp->unit);
+
+         return ttyp;
+--- tcp_output.c
++++ tcp_output.c
+@@ -592,7 +592,7 @@
+ tcp_setpersist(tp)
+         register struct tcpcb *tp;
+ {
+-        register t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1;
++        register int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1;
+
+ /*        if (tp->t_timer[TCPT_REXMT])
+ *                panic("tcp_output REXMT");
+--- socket.c
++++ socket.c
+@@ -377,7 +377,7 @@
+         struct socket *so;
+ {
+         struct sockaddr_in addr;
+-        int addrlen = sizeof(struct sockaddr_in);
++        socklen_t addrlen = sizeof(struct sockaddr_in);
+         
+         DEBUG_CALL("sorecvfrom");
+         DEBUG_ARG("so = %lx", (long)so);
+@@ -530,7 +530,8 @@
+ {
+         struct sockaddr_in addr;
+         struct socket *so;
+-        int s, addrlen = sizeof(addr), opt = 1;
++        int s, opt = 1;
++        socklen_t addrlen = sizeof(addr);
+
+         DEBUG_CALL("solisten");
+         DEBUG_ARG("port = %d", port);
+--- ppp/ccp.c
++++ ppp/ccp.c
+@@ -464,7 +464,7 @@
+
+         if (newret == CONFNAK && dont_nak)
+          newret = CONFREJ;
+-        if (!(newret == CONFACK || newret == CONFNAK && ret == CONFREJ)) {
++        if (!(newret == CONFACK || (newret == CONFNAK && ret == CONFREJ))) {
+          /* we're returning this option */
+          if (newret == CONFREJ && ret == CONFNAK)
+                 retp = p0;
+--- ppp/lcp.c
++++ ppp/lcp.c
+@@ -39,6 +39,7 @@
+ #include "chap.h"
+ #include "upap.h"
+ #include "ipcp.h"
++#include "ccp.h"
+
+ /* global vars */
+ fsm lcp_fsm[NUM_PPP];                        /* LCP fsm structure (global)*/
+--- ppp/ppp.h
++++ ppp/ppp.h
+@@ -54,4 +54,18 @@
+
+ void print_string _P((char *, int, void (*) _P((void *, char *, ...)), void *));
+
++int bad_ip_adrs(u_int32_t addr);
++void novm __P((char *));
++void auth_peer_fail(int unit, int protocol);
++void auth_withpeer_fail(int unit, int protocol);
++void auth_peer_success(int unit, int protocol);
++void auth_withpeer_success(int unit, int protocol);
++int auth_ip_addr(int unit, u_int32_t addr);
++void link_established(int unit);
++void link_down(int unit);
++void link_required(int unit);
++void link_terminated(int unit);
++void check_auth_options();
++void check_access(FILE *f, char *filename);
++
+ #endif /* __PPP_H__ */
+--- ppp/ipcp.c
++++ ppp/ipcp.c
+@@ -568,7 +568,7 @@
+          no.neg_vj = 1;
+          break;
+         case CI_ADDRS:
+-         if (go->neg_addr && go->old_addrs || no.old_addrs
++         if ((go->neg_addr && go->old_addrs) || no.old_addrs
+                 || cilen != CILEN_ADDRS)
+                 goto bad;
+          try.neg_addr = 1;
</ins></span></pre></div>
<a id="trunkdportscommsslirpfilesfix17patch"></a>
<div class="addfile"><h4>Added: trunk/dports/comms/slirp/files/fix17.patch (0 => 63051)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/comms/slirp/files/fix17.patch         (rev 0)
+++ trunk/dports/comms/slirp/files/fix17.patch        2010-01-24 19:29:31 UTC (rev 63051)
</span><span class="lines">@@ -0,0 +1,145 @@
</span><ins>+diff -u -r debug.c debug.c
+--- debug.c        2004-09-07 11:50:01.000000000 +1000
++++ debug.c        2005-11-01 10:45:27.865300800 +1100
+@@ -98,7 +98,9 @@
+          ttyp->proto==PROTO_PPP?"PPP":
+ #endif
+          "SLIP"), buff);
++#ifndef FULL_BOLT
+         lprint(" %d baudrate\r\n", ttyp->baud);
++#endif
+         lprint(" interface is %s\r\n", ttyp->up?"up":"down");
+         lprint(" using fd %d, guardian pid is %d\r\n", ttyp->fd, ttyp->pid);
+ #ifndef FULL_BOLT
+diff -u -r main.c main.c
+--- main.c        2004-09-07 12:25:39.000000000 +1000
++++ main.c        2005-11-27 22:13:00.651928000 +1100
+@@ -602,10 +602,32 @@
+ keep it open.
+
+ Mainly for testing purposes, nice to be able to do fprintf(stderr...
++
++ Includes Tim Watt's ttyname() fixes (modified)
++
+ */
+
+ {
+ int blnKeepErr, blnKeepStdOut;
++ const char *ttyname_0_dup = 0;
++ const char *ttyname_1_dup = 0;
++ const char *ttyname_2_dup = 0;
++
++#define dup_ttyname(n) \
++ if( (ttyname_##n##_dup = ttyname(n)) ) { \
++ ttyname_##n##_dup = strdup(ttyname_##n##_dup); \
++ }
++
++#define clr_ttyname(n) \
++ if( (ttyname_##n##_dup) ) { \
++ free((char *) ttyname_##n##_dup); \
++ ttyname_##n##_dup = 0; \
++ }
++
++ dup_ttyname(0)
++ dup_ttyname(1)
++ dup_ttyname(2)
++
+
+ /* stderr going elsewhere ?? */
+ blnKeepErr = FALSE;
+@@ -613,26 +635,32 @@
+ if(!isatty(2))
+ blnKeepErr = TRUE;
+ else {
+- if((slirp_tty == NULL && strcmp(ttyname(0), ttyname(2)) == 0) ||
+- (slirp_tty != NULL && strcmp(ttyname(2), slirp_tty) == 0) )
++ if((slirp_tty == NULL && ttyname_0_dup && ttyname_2_dup && strcmp(ttyname_0_dup, ttyname_2_dup) == 0) ||
++ (slirp_tty != NULL && ttyname_2_dup && strcmp(ttyname_2_dup, slirp_tty) == 0) )
+ blnKeepErr = FALSE;
+ else
+ blnKeepErr = TRUE;
+ }
+
+-
+ /* stdout going elsewhere ?? */
+ blnKeepStdOut = FALSE;
+ if(!isatty(1))
+ blnKeepStdOut = TRUE;
+ else {
+- if((slirp_tty == NULL && strcmp(ttyname(0), ttyname(1)) == 0) ||
+- (slirp_tty != NULL && strcmp(ttyname(1), slirp_tty) == 0) )
++ if((slirp_tty == NULL && ttyname_0_dup && ttyname_1_dup && strcmp(ttyname_0_dup, ttyname_1_dup) == 0) ||
++ (slirp_tty != NULL && ttyname_1_dup && strcmp(ttyname_1_dup, slirp_tty) == 0) )
+ blnKeepStdOut = FALSE;
+ else
+ blnKeepStdOut = TRUE;
+ }
+
++ clr_ttyname(0);
++ clr_ttyname(1);
++ clr_ttyname(2);
++
++#undef dup_ttyname
++#undef clr_ttyname
++
+ i = open("/dev/null", O_RDWR);
+
+ if(!blnKeepStdOut)
+@@ -1068,7 +1096,7 @@
+                                         "1 Attached as unit %d, device %s\r\n\r\n[talking %s, %d baud]\r\n\r\nSLiRP Ready ...",
+                                         unit, device?device:"(socket)", buff2, ttyp->baud);
+ #else
+-                                snprintf(buff, sizeof(buff)
++ snprintf(buff, sizeof(buff),
+                                         "1 Attached as unit %d, device %s\r\n\r\n[talking %s]\r\n\r\nSLiRP Ready ...",
+                                         unit, device, buff2);
+ #endif
+diff -u -r main.h main.h
+--- main.h        2004-09-01 17:36:45.000000000 +1000
++++ main.h        2005-11-01 11:03:21.288808000 +1100
+@@ -5,6 +5,12 @@
+ * terms and conditions of the copyright.
+ */
+
++#define TRUE 1
++#define FALSE 0
++
++#include <sys/types.h>
++#include <unistd.h>
++
+ #ifdef HAVE_SYS_SELECT_H
+ #include <sys/select.h>
+ #endif
+diff -u -r mbuf.c mbuf.c
+--- mbuf.c        2004-09-01 17:36:43.000000000 +1000
++++ mbuf.c        2006-01-08 12:00:20.843576000 +1100
+@@ -146,18 +146,19 @@
+ struct mbuf *m;
+ int size;
+ {
++ int datasize;
++
+         /* some compiles throw up on gotos. This one we can fake. */
+ if(m->m_size>size) return;
+
+ if (m->m_flags & M_EXT) {
+-         /* datasize = m->m_data - m->m_ext; */
++ datasize = m->m_data - m->m_ext;
+          m->m_ext = (char *)realloc(m->m_ext,size);
+ /*                if (m->m_ext == NULL)
+ *                        return (struct mbuf *)NULL;
+ */                
+-         /* m->m_data = m->m_ext + datasize; */
++ m->m_data = m->m_ext + datasize;
+ } else {
+-         int datasize;
+          char *dat;
+          datasize = m->m_data - m->m_dat;
+          dat = (char *)malloc(size);
+diff -u -r version.h version.h
+--- version.h        2004-09-01 19:44:35.000000000 +1000
++++ version.h        2006-01-08 13:11:55.989692800 +1100
+@@ -1,2 +1,2 @@
+-#define SLIRP_VERSION "1.0.16"
++#define SLIRP_VERSION "1.0.17"
+ #define SLIRP_STATUS "BETA"
</ins><span class="cx">Property changes on: trunk/dports/comms/slirp/files/fix17.patch
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
</div>
</body>
</html>