source: trunk/packages/xen-common/xen-common/xen/acm/acm_null_hooks.c @ 77

Last change on this file since 77 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

File size: 2.1 KB
Line 
1/****************************************************************
2 * acm_null_hooks.c
3 *
4 * Copyright (C) 2005 IBM Corporation
5 *
6 * Author:
7 * Reiner Sailer <sailer@watson.ibm.com>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation, version 2 of the
12 * License.
13 */
14
15#include <acm/acm_hooks.h>
16
17static int
18null_init_domain_ssid(void **ssid, ssidref_t ssidref)
19{
20    return ACM_OK;
21}
22
23static void
24null_free_domain_ssid(void *ssid)
25{
26    return;
27}
28
29static int
30null_dump_binary_policy(u8 *buf, u32 buf_size)
31{ 
32    return 0;
33}
34
35static int
36null_test_binary_policy(u8 *buf, u32 buf_size, int is_bootpolicy,
37                        struct acm_sized_buffer *errors)
38{
39    return ACM_OK;
40}
41
42static int
43null_set_binary_policy(u8 *buf, u32 buf_size)
44{ 
45    return ACM_OK;
46}
47 
48static int 
49null_dump_stats(u8 *buf, u16 buf_size)
50{
51    /* no stats for NULL policy */
52    return 0;
53}
54
55static int
56null_dump_ssid_types(ssidref_t ssidref, u8 *buffer, u16 buf_size)
57{
58    /* no types */
59    return 0;
60}
61
62
63/* now define the hook structure similarly to LSM */
64struct acm_operations acm_null_ops = {
65    .init_domain_ssid = null_init_domain_ssid,
66    .free_domain_ssid = null_free_domain_ssid,
67    .dump_binary_policy = null_dump_binary_policy,
68    .test_binary_policy = null_test_binary_policy,
69    .set_binary_policy = null_set_binary_policy,
70    .dump_statistics = null_dump_stats,
71    .dump_ssid_types = null_dump_ssid_types,
72    /* domain management control hooks */
73    .domain_create = NULL,
74    .domain_destroy = NULL,
75    /* event channel control hooks */
76    .pre_eventchannel_unbound = NULL,
77    .fail_eventchannel_unbound = NULL,
78    .pre_eventchannel_interdomain = NULL,
79    .fail_eventchannel_interdomain = NULL,
80    /* grant table control hooks */
81    .pre_grant_map_ref = NULL,
82    .fail_grant_map_ref = NULL,
83    .pre_grant_setup = NULL,
84    .fail_grant_setup = NULL
85};
86
87/*
88 * Local variables:
89 * mode: C
90 * c-set-style: "BSD"
91 * c-basic-offset: 4
92 * tab-width: 4
93 * indent-tabs-mode: nil
94 * End:
95 */
Note: See TracBrowser for help on using the repository browser.