L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
Switch_factory Class Reference

The IPC interface for creating ports. More...

+ Inheritance diagram for Switch_factory:
+ Collaboration diagram for Switch_factory:

Public Member Functions

long op_create (L4::Factory::Rights, L4::Ipc::Cap< void > &res, l4_umword_t type, L4::Ipc::Varg_list_ref va)
 Handle factory protocol.
 
- Public Member Functions inherited from L4::Epiface_t0< RPC_IFACE, BASE >
Type_info::Demand get_buffer_demand () const
 Get the server-side buffer demand based in IFACE.
 
Cap< RPC_IFACE > obj_cap () const
 Get the (typed) capability to this object.
 
- Public Member Functions inherited from L4::Epiface
 Epiface ()
 Make a server object.
 
virtual ~Epiface ()=0
 Destroy the object.
 
Stored_cap obj_cap () const
 Get the capability to the kernel object belonging to this object.
 
Server_ifaceserver_iface () const
 Get pointer to server interface at which the object is currently registered.
 
int set_server (Server_iface *srv, Cap< void > cap, bool managed=false)
 Set server registration info for the object.
 
void set_obj_cap (Cap< void > const &cap)
 Deprecated server registration function.
 

Additional Inherited Members

- Public Types inherited from L4::Epiface_t0< RPC_IFACE, BASE >
typedef RPC_IFACE Interface
 Data type of the IPC interface definition.
 
- Public Types inherited from L4::Epiface
typedef Ipc_svr::Server_iface Server_iface
 Type for abstract server interface.
 
typedef Ipc_svr::Server_iface::Demand Demand
 Type for server-side receive buffer demand.
 

Detailed Description

The IPC interface for creating ports.

The Switch factory provides an IPC interface to create ports. Ports are the only option for a client to communicate with the switch and, thus, with other network devices.

The Switch_factory gets constructed when the net switch application gets started. It thereafter gets registered on the switch's server to serve IPC create calls.

Definition at line 93 of file main.cc.

Member Function Documentation

◆ op_create()

long Switch_factory::op_create ( L4::Factory::Rights  ,
L4::Ipc::Cap< void > &  res,
l4_umword_t  type,
L4::Ipc::Varg_list_ref  va 
)
inline

Handle factory protocol.

This function is invoked after an incoming factory::create request and creates a new port if possible.

Definition at line 396 of file main.cc.

References Virtio_switch::add_monitor_port(), Virtio_switch::add_port(), L4::Ipc::Varg::is_of(), L4_CAP_FPAGE_RWSD, L4_EINVAL, L4_ENOMEM, L4_EOK, L4::Ipc::make_cap(), and Virtio_switch::port_available().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: