Documentation ¶
Overview ¶
Copyright 2017 Politecnico di Torino
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Politecnico di Torino ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Politecnico di Torino ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Politecnico di Torino ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func ExternalInterfacePrint(externalInterface ExternalInterface)
- func ExternalInterfacesListPrint(externalInterfacesList map[string]ExternalInterface)
- func LinkListPrint(linkList map[string]Link)
- func LinkPrint(link Link)
- func ModuleListPrint(moduleList map[string]Module)
- func ModulePrint(module Module)
- func PrintFirstNLines(s string, nlines int)
- func TableEntryPrint(tableEntry TableEntry)
- func TablePrint(table map[string]TableEntry)
- type Client
- func (d *Client) ControllerPOST(addr string) error
- func (d *Client) ExternalInterfacesListGET() (error, map[string]ExternalInterface)
- func (d *Client) GetController() *Controller
- func (d *Client) Init(baseUrl string) error
- func (d *Client) LinkDELETE(linkId string) (error, Link)
- func (d *Client) LinkGET(linkId string) (error, Link)
- func (d *Client) LinkListGet() (error, map[string]Link)
- func (d *Client) LinkPOST(from string, to string) (error, Link)
- func (d *Client) ModuleDELETE(moduleId string) (error, Module)
- func (d *Client) ModuleGET(moduleId string) (error, Module)
- func (d *Client) ModuleListGET() (error, map[string]Module)
- func (d *Client) ModulePOST(moduleType string, displayName string, code string) (error, Module)
- func (d *Client) TableEntryDELETE(moduleId string, tableId string, entryId string) (error, TableEntry)
- func (d *Client) TableEntryGET(moduleId string, tableId string, entryId string) (error, TableEntry)
- func (d *Client) TableEntryPOST(moduleId string, tableId string, entryId string, entryValue string) (error, TableEntry)
- func (d *Client) TableEntryPUT(moduleId string, tableId string, entryId string, entryValue string) (error, TableEntry)
- func (d *Client) TableGET(moduleId string, tableId string) (error, map[string]TableEntry)
- func (d *Client) TableListGET(moduleId string) (error, map[string]string)
- type Controller
- type ExternalInterface
- type Link
- type Module
- type PacketIn
- type PacketInMd
- type PacketOut
- type SlowPathCallBack
- type TableEntry
Constants ¶
const ( INGRESS = 0 EGRESS = 1 )
Variables ¶
This section is empty.
Functions ¶
func ExternalInterfacePrint ¶
func ExternalInterfacePrint(externalInterface ExternalInterface)
func ExternalInterfacesListPrint ¶
func ExternalInterfacesListPrint(externalInterfacesList map[string]ExternalInterface)
func LinkListPrint ¶
func ModuleListPrint ¶
func ModulePrint ¶
func ModulePrint(module Module)
func PrintFirstNLines ¶
func TableEntryPrint ¶
func TableEntryPrint(tableEntry TableEntry)
func TablePrint ¶
func TablePrint(table map[string]TableEntry)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ControllerPOST ¶
func (*Client) ExternalInterfacesListGET ¶
func (d *Client) ExternalInterfacesListGET() (error, map[string]ExternalInterface)
it returns map[iface-name]iface provided by hover eg. map[veth1] = iface {Name:veth1, Id:42}
func (*Client) GetController ¶
func (d *Client) GetController() *Controller
func (*Client) ModuleListGET ¶
it returns map[module-id]module provided by hover eg. map["m:12345ab"] = module {}
func (*Client) ModulePOST ¶
ModulePOST(d, "bpf", "myModuleName", l2switch.Modulename)
func (*Client) TableEntryDELETE ¶
func (*Client) TableEntryGET ¶
func (*Client) TableEntryPOST ¶
func (*Client) TableEntryPUT ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) Init ¶
func (c *Controller) Init(listenaddr string) (err error)
func (*Controller) RegisterCallBack ¶
func (c *Controller) RegisterCallBack(id uint16, cb SlowPathCallBack) (err error)
func (*Controller) Run ¶
func (c *Controller) Run() (err error)
func (*Controller) SendPacketOut ¶
func (c *Controller) SendPacketOut(p *PacketOut) (err error)
type ExternalInterface ¶
type PacketIn ¶
type PacketIn struct { Md PacketInMd Data []byte }