Hybrid ICN (hICN) plugin  v21.06-rc0-4-g18fa668
strategyImpl.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2019 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
28 #ifndef strategyImpl_h
29 #define strategyImpl_h
30 
31 #include <hicn/core/message.h>
32 #include <hicn/core/numberSet.h>
33 
34 struct strategy_impl;
35 typedef struct strategy_impl StrategyImpl;
36 
52 struct strategy_impl {
53  void *context;
54  void (*receiveObject)(StrategyImpl *strategy, const NumberSet *egressId,
55  const Message *objectMessage, Ticks pitEntryCreation,
56  Ticks objReception);
57  void (*onTimeout)(StrategyImpl *strategy, const NumberSet *egressId);
58  NumberSet *(*lookupNexthop)(StrategyImpl *strategy,
59 #ifdef WITH_POLICY
60  NumberSet * nexthops,
61 #endif /* WITH_POLICY */
62  const Message *interestMessage);
63 #ifndef WITH_POLICY
64  NumberSet *(*returnNexthops)(StrategyImpl *strategy);
65  unsigned (*countNexthops)(StrategyImpl *strategy);
66 #endif /* ! WITH_POLICY */
67  void (*addNexthop)(StrategyImpl *strategy, unsigned connectionId);
68  void (*removeNexthop)(StrategyImpl *strategy, unsigned connectionId);
69  void (*destroy)(StrategyImpl **strategyPtr);
70  strategy_type (*getStrategy)(StrategyImpl *strategy);
71 };
72 
73 #endif // strategyImpl_h
strategy_impl
Definition: strategyImpl.h:52
message.h
Message is the unit of forwarding, i.e. the packets being switched.