# A Comprehensive Survey on Knowledge-Defined Networking
## 5 Control Plane
### Interfaces and Sub-Planes Connected with the Controller
#### 5.2.1 Northbound Interface
SFNet is such an API that provides high-level primitives with which network applications can request resource reservations and verify network status using JSON messages, where access is granted based on resource availability [281]. TinyNBI is a northbound interface proposed to address portability issues in different OpenFlow versions using a language-independent low-level interface. In tinyNBI, there are abstractions defining capabilities, configuration, and statistics that represent features of OpenFlow versions, where missing abstractions are handled either by offloading or providing an error message [282]. Finally, there are a set of programming languages that can be used to write northbound APIs in order to achieve the objectives of the northbound interface specified earlier. A high-level programming language can be used to transfer application requirements into packet forwarding rules. Common configuration languages such as Command Line Interface (CLI) offer primitive abstractions for hardware configurations. New high-level languages to interface with the controller that have emerged for configuring using the CLI are error-prone and require a lot of effort. A programming language for KDN can be used to achieve several high-level tasks such as flow installation using either reactive or proactive approaches, static or dynamic policy definition, and network abstractions such as flow matching, security, traffic engineering, etc. Flow-based Management Language (FML) is the very first KDN-based programming language, known earlier as Flow-based Security Language (FSL), which is a high-level declarative policy language based on logic programming [283]. This language allows the writing of policies and provides abstractions to allow or deny flows, redirect flows to pass through a given host, and specify flow bandwidth. Nettle, being one of the early programming languages for KDN, supports event-based and time-varying operations, allowing it to create dynamic policies that are based on functional reactive programming [284]. Procera, a KDN programming language, is also based on functional reactive programming, which is an extension of Nettle, which has a set of abstract data types and signal functions to describe policies by applying windowed histories to events [285]. Frenetic is the programming language from which most of the current KDN programming languages have been derived. It has a functional reactive combinator library to describe high-level packet forwarding policies and a Structured Query Language (SQL)-like language for classifying and aggregating traffic of the network [286]. Kinetic is a KDN programming language evolved from Frenetic, which expresses policies in terms of finite state machines, where states represent distinct forwarding behaviors and events trigger transitions between the states [287]. It can encode a generic finite state machine that is applied to a packet group, where each group has a separate state machine instance. PonderFlow is an extension of Ponder language designed for specifying policies for OpenFlow-based networks that also provides access control and implements authorizations and obligations. Obligations in PonderFlow define what actions are to be performed by the controller when certain events occur in the network [288]. Maple is a programming language consisting of an optimizer and a scheduler, where the optimizer uses a trace tree data structure to store the invocation of the algorithm on a particular packet and then generalizes rules in the flow table, whereas the scheduler applies parallelism on servers binding the controller's thread to a client switch [289]. Merlin is a network programming language derived from Frenetic that has been designed to implement network policies and also provides mechanisms to check whether sub-policies violate global constraints or not. Merlin also provides constructs to provide bandwidth limits and guarantees [290]. Table 5 summarizes the details of programming languages that can be used to achieve high-level tasks in KDN.