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