aboutsummaryrefslogtreecommitdiffstats
path: root/docs/developer/extras/strongswan.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/developer/extras/strongswan.rst')
0 files changed, 0 insertions, 0 deletions
cial */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
// Package core provides connectivity to VPP via the adapter: sends and receives the messages to/from VPP,
// marshalls/unmarshalls them and forwards them between the client Go channels and the VPP.
//
// The interface_plugin APIs the core exposes is tied to a connection: Connect provides a connection, that cane be
// later used to request an API channel via NewAPIChannel / NewAPIChannelBuffered functions:
//
//	conn, err := govpp.Connect()
//	if err != nil {
//		// handle error!
//	}
//	defer conn.Disconnect()
//
//	ch, err := conn.NewAPIChannel()
//	if err != nil {
//		// handle error!
//	}
//	defer ch.Close()
//
// Note that one application can open only one connection, that can serve multiple API channels.
//
// The API offers two ways of communication with govpp core: using Go channels, or using convenient function
// wrappers over the Go channels. The latter should be sufficient for most of the use cases.
//
// The entry point to the API is the Channel structure, that can be obtained from the existing connection using
// the NewAPIChannel or NewAPIChannelBuffered functions:
//
//	conn, err := govpp.Connect()
//	if err != nil {
//		// handle error!
//	}
//	defer conn.Disconnect()
//
//	ch, err := conn.NewAPIChannel()
//	if err != nil {
//		// handle error!
//	}
//	defer ch.Close()
//
//
// Simple Request-Reply API
//
// The simple version of the API is based on blocking SendRequest / ReceiveReply calls, where a single request
// message is sent  to VPP and a single reply message is filled in when the reply comes from VPP:
//
// 	req := &acl.ACLPluginGetVersion{}
// 	reply := &acl.ACLPluginGetVersionReply{}
//
// 	err := ch.SendRequest(req).ReceiveReply(reply)
// 	// process the reply
//
// Note that if the reply message type that comes from VPP does not match with provided one, you'll get an error.
//
//
// Multipart Reply API
//
// If multiple messages are expected as a reply to a request, SendMultiRequest API must be used:
//
// 	req := &interfaces.SwInterfaceDump{}
// 	reqCtx := ch.SendMultiRequest(req)
//
//	for {
// 		reply := &interfaces.SwInterfaceDetails{}
// 		stop, err := reqCtx.ReceiveReply(reply)
// 		if stop {
// 			break // break out of the loop
//		}
//		// process the reply
// 	}
//
// Note that if the last reply has been already consumed, stop boolean return value is set to true.
// Do not use the message itself if stop is true - it won't be filled with actual data.
//
//
// Go Channels API
//
// The blocking API introduced above may be not sufficient for some management applications that strongly
// rely on usage of Go channels. In this case, the API allows to access the underlying Go channels directly, e.g.
// the following replacement of the SendRequest / ReceiveReply API:
//
// 	req := &acl.ACLPluginGetVersion{}
// 	// send the request to the request go channel
// 	ch.GetRequestChannel <- &api.VppRequest{Message: req}
//
// 	// receive a reply from the reply go channel
// 	vppReply := <-ch.GetReplyChannel
//
// 	// decode the message
// 	reply := &acl.ACLPluginGetVersionReply{}
// 	err := ch.MsgDecoder.DecodeMsg(vppReply.Data, reply)
//
// 	// process the reply
//
//
// Notifications API
//
// to subscribe for receiving of the specified notification messages via provided Go channel, use the
// SubscribeNotification API:
//
// 	// subscribe for specific notification message
//	notifChan := make(chan api.Message, 100)
//	subs, _ := ch.SubscribeNotification(notifChan, interfaces.NewSwInterfaceSetFlags)
//
//	// receive one notification
//	notif := (<-notifChan).(*interfaces.SwInterfaceSetFlags)
//
//	ch.UnsubscribeNotification(subs)
//
// Note that the caller is responsible for creating the Go channel with preferred buffer size. If the channel's
// buffer is full, the notifications will not be delivered into it.
//
package core