|
INET Framework for OMNeT++/OMNEST
|
00001 /* 00002 * STPMACCompare.h 00003 * 00004 * Created on: 16.4.2011 00005 * Author: aranel 00006 */ 00007 00008 #ifndef __STPMACCOMPARE_H__ 00009 #define __STPMACCOMPARE_H__ 00010 00011 #include "MACAddress.h" 00012 00013 bool operator<(const MACAddress& a, const MACAddress& b) { 00014 if (a.compareTo(b) == -1) { 00015 return true; 00016 } 00017 return false; 00018 } 00019 00020 bool operator>(const MACAddress& a, const MACAddress& b) { 00021 if (a.compareTo(b) == 1) { 00022 return true; 00023 } 00024 return false; 00025 } 00026 00027 bool operator<=(const MACAddress& a, const MACAddress& b) { 00028 if (a.compareTo(b) != 1) { 00029 return true; 00030 } 00031 return false; 00032 } 00033 00034 bool operator>=(const MACAddress& a, const MACAddress& b) { 00035 if (a.compareTo(b) != -1) { 00036 return true; 00037 } 00038 return false; 00039 } 00040 00041 #endif /* STPMACCOMPARE_H_ */