NewMadeleine

Documentation

« back to PM2 home.
nm_strategy.h
Go to the documentation of this file.
1/*
2 * NewMadeleine
3 * Copyright (C) 2006-2026 (see AUTHORS file)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 */
15
16#ifndef NM_STRATEGY_H
17#define NM_STRATEGY_H
18
22{
29
31 void (*init)(puk_context_t p_context);
32
34 void (*close)(puk_context_t p_context);
35
37 nm_drv_vect_t (*connect)(void*_status, nm_gate_t p_gate, nm_drv_vect_t p_available_drvs);
38
43 void (*schedule)(puk_context_t p_context);
44
46 void (*proto)(void*_status, nm_gate_t p_gate, struct nm_pkt_wrap_s*p_pw, const void*ptr, nm_len_t len);
47};
48
49PUK_IFACE_TYPE(NewMad_Strategy, struct nm_strategy_iface_s);
50
51#endif /* NM_STRATEGY_H */
nm_len_t len
Definition nm_data.h:1007
static nm_gate_t p_gate
PUK_IFACE_TYPE(NewMad_Strategy, struct nm_strategy_iface_s)
uint64_t nm_len_t
data length used by nmad
Definition nm_types.h:68
Connection to another process.
Definition nm_gate.h:109
Internal packet wrapper.
strategy capabilities, not supposed to be used by nmad core, but may be usefull for the user to check...
Definition nm_strategy.h:26
int supports_priorities
whether the strategy supports priority-based scheduling
Definition nm_strategy.h:27
Driver for 'NewMad_Strategy' component interface.
Definition nm_strategy.h:22
nm_drv_vect_t(* connect)(void *_status, nm_gate_t p_gate, nm_drv_vect_t p_available_drvs)
selects the drivers to actually use, among the list of available drivers for the given gate
Definition nm_strategy.h:37
void(* proto)(void *_status, nm_gate_t p_gate, struct nm_pkt_wrap_s *p_pw, const void *ptr, nm_len_t len)
process strat private protocol
Definition nm_strategy.h:46
void(* close)(puk_context_t p_context)
close the strategy context
Definition nm_strategy.h:34
void(* init)(puk_context_t p_context)
init the strategy context (shared across instances)
Definition nm_strategy.h:31
struct nm_strategy_iface_s::nm_strategy_capabilities_s capabilities
void(* schedule)(puk_context_t p_context)
schedule all events:
Definition nm_strategy.h:43