~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to tools/flask/libflask/include/libflask.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 *  Authors:  Michael LeMay, <mdlemay@epoch.ncsc.mil>
 
4
 *            George Coker, <gscoker@alpha.ncsc.mil>
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License version 2,
 
8
 *  as published by the Free Software Foundation.
 
9
 */
 
10
 
 
11
#ifndef __LIBFLASK_H__
 
12
#define __LIBFLASK_H__
 
13
 
 
14
#include <stdint.h>
 
15
#include <xen/xen.h>
 
16
#include <xen/xsm/flask_op.h>
 
17
 
 
18
int flask_load(int xc_handle, char *buf, uint32_t size);
 
19
int flask_context_to_sid(int xc_handle, char *buf, uint32_t size, uint32_t *sid);
 
20
int flask_sid_to_context(int xc_handle, int sid, char *buf, uint32_t size);
 
21
int flask_getenforce(int xc_handle);
 
22
int flask_setenforce(int xc_handle, int mode);
 
23
int flask_add_pirq(int xc_handle, unsigned int pirq, char *scontext);
 
24
int flask_add_ioport(int xc_handle, unsigned long low, unsigned long high,
 
25
                      char *scontext);
 
26
int flask_add_iomem(int xc_handle, unsigned long low, unsigned long high,
 
27
                     char *scontext);
 
28
int flask_add_device(int xc_handle, unsigned long device, char *scontext);
 
29
int flask_del_pirq(int xc_handle, unsigned int pirq);
 
30
int flask_del_ioport(int xc_handle, unsigned long low, unsigned long high);
 
31
int flask_del_iomem(int xc_handle, unsigned long low, unsigned long high);
 
32
int flask_del_device(int xc_handle, unsigned long device);
 
33
int flask_access(int xc_handle, const char *scon, const char *tcon,
 
34
                  u_int16_t tclass, u_int32_t req,
 
35
                  u_int32_t *allowed, u_int32_t *decided,
 
36
                  u_int32_t *auditallow, u_int32_t *auditdeny,
 
37
                  u_int32_t *seqno);
 
38
int flask_avc_cachestats(int xc_handle, char *buf, int size);
 
39
int flask_policyvers(int xc_handle, char *buf, int size);
 
40
int flask_avc_hashstats(int xc_handle, char *buf, int size);
 
41
int flask_getavc_threshold(int xc_handle);
 
42
int flask_setavc_threshold(int xc_handle, int threshold);
 
43
#define flask_add_single_ioport(x, l, s) flask_add_ioport(x, l, l, s)
 
44
#define flask_add_single_iomem(x, l, s) flask_add_iomem(x, l, l, s)
 
45
#define flask_del_single_ioport(x, l) flask_del_ioport(x, l, l)
 
46
#define flask_del_single_iomem(x, l) flask_del_iomem(x, l, l);
 
47
 
 
48
#define OCON_PIRQ_STR   "pirq"
 
49
#define OCON_IOPORT_STR "ioport"
 
50
#define OCON_IOMEM_STR  "iomem"
 
51
#define OCON_DEVICE_STR "pcidevice"
 
52
#define INITCONTEXTLEN  256
 
53
#endif /* __LIBFLASK_H__ */