Changeset 1021

Show
Ignore:
Timestamp:
04/13/00 19:08:01 (14 years ago)
Author:
piers
Message:

Tweaked so the send socket binds to command line specified -i interface, if
specified, otherwise it binds to in6addr_any

Location:
vic/trunk/net
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • vic/trunk/net/net-addr.h

    r903 r1021  
    4949protected: 
    5050  AddressType(); 
    51   virtual Address* resolve(const char* name) {return (0);} 
     51  virtual Address* resolve(const char* name) {name=name; return (0);} 
    5252private: 
    5353  static AddressType* all_; 
  • vic/trunk/net/net-ipv6.cpp

    r1020 r1021  
    476476        sin.sin6_flowinfo = flowLabel_; 
    477477/* __IPV6 memcopy address */ 
    478         sin.sin6_addr = in6addr_any; 
     478        // Use Local name if already set via command line 
     479        if (((const char*)local_)[0]!='\0') { 
     480                sin.sin6_addr = (IP6Address&)local_; 
     481        } else { 
     482                sin.sin6_addr = in6addr_any; 
     483        } 
    479484        if (bind(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { 
    480485                perror("bind");