Documentation
¶
Overview ¶
package commonLib
nanomsg를 통해 LOXILIGHT코어에 API를 날리는 함수를 모아놓은 패키지입니다.
헬리오스가 로컬에 켜져있을때 사용해야 작동이 됩니다. 디폴트 서버 주소가 127.0.0.1입니다.
만약 켰는데 안되면 ifconfig lo 를 확인해서 up인지 아닌지 확인 해보세요.
Index ¶
- Constants
- Variables
- func AclExtract(raw string) []string
- func AddAclConfig(acl ACLModel) (string, error)
- func AddFdbConfig(vlan_id string, mac_address string, interface_name string) error
- func AddIpAddressConfig(interface_name string, ip_address string, prefix int) error
- func AddIpNeighborConfig(interface_name string, ip_address string, mac_address string) error
- func AddIpRouteConfig(ip_address string, prefix int, next_hop string) error
- func AddIpsecConfig(source_ip string, destination_ip string, protocol string, spi string, ...) error
- func AddMirrorPortConfig(MirrorId int, InterfaceName string) error
- func AddMirrorRspanConfig(MirrorId int, OutInterfaceName string, VlanId int) error
- func AddMirrorSpanConfig(MirrorId int, OutInterfaceName string) error
- func AddVlanBridge(vlan_id int) error
- func AddVlanMember(vlan_id int, interface_name string, tagging_status string) error
- func AddVxfdbConfig(vxlan_id int, mac_address string, ip_address string) error
- func AddVxlanBridgeWithVlanID(vxlan_id int, interface_name string, vlan_id int) error
- func AddVxlanBridgeWithoutVlanID(vxlan_id int, interface_name string) error
- func AddVxlanMember(vxlan_id int, interface_name string, tagging_status string) error
- func AddVxlanPeer(vxlan_id int, remote_ip string) error
- func ChangeControllerIp(url string)
- func ChangeHexIpToDec(hexip string) string
- func CloseConnection(sock mangos.Socket)
- func ConntrackDetailExtract(raw string) []string
- func ConntrackExtract(raw string) []string
- func ConntrackStatExtract(raw string) []string
- func DelAclConfig(UUID string) error
- func DelFdbConfig(vlan_id string, mac_address string, interface_name string) error
- func DelIpAddressConfig(interface_name string, ip_address string, prefix int) error
- func DelIpNeighborConfig(interface_name string, ip_address string) error
- func DelIpRouteConfig(ip_address string, prefix int) error
- func DelIpsecConfig(source_ip string, destination_ip string, protocol string, spi string, ...) error
- func DelMirrorConfig(MirrorId int) error
- func DelMirrorPortConfig(MirrorId int, InterfaceName string) error
- func DelVlanBridge(vlan_id int) error
- func DelVlanMember(vlan_id int, interface_name string, tagging_status string) error
- func DelVxfdbConfig(vxlan_id int, mac_address string, ip_address string) error
- func DelVxlanBridge(vxlan_id int) error
- func DelVxlanMember(vxlan_id int, interface_name string, tagging_status string) error
- func DelVxlanPeer(vxlan_id int, remote_ip string) error
- func FdbExtract(raw string) []string
- func GetAclConfig() (string, error)
- func GetConnection(url string) (mangos.Socket, error)
- func GetConnectionCheck(url string) error
- func GetConntrackConfig() (string, error)
- func GetFdbConfig() (string, error)
- func GetFdbVlanConfig(vlan_id int) (string, error)
- func GetFdbVxlanConfig(vxlan_id int) (string, error)
- func GetIpNeighborConfig() (string, error)
- func GetIpNeighborOneConfig(interface_name string) (string, error)
- func GetIpRouteConfig() (string, error)
- func GetIpsecConfig() (string, error)
- func GetMirrorConfig() (string, error)
- func GetRemovedTagPort(portname string) string
- func GetRunningConfig() (string, error)
- func GetVifConfig() (string, error)
- func GetVifOneConfig(IfName string) (string, error)
- func GetVlanBriefData() (string, error)
- func GetVlanIdConfig(vlan_id int) (string, error)
- func GetVxFdbConfig() (string, error)
- func GetVxlanBriefConfig() (string, error)
- func GetVxlanIdConfig(vxlan_id int) (string, error)
- func IpaddressInVifExtract(raw string) []string
- func IpaddressInVlanExtract(raw string) []string
- func IsHexID(hex_string string) bool
- func IsV4(ipstr string) bool
- func IsValidIP(ipstr string) bool
- func IsValidUUID(uuid string) bool
- func MakeAclMessage(acl ACLModel) (matches string, err error)
- func MirrorExtract(raw string) []string
- func NeighborExtract(raw string) []string
- func OldSendMessage(sock mangos.Socket, txt_msg []byte) string
- func ParseAclConfig(res string) [][]string
- func ParseConntrackData(res string) [][]string
- func ParseFdbConfig(res string) [][]string
- func ParseFdbVlanConfig(res string) [][]string
- func ParseFdbVxlanConfig(res string) [][]string
- func ParseIPBothPrefix(ipprefix string) (ipstr string, length int, err error)
- func ParseIpNeighborConfig(res string) [][]string
- func ParseIpRouteConfig(res string) [][]string
- func ParseMirrorConfig(res string) [][]string
- func ParseVlanBridgeData(res string) [][]string
- func ParseVlanIdConfig(res string) [][]string
- func ParseVxFdbConfig(res string) [][]string
- func ParseVxlanBriefConfig(res string) [][]string
- func ParseVxlanIdConfig(res string) [][]string
- func RouteExtract(raw string) []string
- func RouteOnlyExtract(raw string) []string
- func SendMessage(sock mangos.Socket, txt_msg []byte) string
- func ShowAclConfig()
- func ShowConntrackConfig()
- func ShowFdbConfig()
- func ShowFdbVlanConfig(vlan_id int)
- func ShowFdbVxlanConfig(vxlan_id int)
- func ShowInterfaceAllCounter()
- func ShowInterfaceAllStatus()
- func ShowInterfaceOneCounter(interface_name string)
- func ShowInterfaceOneStatus(interface_name string)
- func ShowIpNeighborConfig(interface_name string)
- func ShowIpRouteConfig(interface_name string)
- func ShowIpsecConfig()
- func ShowStartupConfig()
- func ShowVersion()
- func ShowVlanBriefConfig()
- func ShowVlanIdConfig(vlan_id int)
- func ShowVxlanBriefConfig()
- func ShowVxlanIdConfig(vxlan_id int)
- func ValidateIPBoth(ipstr string) (string, bool)
- func ValidateIsV4(ipstr string) (string, bool)
- func ValidateVlanID(vlan_id_str string) (vlanID int, err error)
- func ValidateVxlanID(vlan_id_str string) (vxlanID int, err error)
- func VifExtract(raw string) []string
- func VlanExtract(raw string) []string
- func VlanPortDetailExtract(raw string, tagged string) []string
- func VlanPortExtract(raw string) []string
- func VxFdbExtract(raw string) []string
- func VxlanExtract(raw string) []string
- type ACLFilterModel
- type ACLModel
- type ACLReturnModel
- type ACLReturnModels
- type ACLStatisticModel
- type ACLValueModel
- type ConfigResetStatusModel
- type ConntrackModel
- type ConntrackReturnModel
- type ControllerReturnModel
- type ErrorInner
- type ErrorModel
- type EthernetIpaddressModel
- type EthernetMacModel
- type EthernetNeighborCLIModel
- type EthernetNeighborDeleteModel
- type EthernetNeighborModel
- type EthernetNeighborReturnModel
- type HeartbeatReturnModel
- type Hls_idl_byte_hdr
- type Hls_idl_hdr
- type IProuteCLIModel
- type IProuteDeleteModel
- type IProuteModel
- type IProuteReturnModel
- type InterfaceModel
- type InterfaceReturnModel
- type InvalidFormatError
- type IpsecDeleteModel
- type IpsecModel
- type MissingValueError
- type PingRequestModel
- type PingReturnModel
- type RouteModel
- type RouteReturnModel
- type TunnelDecapModel
- type TunnelDecapReturnModel
- type VifModel
- type VifReturnModel
- type VlanFDBModel
- type VlanFDBReturnModel
- type VlanMemberModel
- type VlanMemberReturnModel
- type VlanMembersModel
- type VlanMembersReturnModel
- type VlanModel
- type VlanNeighborReturnModel
- type VlanNeighborsModel
- type VlanNeighborsReturnModel
- type VlanReturnModel
- type VlansPerVnetModel
- type VlansPerVnetReturnModel
- type VlansReturnModel
- type VnetModel
- type VnetReturnModel
- type VxlanBridgesModel
- type VxlanFDBModel
- type VxlanFDBReturnModel
- type VxlanMACModel
- type VxlanMemberModel
- type VxlanModel
- type VxlanPeerModel
- type VxlanReturnModel
Constants ¶
const ( LOXILIGHT_PACKET_IN = iota + 1 /* Legacy packet in from SDN edge */ LOXILIGHT_PACKET_OUT /* Legacy packet out toward SDN edge */ LOXILIGHT_VERSION_SHOW /* *Version show */ LOXILIGHT_RUN_CONFIG_SHOW /* *Legacy current configuration show */ LOXILIGHT_START_CONFIG_SHOW /* *Legacy start up configuration show */ LOXILIGHT_INTERFACE_STAT_SHOW_BRIEF /* *Legacy Interface statistics counter show all */ LOXILIGHT_INTERFACE_STAT_SHOW_INTERFACE /* *Legacy Interface statistics counter show with interface name */ LOXILIGHT_INTERFACE_SHOW_BRIEF /* *Legacy Interface information show (MAC, Speed, Port mode etc.)*/ LOXILIGHT_INTERFACE_SHOW_INTERFACE /* *Legacy Interface information show with interface name */ LOXILIGHT_IP_ADDR_ADD /* Legacy Interface address addition */ LOXILIGHT_IP_ADDR_DEL /* Legacy Interface address deletion */ LOXILIGHT_IPV6_ADDR_ADD /* Legacy ipv6 Interface address addition */ LOXILIGHT_IPV6_ADDR_DEL /* Legacy ipv6 Interface address deletion */ LOXILIGHT_IP_INTERFACE_BRIEF /* *Legacy IP information show (IP address, MTU, Proxy arp etc. )*/ LOXILIGHT_IP_INTERFACE /* *Legacy IP information show with interface name */ LOXILIGHT_RT_ADD /* Legacy route addition */ LOXILIGHT_RT_DEL /* Legacy route deletion */ LOXILIGHT_IPV6_RT_ADD /* Legacy ipv6 route addition */ LOXILIGHT_IPV6_RT_DEL /* Legacy ipv6 route deletion */ LOXILIGHT_RT_SHOW_ALL /* *Legacy route show both of IPv4 and IPv6*/ LOXILIGHT_NH_ADD /* Legacy next-hop addition */ LOXILIGHT_NH_DEL /* Legacy next-hop deletion */ LOXILIGHT_IPV6_NH_ADD /* Legacy next-hop addition */ LOXILIGHT_IPV6_NH_DEL /* Legacy next-hop deletion */ LOXILIGHT_NH_SHOW_ALL /* *Legacy next-hop show both of IPv4 and IPv6 */ LOXILIGHT_NH_SHOW_INTERFACE /* *Legacy next-hop show both of IPv4 and IPv6 with interface name */ LOXILIGHT_VBR_ADD /* VLAN Bridge Creation/Modification*/ LOXILIGHT_VBR_DEL /* VLAN Bridge Deletion */ LOXILIGHT_VBR_SHOW_ALL /* *VLAN Bridge Show with brief infomation*/ LOXILIGHT_VBR_SHOW_ID /* *VLAN Bridge Show using vlan id*/ LOXILIGHT_VBR_PORT_ADD /* Port Add to VLAN Bridge*/ LOXILIGHT_VBR_PORT_DEL /* Port Delete from VLAN Bridge */ LOXILIGHT_VXBR_ADD /* VxLAN Bridge Creation/Modification*/ LOXILIGHT_VXBR_DEL /* VxLAN Bridge Deletion */ LOXILIGHT_VXBR_AP_ADD /* VxLAN Bridge Access Point add*/ LOXILIGHT_VXBR_AP_DEL /* VxLAN Bridge Access Point del*/ LOXILIGHT_VXBR_EP_RIP_ADD /* VxLAN Bridge Remote IP add*/ LOXILIGHT_VXBR_EP_RIP_DEL /* VxLAN Bridge Remote IP del*/ LOXILIGHT_VXBR_SHOW_ALL /* VxLAN Bridge Show */ LOXILIGHT_VXBR_SHOW_ID /* VxLAN Bridge Show using vxlan id*/ LOXILIGHT_VTEP_SHOW_ALL /* VxLAN Tunnel Endpoint Show */ LOXILIGHT_L2FDB_ADD /* MAC entry add in Legacy L2 Table */ LOXILIGHT_L2FDB_DEL /* MAC entry del from Legacy L2 Table */ LOXILIGHT_VXFDB_ADD /* MAC entry add in Legacy L2 Table */ LOXILIGHT_VXFDB_DEL /* MAC entry del from Legacy L2 Table */ LOXILIGHT_L2FDB_SHOW_ALL /* MAC entry show from Legacy L2 Table */ LOXILIGHT_L2FDB_SHOW_VLAN /* MAC entry show from Legacy L2 Table for vlan id */ LOXILIGHT_VXFDB_SHOW_ALL /* MAC entry show from Legacy L2 Table */ LOXILIGHT_VXFDB_SHOW_VXLAN /* MAC entry show from Legacy L2 Table for vxlan id */ LOXILIGHT_LAG_INTF_ADD /* LAG Interface Creation/Modification*/ LOXILIGHT_LAG_INTF_DEL /* LAG Interface Deletion */ LOXILIGHT_LAG_PORT_ADD /* Port Add to LAG Interface*/ LOXILIGHT_LAG_PORT_DEL /* Port Delete from LAG Interface */ LOXILIGHT_LAG_MODE_SET /* LAG Interface mode set*/ LOXILIGHT_IPSEC_POLICY_ADD /* IPSEC policy add */ LOXILIGHT_IPSEC_POLICY_DEL /* IPSEC policy del */ LOXILIGHT_IPSEC_POLICY_SHOW /* IPSEC policy show */ LOXILIGHT_STP_STATE /* STP state from Port state in bridge*/ LOXILIGHT_SDN_VIRT_IF_ADD /* Virtual interface addition from SDN core */ LOXILIGHT_SDN_VIRT_IF_DEL /* Virtual interface deletion from SDN core */ LOXILIGHT_SDN_VIRT_IF_UPDATE /* Virtual interface update */ LOXILIGHT_VIF_SHOW_ALL /* Virtual interface show all */ LOXILIGHT_VIF_SHOW_NAME /* Virtual interface show by name */ LOXILIGHT_MIRROR_ADD /* MIRROR add */ LOXILIGHT_MIRROR_DEL /* MIRROR del */ LOXILIGHT_MIRROR_PORT_ADD /* MIRROR inbound port add */ LOXILIGHT_MIRROR_PORT_DEL /* MIRROR inbound port del */ LOXILIGHT_MIRROR_SHOW /* MIRROR show */ LOXILIGHT_ACL_ADD /* ACL add */ LOXILIGHT_ACL_DEL /* ACL del */ LOXILIGHT_ACL_SHOW /* ACL show */ LOXILIGHT_CT_SHOW /* Connection tracking show */ LOXILIGHT_APPFLOW_SHOW /* Cache flow show */ LOXILIGHT_SERVICE_ECHO LOXILIGHT_SERVICE_SUCCESS LOXILIGHT_SERVICE_ERROR )
const VERSION = 1
version
Variables ¶
var Controller_ip string = "tcp://127.0.0.1:8861"
LOXILIGHT Controller IP주소
var TitleAcl = []string{"UUID", "Filter", "Action", "Statistic"}
var TitleAutoneg = []string{"Interface", "Auto-Neg Mode", "Speed", "Adv Speeds", "Type", "Adv Types", "Oper", "Admin"}
var TitleBreakout = []string{"Interface", "Current Breakout Mode"}
var TitleConntrack = []string{"Date", "Time", "Source IP", "Port", "Destinaion IP", "Port", "Protocol", "Timeout", "Total timeout", "Status", "Statistic[Count:byte]"}
var TitleCounters = []string{"IFACE", "STATE", "RX_OK", "RX_BPS", "RX_UTIL", "RX_ERR", "RX_DRP", "RX_OVR", "TX_OK", "TX_BPS", "TX_UTIL", "TX_ERR", "TX_DRP", "TX_OVR"}
var TitleFdb = []string{"MAC", "VLAN", "VRF", "Interface", "Status"}
var TitleInterfaceBrief = []string{"Ethernet_Interface", "VLAN", "Type", "Mode", "Status", "Reason", "Speed", "Port_Ch#"}
var TitleIpBrief = []string{"Interface", "IP-Address", "OK?", "Method", "Status", "Protocol"}
Title Declare
var TitleNeighborTable = []string{"VRF", "Next hop", "Source MAC", "Destinaion MAC", "Interface", "Is Install", "HW Install"}
var TitleRouteTable = []string{"Host-IP", "Flags", "VRF", "NextHop", "Is Install", "HW Install", "interface"}
var TitleVlanBrief = []string{"Name", "VLAN", "Status", "Ports"}
var TitleVlanDetail = []string{"Name", "VLAN", "VRF", "MAC", "Status", "Address", "Ports"}
var TitleVlanDetail = []string{"VLAN", "Type", "SAID", "MTU", "Parent", "RingNo", "BridgeNo", "Stp", "BrdgMode", "Trans1", "Trans2"}
var TitleVxfdb = []string{"MAC", "VxLAN", "VRF", "Destinaion IP", "VETP id", "Status"}
var TitleVxlanBrief = []string{"VxLAN-Name", "VxLAN-ID", "UIF", "MAC"}
var TitleVxlanDetail = []string{"VxLAN-Name", "VxLAN-ID", "VRF", "Local IP", "UDP port", "UIF", "MAC"}
var title_vlan_detail = []string{"VLAN", "Type", "SAID", "MTU", "Parent", "RingNo", "BridgeNo", "Stp", "BrdgMode", "Trans1", "Trans2"}
Functions ¶
func AclExtract ¶ added in v1.1.3
AclExtract 데이터에서 ACL 부분의 정보를 추출합니다.
func AddAclConfig ¶ added in v1.1.3
AddAclConfig 는 스태틱 라우팅 테이블 엔트리를 추가합니다.
func AddFdbConfig ¶
AddFdbConfig 는 vlan id를 기반으로 L2FDB 주소를 추가합니다.
func AddIpAddressConfig ¶
AddIpAddressConfig 는 인터페이스에 IP 주소를 추가합니다.
func AddIpNeighborConfig ¶
AddIpNeighborConfig 는 스태틱 neighbor정보를 추가합니다.
func AddIpRouteConfig ¶
AddIpRouteConfig 는 스태틱 라우팅 테이블 엔트리를 추가합니다.
func AddIpsecConfig ¶
func AddMirrorPortConfig ¶ added in v1.1.27
AddMirrorPortConfig 는 미러링 포트를 추가합니다.
func AddMirrorRspanConfig ¶ added in v1.1.27
AddMirrorRspanConfig 는 RSPAN미러링 아웃풋 포트 및 설정을 추가합니다.
func AddMirrorSpanConfig ¶ added in v1.1.27
AddMirrorSpanConfig 는 SPAN 미러링 아웃풋 포트 및 설정을 추가합니다.
func AddVlanMember ¶
AddVlanMember은 기 생성된 vlan bridge에 port를 추가합니다.
func AddVxfdbConfig ¶
AddVxfdbConfig 는 vxlan id를 기반으로 L2FDB 주소를 추가합니다.
func AddVxlanBridgeWithVlanID ¶ added in v1.0.11
AddVxlanBridgeWithVlanID는 vxlan을 추가하는 함수입니다.
func AddVxlanBridgeWithoutVlanID ¶ added in v1.0.11
AddVxlanBridgeWithoutVlanID는 vxlan을 추가하는 함수입니다.
func AddVxlanMember ¶
AddVxlanMember는 호스트부분의 vxlan 설정을 추가하는 함수입니다.
func AddVxlanPeer ¶
AddVxlanPeer 는 vxlan의 remote ip 주소를 추가하는 함수입니다.
func ChangeControllerIp ¶ added in v1.1.7
func ChangeControllerIp(url string)
func ChangeHexIpToDec ¶ added in v1.1.10
func CloseConnection ¶
func CloseConnection(sock mangos.Socket)
func ConntrackDetailExtract ¶ added in v1.1.10
func ConntrackExtract ¶ added in v1.1.0
ConntrackExtract는 데이터에서 Conntrack 부분의 정보를 추출합니다.
func ConntrackStatExtract ¶ added in v1.1.13
func DelAclConfig ¶ added in v1.1.3
DelAclConfig 는 스태틱 라우팅 테이블 엔트리를 삭제합니다.
func DelFdbConfig ¶
DelFdbConfig 는 vlan id를 기반으로 L2FDB 주소를 삭제합니다.
func DelIpAddressConfig ¶
DelIpAddressConfig 는 인터페이스에 IP 주소를 삭제합니다.
func DelIpNeighborConfig ¶
DelIpNeighborConfig 는 스태틱 neighbor정보를 삭제합니다.
func DelIpRouteConfig ¶
DelIpRouteConfig 는 스태틱 라우팅 테이블 엔트리를 삭제합니다.
func DelIpsecConfig ¶
func DelMirrorConfig ¶ added in v1.1.27
DelMirrorConfig 는 미러링 아웃풋 포트 및 설정을 삭제합니다.
func DelMirrorPortConfig ¶ added in v1.1.27
DelMirrorPortConfig 는 미러링 포트를 삭제합니다.
func DelVlanMember ¶
DelVlanMember은 기 생성된 vlan bridge에 port를 삭제합니다.
func DelVxfdbConfig ¶
DelVxfdbConfig 는 vxlan id를 기반으로 L2FDB 주소를 삭제합니다.
func DelVxlanMember ¶
DelVxlanMember는 호스트부분의 vxlan 설정을 삭제하는 함수입니다.
func DelVxlanPeer ¶
DelVxlanPeer 는 vxlan의 remote ip 주소를 삭제하는 함수입니다.
func FdbExtract ¶
func GetAclConfig ¶ added in v1.1.3
GetAclConfig 모든 Nat의 정보를 리턴합니다.
func GetConnection ¶
func GetConnectionCheck ¶ added in v1.1.6
func GetConntrackConfig ¶ added in v1.1.0
GetConntrackConfig는 모든 Conntrack의 정보를 리턴합니다.
func GetFdbVlanConfig ¶
GetFdbVlanConfig 는 vlan에 설정된 L2FDB값을 리턴합니다.
func GetFdbVxlanConfig ¶
GetFdbVxlanConfig 는 Vxlan에 설정된 L2FDB의 값을 리턴합니다.
func GetIpNeighborConfig ¶ added in v1.0.1
func GetIpNeighborOneConfig ¶ added in v1.0.10
func GetIpRouteConfig ¶ added in v1.0.1
func GetIpsecConfig ¶ added in v1.0.1
func GetMirrorConfig ¶ added in v1.1.27
func GetRemovedTagPort ¶
func GetRunningConfig ¶ added in v1.0.1
func GetVifConfig ¶ added in v1.1.27
func GetVifOneConfig ¶ added in v1.1.27
func GetVlanBriefData ¶
GetVlanBriefData는 모든 vlan의 정보를 리턴합니다.
func GetVlanIdConfig ¶
GetVlanIdConfig 는 한 개의 vlan의 자세한 정보를 리턴합니다.
func GetVxFdbConfig ¶
GetVxFdbConfig 는 VxLAN관련 모든 FDB데이터를 리턴합니다.
func GetVxlanBriefConfig ¶
GetVxlanBriefConfig 는 설정된 간략한 VxLAN 정보를 리턴합니다.
func GetVxlanIdConfig ¶
GetVxlanIdConfig 는 자세한 vxlan 정보를 리턴합니다.
func IpaddressInVifExtract ¶ added in v1.1.27
func IpaddressInVlanExtract ¶
func IsValidUUID ¶ added in v1.1.11
func MakeAclMessage ¶ added in v1.1.3
func MirrorExtract ¶ added in v1.1.27
func NeighborExtract ¶ added in v1.0.10
func OldSendMessage ¶ added in v1.3.0
OldSendMessage 는 req로 nanomsg를 전송 했을 경우입니다.
func ParseAclConfig ¶ added in v1.1.3
ParseAclConfig 라인별로 추출이 가능하게 도와줍니다.
func ParseConntrackData ¶ added in v1.1.0
ParseConntrackData은 라인별로 추출이 가능하게 도와줍니다.
func ParseFdbConfig ¶ added in v1.0.1
func ParseFdbVlanConfig ¶ added in v1.0.4
func ParseFdbVxlanConfig ¶ added in v1.0.4
func ParseIPBothPrefix ¶
func ParseIpNeighborConfig ¶ added in v1.0.10
func ParseIpRouteConfig ¶ added in v1.0.10
func ParseMirrorConfig ¶ added in v1.1.27
func ParseVlanBridgeData ¶ added in v1.0.1
func ParseVlanIdConfig ¶ added in v1.0.4
func ParseVxFdbConfig ¶ added in v1.0.1
func ParseVxlanBriefConfig ¶ added in v1.1.0
func ParseVxlanIdConfig ¶ added in v1.0.2
func RouteExtract ¶
func RouteOnlyExtract ¶
func SendMessage ¶
func ShowAclConfig ¶ added in v1.1.3
func ShowAclConfig()
ShowAclConfig 는 모든 Nat 의 간략한 정보를 CLI 테이블로 변환하여 보여줍니다.
func ShowConntrackConfig ¶ added in v1.1.0
func ShowConntrackConfig()
ShowConntrackConfig 는 모든 Conntrack 의 간략한 정보를 CLI 테이블로 변환하여 보여줍니다.
func ShowFdbVlanConfig ¶
func ShowFdbVlanConfig(vlan_id int)
ShowFdbVlanConfig는 vlan에 설정된 L2FDB의 값을 보여줍니다.
func ShowFdbVxlanConfig ¶
func ShowFdbVxlanConfig(vxlan_id int)
ShowFdbVxlanConfig는 vxlan에 설정된 L2FDB의 값을 보여줍니다.
func ShowInterfaceAllCounter ¶
func ShowInterfaceAllCounter()
ShowInterfaceAllCounter는 현재 모든 인터페이스의 통계 카운트를 보여줍니다. 현재는 사용하지 못합니다.
func ShowInterfaceAllStatus ¶
func ShowInterfaceAllStatus()
ShowInterfaceAllStatus 는 현재 모든 인터페이스의 간략한 정보를 보여줍니다. 현재는 사용하지 못합니다.
func ShowInterfaceOneCounter ¶
func ShowInterfaceOneCounter(interface_name string)
ShowInterfaceOneCounter는 한 개의 인터페이스의 통계 카운트를 보여줍니다. 현재는 사용하지 못합니다.
func ShowInterfaceOneStatus ¶
func ShowInterfaceOneStatus(interface_name string)
ShowInterfaceOneStatus 는 한 개의 인터페이스의 간략한 정보를 보여줍니다. 현재는 사용하지 못합니다.
func ShowIpNeighborConfig ¶
func ShowIpNeighborConfig(interface_name string)
ShowIpNeighborConfig 는 모든 neighbor정보 혹은 한개의 인터페이스에 대한 neighbor정보를 호출합니다.
func ShowIpRouteConfig ¶
func ShowIpRouteConfig(interface_name string)
ShowIpRouteConfig 는 모든 routing table을 호출합니다.
func ShowIpsecConfig ¶
func ShowIpsecConfig()
func ShowStartupConfig ¶
func ShowStartupConfig()
func ShowVersion ¶
func ShowVersion()
func ShowVlanBriefConfig ¶
func ShowVlanBriefConfig()
ShowVlanBriefConfig 는 모든 vlan 의 간략한 정보를 보여줍니다.
func ShowVlanIdConfig ¶
func ShowVlanIdConfig(vlan_id int)
ShowVlanIdConfig 는 한 개의 vlan 의 자세한 정보를 보여줍니다.
func ShowVxlanBriefConfig ¶
func ShowVxlanBriefConfig()
ShowVxlanBriefConfig 는 설정된 간략한 vxlan 정보를 보여줍니다.
func ShowVxlanIdConfig ¶
func ShowVxlanIdConfig(vxlan_id int)
ShowVxlanIdConfig 는 자세한 vxlan 정보를 보여줍니다.
func ValidateIPBoth ¶
func ValidateIsV4 ¶
func ValidateVlanID ¶
func ValidateVxlanID ¶
func VifExtract ¶ added in v1.1.27
func VlanExtract ¶
func VlanPortDetailExtract ¶
func VlanPortExtract ¶
func VxFdbExtract ¶
func VxlanExtract ¶
Types ¶
type ACLFilterModel ¶ added in v1.1.10
type ACLFilterModel struct { EthernetType string `json:"ethernet_type,omitempty"` DestinationIp string `json:"destination_ip,omitempty"` SourceIp string `json:"source_ip,omitempty"` DestinationPort int `json:"destination_port,omitempty"` SourcePort int `json:"source_port,omitempty"` Protocol int `json:"protocol,omitempty"` Port int `json:"port,omitempty"` }
type ACLModel ¶ added in v1.1.0
type ACLModel struct { Filters ACLFilterModel `json:"filters,omitempty"` Actions []ACLValueModel `json:"actions"` }
type ACLReturnModel ¶ added in v1.1.0
type ACLReturnModel struct { UUID string `json:"uuid"` Table string `json:"table_id"` Filters ACLFilterModel `json:"filters"` Actions []ACLValueModel `json:"actions"` Statistic ACLStatisticModel `json:"statistic"` }
type ACLReturnModels ¶ added in v1.1.7
type ACLReturnModels struct {
Attr []ACLReturnModel `json:"attr"`
}
func GetAclModel ¶ added in v1.1.10
func GetAclModel() (ACLReturnModels, error)
GetAclModel 는 필터 스트링을 ACL모델로 변경합니다.
type ACLStatisticModel ¶ added in v1.1.0
type ACLValueModel ¶ added in v1.1.7
type ConfigResetStatusModel ¶ added in v1.1.0
type ConfigResetStatusModel struct {
ResetStatus string `json:"reset_status,omitempty"`
}
type ConntrackModel ¶ added in v1.1.10
type ConntrackModel struct { Date string `json:"date"` Time string `json:"time"` DestinationIp string `json:"destination_ip"` SourceIp string `json:"source_ip"` DestinationPort int `json:"destination_port"` SourcePort int `json:"source_port"` Protocol string `json:"protocol"` Timeout string `json:"timeout"` ExpireTime string `json:"expire_time"` Status string `json:"status"` PacketBtye int `json:"byte"` PacketCount int `json:"count"` }
type ConntrackReturnModel ¶ added in v1.1.10
type ConntrackReturnModel struct {
Attr []ConntrackModel `json:"attr"`
}
func GetConntrackModel ¶ added in v1.1.10
func GetConntrackModel() (ConntrackReturnModel, error)
type ControllerReturnModel ¶ added in v1.1.0
type ControllerReturnModel struct {
Controller_ip string `json:"controller_ip"`
}
type ErrorInner ¶ added in v1.1.0
type ErrorModel ¶ added in v1.1.0
type ErrorModel struct {
Error ErrorInner `json:"error"`
}
type EthernetIpaddressModel ¶ added in v1.1.0
type EthernetMacModel ¶ added in v1.1.0
type EthernetNeighborCLIModel ¶ added in v1.1.0
type EthernetNeighborDeleteModel ¶ added in v1.1.0
type EthernetNeighborDeleteModel struct {
Ip_addr string `json:"ip_addr"`
}
type EthernetNeighborModel ¶ added in v1.1.0
type EthernetNeighborReturnModel ¶ added in v1.1.0
type EthernetNeighborReturnModel struct {
Attr []EthernetNeighborCLIModel `json:"attr"`
}
func GetIpNeighborModel ¶ added in v1.1.0
func GetIpNeighborModel() (EthernetNeighborReturnModel, error)
func GetIpNeighborOneModel ¶ added in v1.1.0
func GetIpNeighborOneModel(interface_name string) (EthernetNeighborReturnModel, error)
type HeartbeatReturnModel ¶ added in v1.1.0
type Hls_idl_byte_hdr ¶
type Hls_idl_byte_hdr struct {
// contains filtered or unexported fields
}
func MakeMessage ¶
func MakeMessage(command uint8, msg string) (Hls_idl_byte_hdr, []byte)
func (Hls_idl_byte_hdr) Byte ¶
func (hdr Hls_idl_byte_hdr) Byte() []byte
type Hls_idl_hdr ¶
type Hls_idl_hdr struct {
// contains filtered or unexported fields
}
func MakeHeader ¶
func MakeHeader(command uint8, msg string) (Hls_idl_hdr, string)
func (Hls_idl_hdr) String ¶
func (hdr Hls_idl_hdr) String() string
type IProuteCLIModel ¶ added in v1.1.0
type IProuteDeleteModel ¶ added in v1.1.0
type IProuteModel ¶ added in v1.1.0
type IProuteReturnModel ¶ added in v1.1.0
type IProuteReturnModel struct {
Attr []IProuteCLIModel `json:"attr"`
}
func GetIPRouteModel ¶ added in v1.1.0
func GetIPRouteModel() (IProuteReturnModel, error)
GetIPRouteModel 은 모든 Routing Table을 struct로 제공합니다.
type InterfaceModel ¶ added in v1.1.0
type InterfaceModel struct {
AdminState string `json:"admin-state"`
}
type InterfaceReturnModel ¶ added in v1.1.0
type InterfaceReturnModel struct { Port string `json:"port"` Attr InterfaceModel `json:"attr"` }
type InvalidFormatError ¶ added in v1.1.0
func (*InvalidFormatError) Error ¶ added in v1.1.0
func (e *InvalidFormatError) Error() string
type IpsecDeleteModel ¶ added in v1.1.0
type IpsecModel ¶ added in v1.1.0
type IpsecModel struct { Source_ip string `json:"source_ip"` Destination_ip string `json:"destination_ip"` Protocol string `json:"protocol"` SPI string `json:"spi"` Direction string `json:"direction"` Reqid string `json:"reqid"` Security_key string `json:"security_key"` Key_length int `json:"key_length"` Interface string `json:"interface"` }
type MissingValueError ¶ added in v1.1.0
type MissingValueError struct {
Field string
}
func (*MissingValueError) Error ¶ added in v1.1.0
func (e *MissingValueError) Error() string
type PingRequestModel ¶ added in v1.1.0
type PingReturnModel ¶ added in v1.1.0
type RouteModel ¶ added in v1.1.0
type RouteModel struct { Cmd string `json:"cmd,omitempty"` IPPrefix string `json:"ip_prefix"` IfName string `json:"ifname,omitempty"` NextHopType string `json:"nexthop_type,omitempty"` NextHop string `json:"nexthop"` MACAddress string `json:"mac_address,omitempty"` Vnid int `json:"vnid,omitempty"` Error_code int `json:"error_code,omitempty"` Error_msg string `json:"error_msg,omitempty"` }
type RouteReturnModel ¶ added in v1.1.0
type RouteReturnModel struct {
Failed []RouteModel `json:"failed,omitempty"`
}
type TunnelDecapModel ¶ added in v1.1.0
type TunnelDecapModel struct {
IPAddr string `json:"ip_addr"`
}
type TunnelDecapReturnModel ¶ added in v1.1.0
type TunnelDecapReturnModel struct { TunnelType string `json:"tunnel_type"` Attr TunnelDecapModel `json:"attr"` }
type VifModel ¶ added in v1.1.27
type VifModel struct { IfName string `json:"if_name"` Mac string `json:"mac_addr"` Port int `json:"port"` Flags int `json:"flags"` Status string `json:"status"` Rvid int `json:"rvid"` IPPrefix []string `json:"ip_addr,omitempty"` }
func GetVifOneModel ¶ added in v1.1.27
type VifReturnModel ¶ added in v1.1.27
type VifReturnModel struct {
Attr []VifModel `json:"attr"`
}
func GetVifModel ¶ added in v1.1.27
func GetVifModel() (VifReturnModel, error)
type VlanFDBModel ¶ added in v1.1.0
type VlanFDBReturnModel ¶ added in v1.1.0
type VlanFDBReturnModel struct {
Attr []VlanFDBModel `json:"attr"`
}
func GetFdbModel ¶ added in v1.1.0
func GetFdbModel() (VlanFDBReturn VlanFDBReturnModel, err error)
GetFdbModel 는 모든 L2FDB의 데이터를 모델 형식으로 리턴합니다.
func GetFdbVlanModel ¶ added in v1.1.39
func GetFdbVlanModel(VlanId int) (VlanFDBReturn VlanFDBReturnModel, err error)
GetFdbVlanModel 는 특정 VLAN의 L2FDB의 데이터를 모델 형식으로 리턴합니다.
type VlanMemberModel ¶ added in v1.1.0
type VlanMemberModel struct {
Tagging string `json:"tagging_mode"`
}
type VlanMemberReturnModel ¶ added in v1.1.0
type VlanMemberReturnModel struct { VlanID int `json:"vlan_id"` If_name string `json:"if_name"` Attr VlanMemberModel `json:"attr"` }
type VlanMembersModel ¶ added in v1.1.0
type VlanMembersReturnModel ¶ added in v1.1.0
type VlanMembersReturnModel struct { VlanID int `json:"vlan_id"` Attr []VlanMembersModel `json:"attr"` }
type VlanModel ¶ added in v1.1.0
type VlanModel struct { VlanName string `json:"vlan_name"` VlanID int `json:"vlan_id"` Vrf int `json:"vrf"` Mac string `json:"mac_addr"` IPPrefix []string `json:"ip_addr,omitempty"` Member []VlanMembersModel `json:"member,omitempty"` }
func GetVlanIdModel ¶ added in v1.1.0
type VlanNeighborReturnModel ¶ added in v1.1.0
type VlanNeighborsModel ¶ added in v1.1.0
type VlanNeighborsModel struct {
Ip_addr string `json:"ip_addr"`
}
type VlanNeighborsReturnModel ¶ added in v1.1.0
type VlanNeighborsReturnModel struct { VlanID int `json:"vlan_id"` Attr []VlanNeighborsModel `json:"attr"` }
type VlanReturnModel ¶ added in v1.1.0
type VlansPerVnetModel ¶ added in v1.1.0
type VlansPerVnetReturnModel ¶ added in v1.1.0
type VlansPerVnetReturnModel struct { Vnet_id string `json:"vnet_id,omitempty"` Attr []VlansPerVnetModel `json:"attr"` }
type VlansReturnModel ¶ added in v1.1.0
type VlansReturnModel struct {
Attr []VlanModel `json:"attr"`
}
func GetVlanIdBriefModel ¶ added in v1.1.0
func GetVlanIdBriefModel() (VlansReturnModel, error)
GetVlanIdModel 은 Vlan에 대한 내용을 Model로 정리해서 제공합니다.
type VnetReturnModel ¶ added in v1.1.0
type VxlanBridgesModel ¶ added in v1.1.0
type VxlanFDBModel ¶ added in v1.1.0
type VxlanFDBReturnModel ¶ added in v1.1.0
type VxlanFDBReturnModel struct {
Attr []VxlanFDBModel `json:"attr"`
}
func GetFdbVxlanModel ¶ added in v1.1.39
func GetFdbVxlanModel(vxlan_id int) (VxlanFDBReturnModel, error)
GetFdbVxlanModel 는 Vxlan에 설정된 L2FDB의 모델을 리턴합니다.
func GetVxFdbModel ¶ added in v1.1.0
func GetVxFdbModel() (VxlanFDBReturnModel, error)
GetVxFdbModel 는 VxLAN관련 모든 FDB데이터를 모델 형식으로 리턴합니다.
type VxlanMACModel ¶ added in v1.1.0
type VxlanMemberModel ¶ added in v1.1.0
type VxlanModel ¶ added in v1.1.0
type VxlanModel struct { VxlanName string `json:"vxlan_name"` VxlanID int `json:"vxlan_id"` Vrf int `json:"vrf"` LocalIP string `json:"local_ip_addr"` Udp string `json:"udp"` Uif string `json:"uif"` Mac string `json:"mac_addr"` }
func GetVxlanIdModel ¶ added in v1.1.0
func GetVxlanIdModel(vxlan_id int) (VxlanModel, error)
GetVxlanIdConfig 는 1개의 vxlan 정보를 모델로 리턴합니다.
type VxlanPeerModel ¶ added in v1.1.0
type VxlanPeerModel struct {
PeerIP string `json:"peer_ip"`
}
type VxlanReturnModel ¶ added in v1.1.0
type VxlanReturnModel struct {
Attr []VxlanModel `json:"attr"`
}
func GetVxlanBriefModel ¶ added in v1.1.0
func GetVxlanBriefModel() (VxlanReturnModel, error)
GetVxlanBriefModel 는 설정된 간략한 VxLAN 정보를 모델로 리턴합니다.