Subversion Repositories HelenOS

Rev

Rev 3901 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3901 Rev 3912
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (c) 2008 Lukas Mejdrech
2
 * Copyright (c) 2009 Lukas Mejdrech
3
 * All rights reserved.
3
 * All rights reserved.
4
 *
4
 *
5
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
6
 * modification, are permitted provided that the following conditions
7
 * are met:
7
 * are met:
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
/** @addtogroup net
29
/** @addtogroup packet
30
 *  @{
30
 *  @{
31
 */
31
 */
32
 
32
 
33
/** @file
33
/** @file
-
 
34
 *  Packet server.
-
 
35
 *  The hosting module has to be compiled with both the packet.c and the packet_server.c source files.
-
 
36
 *  To function correctly, initialization of the packet map by the pm_init() function has to happen at the first place.
-
 
37
 *  Then the packet messages have to be processed by the packet_server_message() function.
-
 
38
 *  The packet map should be released by the pm_destroy() function during the module termination.
-
 
39
 *  @see IS_NET_PACKET_MESSAGE()
34
 */
40
 */
35
 
41
 
36
#ifndef __NET_PACKET_SERVER_H__
42
#ifndef __NET_PACKET_SERVER_H__
37
#define __NET_PACKET_SERVER_H__
43
#define __NET_PACKET_SERVER_H__
38
 
44
 
39
#include <ipc/ipc.h>
45
#include <ipc/ipc.h>
40
 
46
 
-
 
47
/** Processes the packet server message.
-
 
48
 *  @param callid The message identifier. Input parameter.
-
 
49
 *  @param call The message parameters. Input parameter.
-
 
50
 *  @param answer The message answer parameters. Output parameter.
-
 
51
 *  @param answer_count The last parameter for the actual answer in the answer parameter. Output parameter.
-
 
52
 *  \todo all possible message returns?
-
 
53
 *  @returns EOK on success.
-
 
54
 *  @returns ENOTSUP if the message is not known.
-
 
55
 */
41
int packet_server_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count );
56
int packet_server_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count );
42
 
57
 
43
#endif
58
#endif
44
 
59
 
45
/** @}
60
/** @}