git-svn-id: svn://db.shs.com.ru/pip@580 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-12-11 10:33:53 +00:00
parent 99f3a53eac
commit cab51ddca9
3 changed files with 3 additions and 2 deletions

View File

@@ -481,7 +481,7 @@ bool PIEthernet::joinMulticastGroup(const PIString & group) {
#ifdef LINUX
//mreq.imr_address.s_addr = INADDR_ANY;
/*PIEthernet::InterfaceList il = interfaces();
const PIEthernet::Interface * ci = il.getByAddress(ip_);
const PIEthernet::Interface * ci = il.getByAddress(addr_r.ipString());
if (ci != 0) mreq.imr_ifindex = ci->index;*/
#endif
if (params[PIEthernet::Broadcast]) mreq.imr_address.s_addr = INADDR_ANY;

View File

@@ -511,7 +511,7 @@ private:
inline bool operator <(const PIEthernet::Interface & v0, const PIEthernet::Interface & v1) {return (v0.name < v1.name);}
inline bool operator ==(const PIEthernet::Interface & v0, const PIEthernet::Interface & v1) {return (v0.name == v1.name && v0.address == v1.address && v0.netmask == v1.netmask);}
inline bool operator !=(const PIEthernet::Interface & v0, const PIEthernet::Interface & v1) {return (v0.name != v1.name || v0.address != v1.address || v0.netmask != v1.netmask);}
inline PICout operator <<(PICout s, const PIEthernet::Address & v) {s.setControl(0, true); s << "Address(" << v.toString() << ")"; s.restoreControl(); return s;}
inline PICout operator <<(PICout s, const PIEthernet::Address & v) {s.space(); s.setControl(0, true); s << "Address(" << v.toString() << ")"; s.restoreControl(); return s;}
inline bool operator ==(const PIEthernet::Address & v0, const PIEthernet::Address & v1) {return (v0.ip() == v1.ip() && v0.port() == v1.port());}
inline bool operator !=(const PIEthernet::Address & v0, const PIEthernet::Address & v1) {return (v0.ip() != v1.ip() || v0.port() != v1.port());}

View File

@@ -159,6 +159,7 @@ private:
PIString fullPathPrefix() const {return PIStringAscii("pckext");}
PIString constructFullPathDevice() const;
bool openDevice() {if (dev == 0) return false; return dev->open();}
bool closeDevice() {if (dev == 0) return false; return dev->close();}
DeviceInfoFlags deviceInfoFlags() const {if (dev) return dev->infoFlags(); return 0;}
PIIODevice * dev;