// inet4s.h : iface ... inet static // #if !defined(AGD_INET4S_H__8DD9BEA3_89E3_42BA_88AC_9D805D2CAEBC__INCLUDED_) #define AGD_INET4S_H__8DD9BEA3_89E3_42BA_88AC_9D805D2CAEBC__INCLUDED_ #include #include #include #include #include #include #include #include #include ///////////////////////////////////////////////////////////////////////////// // inet4s.h - Declarations: typedef struct _IFACE_INET_STATIC { _IFACE_INET_STATIC(){_reset();} void _reset(void) { addr.s_addr = INADDR_ANY; gate.s_addr = INADDR_ANY; bcast.s_addr = INADDR_ANY; pointopoint.s_addr = INADDR_ANY; netmask.s_addr = INADDR_ANY; memset(&namesvr, 0, sizeof(namesvr)); netprefix = 0; bcastOpt = 0; metric = -1; mtu = -1; hwaddr.clear(); scope.clear(); dnss.clear(); } struct in_addr addr; struct in_addr netmask; struct in_addr gate; struct in_addr bcast; struct in_addr pointopoint; struct in_addr namesvr[3]; unsigned int netprefix; int bcastOpt; int metric; int mtu; std::string hwaddr; std::string scope; std::vector dnss; }IFACE_INET_STATIC, *LPIFACE_INET_STATIC; typedef const IFACE_INET_STATIC *LPCIFACE_INET_STATIC; bool ParseIfaceInet4sParam(const std::vector &v, IFACE_INET_STATIC &is); bool WriteIfaceInet4sParam(FILE *pf, const IFACE_INET_STATIC &is); ///////////////////////////////////////////////////////////////////////////// #endif // !defined(AGD_INET4S_H__8DD9BEA3_89E3_42BA_88AC_9D805D2CAEBC__INCLUDED_)