ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/connection.C
(Generate patch)

Comparing gvpe/src/connection.C (file contents):
Revision 1.53 by pcg, Sat Mar 26 03:16:24 2005 UTC vs.
Revision 1.56 by pcg, Fri Jun 3 05:07:31 2005 UTC

14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with gvpe; if not, write to the Free Software 18 along with gvpe; if not, write to the Free Software
19 Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20*/ 20*/
21 21
22#include "config.h" 22#include "config.h"
23 23
24#include <cassert> 24#include <cassert>
848{ 848{
849 if (ictx && octx) 849 if (ictx && octx)
850 send_data_packet (pkt); 850 send_data_packet (pkt);
851 else 851 else
852 { 852 {
853 if (!broadcast)//DDDD 853 if (!broadcast)
854 data_queue.put (new tap_packet (*pkt)); 854 data_queue.put (new tap_packet (*pkt));
855 855
856 establish_connection (); 856 establish_connection ();
857 } 857 }
858} 858}
1063 { 1063 {
1064 vpn->tap->send (d); 1064 vpn->tap->send (d);
1065 1065
1066 if (si != rsi) 1066 if (si != rsi)
1067 { 1067 {
1068 // fast re-sync on connection changes, useful especially for tcp/ip 1068 // fast re-sync on source address changes, useful especially for tcp/ip
1069 si = rsi; 1069 si = rsi;
1070 1070
1071 slog (L_INFO, _("%s(%s): socket address changed to %s"), 1071 slog (L_INFO, _("%s(%s): socket address changed to %s"),
1072 conf->nodename, (const char *)si, (const char *)rsi); 1072 conf->nodename, (const char *)si, (const char *)rsi);
1073 } 1073 }
1201 char *filename; 1201 char *filename;
1202 asprintf (&filename, 1202 asprintf (&filename,
1203 "%s/%s", 1203 "%s/%s",
1204 confbase, 1204 confbase,
1205 ::conf.script_node_up ? ::conf.script_node_up : "node-up"); 1205 ::conf.script_node_up ? ::conf.script_node_up : "node-up");
1206
1207 return filename;
1206} 1208}
1207 1209
1208const char *connection::script_node_down () 1210const char *connection::script_node_down ()
1209{ 1211{
1210 script_init_connect_env (); 1212 script_init_connect_env ();
1214 char *filename; 1216 char *filename;
1215 asprintf (&filename, 1217 asprintf (&filename,
1216 "%s/%s", 1218 "%s/%s",
1217 confbase, 1219 confbase,
1218 ::conf.script_node_down ? ::conf.script_node_down : "node-down"); 1220 ::conf.script_node_down ? ::conf.script_node_down : "node-down");
1221
1222 return filename;
1219} 1223}
1220 1224
1221connection::connection (struct vpn *vpn, conf_node *conf) 1225connection::connection (struct vpn *vpn, conf_node *conf)
1222: vpn(vpn), conf(conf) 1226: vpn(vpn), conf(conf)
1223, rekey (this, &connection::rekey_cb) 1227, rekey (this, &connection::rekey_cb)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines