2008-11-17 18:29:00 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
2008-03-05 09:52:00 -05:00
|
|
|
//
|
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
//
|
2008-11-17 18:29:00 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
2008-03-05 09:52:00 -05:00
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
///
|
|
|
|
// Microsoft Research, Cambridge
|
|
|
|
//
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace NetStack
|
|
|
|
{
|
|
|
|
namespace Runtime
|
|
|
|
{
|
2008-11-17 18:29:00 -05:00
|
|
|
///
|
|
|
|
// All the networking stack modules must implement
|
|
|
|
// this interface. The runtime uses this interface
|
|
|
|
// to manage the different modules.
|
|
|
|
//
|
2008-03-05 09:52:00 -05:00
|
|
|
public interface INetModule
|
|
|
|
{
|
|
|
|
// get the module's name
|
|
|
|
string ModuleName { get; }
|
|
|
|
|
|
|
|
// get the modules version
|
|
|
|
ushort ModuleVersion { get; }
|
|
|
|
|
|
|
|
// an initializer for new protocols.
|
|
|
|
// the protocol receives the parameters
|
|
|
|
// from the configuration file (string based)
|
|
|
|
// NOTICE: should not rely on a specific initialization
|
|
|
|
// order, wait to StartModule invocation for inter-module
|
|
|
|
// operations!
|
|
|
|
bool Initialize(ProtocolParams parameters);
|
|
|
|
|
|
|
|
|
|
|
|
// start module activity, module specific.
|
|
|
|
// it is called by the runtime after ALL protocols
|
|
|
|
// are initialized and the host configuration is valid!
|
|
|
|
bool StartModule();
|
|
|
|
|
|
|
|
// stop module activity, module specific.
|
|
|
|
// it is called by the runtime
|
|
|
|
bool StopModule();
|
|
|
|
|
|
|
|
// destroy module, free unmanaged resources if any.
|
|
|
|
// it is called by the runtime
|
|
|
|
bool DestroyModule();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|