Line data Source code
1 : /* 2 : * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. 3 : */ 4 : 5 : #ifndef vnsw_agent_interface_kstate_h 6 : #define vnsw_agent_interface_kstate_h 7 : 8 : class InterfaceKState: public KState { 9 : public: 10 : InterfaceKState(KInterfaceResp *obj, const std::string &resp_ctx, 11 : vr_interface_req &encoder, int id); 12 : virtual void SendResponse(); 13 : virtual void Handler(); 14 : virtual void SendNextRequest(); 15 : void InitDumpRequest(vr_interface_req &req) const; 16 : const std::string TypeToString(int type) const; 17 : const std::string FlagsToString(int flags) const; 18 : template <typename ElementType> 19 0 : const string SetItfSandesh(vector<ElementType> const &itf_sandesh) { 20 0 : std::stringstream strm; 21 0 : typename vector<ElementType>::const_iterator it; 22 0 : for(it = itf_sandesh.begin(); it != itf_sandesh.end(); ++it) 23 0 : strm << *it << " "; 24 0 : return strm.str(); 25 0 : } 26 : }; 27 : #endif //vnsw_agent_interface_kstate_h