summaryrefslogtreecommitdiff
path: root/cesar/bsu/beacon/inc
diff options
context:
space:
mode:
authorlaranjeiro2010-04-06 09:57:20 +0000
committerlaranjeiro2010-04-06 09:57:20 +0000
commitea35ceec611c968bc3ed8104885143eab966a3a6 (patch)
tree38147fcbd06645be23a22407ce87f7086f6255fe /cesar/bsu/beacon/inc
parentf2c3183ced776bd5e3979410846a69f0f804bcb4 (diff)
cesar/beacon: add beacon library, closes #1424
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6874 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/bsu/beacon/inc')
-rw-r--r--cesar/bsu/beacon/inc/misc.h198
-rw-r--r--cesar/bsu/beacon/inc/region.h43
-rw-r--r--cesar/bsu/beacon/inc/schedule.h78
3 files changed, 319 insertions, 0 deletions
diff --git a/cesar/bsu/beacon/inc/misc.h b/cesar/bsu/beacon/inc/misc.h
new file mode 100644
index 0000000000..b968ac85e2
--- /dev/null
+++ b/cesar/bsu/beacon/inc/misc.h
@@ -0,0 +1,198 @@
+#ifndef bsu_beacon_inc_misc_h
+#define bsu_beacon_inc_misc_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2010 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file bsu_beacon/inc/misc.h
+ * \brief Standard bsu_beacon entries.
+ * \ingroup bsu_beacon
+ *
+ * \warn All structures are aligned on 32 bits.
+ */
+
+/** Discover bentry. */
+struct bsu_beacon_bmi_discover_t
+{
+ BITFIELDS_WORD
+ (
+ /** Present. */
+ u32 present:8;,
+ /** TEI. */
+ u32 tei:8;,
+ /** Reserved. */
+ u32 rsvd:16;
+ );
+};
+typedef struct bsu_beacon_bmi_discover_t bsu_beacon_bmi_discover_t;
+
+/** Discover infor bentry. */
+struct bsu_beacon_bmi_discover_info_t
+{
+ BITFIELDS_WORD
+ (
+ /** Present. */
+ u32 present:8;,
+ /** Reserved. */
+ u32 rsvd:24;,
+ /** Discover info data in a word. */
+ u32 info_data;
+ );
+};
+typedef struct bsu_beacon_bmi_discover_info_t bsu_beacon_bmi_discover_info_t;
+
+/** Beacon period start time offset. */
+struct bsu_beacon_bmi_bpsto_t
+{
+ BITFIELDS_WORD
+ (
+ /** Present. */
+ u32 present:8;,
+ /** Beacon period start time offset. */
+ u32 bpsto:24;
+ );
+};
+typedef struct bsu_beacon_bmi_bpsto_t bsu_beacon_bmi_bpsto_t;
+
+/** Encryption key change. */
+struct bsu_beacon_bmi_eks_t
+{
+ BITFIELDS_WORD
+ (
+ /** Present. */
+ u32 present:8;,
+ /** Key change countdown. */
+ u32 kccd:8;,
+ /** Key being changed. */
+ u32 kbc:8;,
+ /** New EKS. */
+ u32 new_eks:8;
+ );
+};
+typedef struct bsu_beacon_bmi_eks_t bsu_beacon_bmi_eks_t;
+
+/** CCo Handover. */
+struct bsu_beacon_bmi_handover_t
+{
+ BITFIELDS_WORD
+ (
+ /** Present. */
+ u32 present:8;,
+ /** Handover countdown. */
+ u32 hcd:8;,
+ /** New CCo TEI. */
+ u32 tei:8;,
+ /** Reserved. */
+ u32 reserved:8;
+ );
+};
+typedef struct bsu_beacon_bmi_handover_t bsu_beacon_bmi_handover_t;
+
+/** Relocation bentry. */
+struct bsu_beacon_bmi_relocation_t
+{
+ BITFIELDS_WORD
+ (
+ /** Present. */
+ u32 present:4;,
+ /** Countdown. */
+ u32 rcd:6;,
+ /** Relocation type. */
+ u32 rlt:1;,
+ /** Leaving group flag. */
+ u32 lgf:1;,
+ /** Relocation offset. */
+ u32 rlo:17;,
+ /** Relocation slot id. */
+ u32 rlslotid:3;
+ );
+};
+typedef struct bsu_beacon_bmi_relocation_t bsu_beacon_bmi_relocation_t;
+
+/** AC Line synchronization countdown. */
+struct bsu_beacon_bmi_aclsc_t
+{
+ BITFIELDS_WORD
+ (
+ /** Present. */
+ u32 present:8;,
+ /** Countdown. */
+ u32 countdown:6;,
+ /** Reserved. */
+ u32 rsvd0:2;,
+ /** Reason code. */
+ u32 reason_code:2;,
+ /** Reserved. */
+ u32 rsvd1:14;
+ );
+};
+typedef struct bsu_beacon_bmi_aclsc_t bsu_beacon_bmi_aclsc_t;
+
+/** Change number of slots. */
+struct bsu_beacon_bmi_change_num_slot_t
+{
+ BITFIELDS_WORD
+ (
+ /** Present. */
+ u32 present:8;,
+ /** NumSlots Change Countdown. */
+ u32 nsccd:6;,
+ /** Reserved. */
+ u32 rsvd0:2;,
+ /** New NumSlot value. */
+ u32 newnumslot:3;,
+ /** Reserved. */
+ u32 rsvd1:13;
+ );
+};
+typedef struct bsu_beacon_bmi_change_num_slot_t
+bsu_beacon_bmi_change_num_slot_t;
+
+/** Change hybrid mode. */
+struct bsu_beacon_bmi_change_hybrid_mode_t
+{
+ BITFIELDS_WORD
+ (
+ /** Present. */
+ u32 present:8;,
+ /** Hybrid mode change countdown. */
+ u32 hmccd:6;,
+ /** New Hybrid mode. */
+ u32 newhm:2;,
+ /** Reserved. */
+ u32 rsvd:16;
+ );
+};
+typedef struct bsu_beacon_bmi_change_hybrid_mode_t
+bsu_beacon_bmi_change_hybrid_mode_t;
+
+/** Change SNID. */
+struct bsu_beacon_bmi_change_snid_t
+{
+ BITFIELDS_WORD
+ (
+ /** Present. */
+ u32 present:8;,
+ /** Snid change countdown. */
+ u32 snidccd:4;,
+ /** New SNID. */
+ u32 new_snid:4;,
+ /** reserved. */
+ u32 rsvd:16;
+ );
+};
+typedef struct bsu_beacon_bmi_change_snid_t bsu_beacon_bmi_change_snid_t;
+
+/** Mac Address. */
+struct bsu_beacon_bmi_mac_address_t
+{
+ /** Present. */
+ u32 present;
+};
+typedef struct bsu_beacon_bmi_mac_address_t bsu_beacon_bmi_mac_address_t;
+
+#endif /* bsu_beacon_inc_misc_h */
diff --git a/cesar/bsu/beacon/inc/region.h b/cesar/bsu/beacon/inc/region.h
new file mode 100644
index 0000000000..0e7cbd66b7
--- /dev/null
+++ b/cesar/bsu/beacon/inc/region.h
@@ -0,0 +1,43 @@
+#ifndef bsu_beacon_inc_region_h
+#define bsu_beacon_inc_region_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2010 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file bsu_beacon/inc/region.h
+ * \brief Beacon entry exchange data description.
+ * \ingroup bsu_beacon
+ */
+
+/** Number of maximum region available. */
+#define BSU_BEACON_BMI_REGION_NAX 10
+
+struct bsu_beacon_bmi_region_desc_t
+{
+ BITFIELDS_WORD
+ (
+ /** Region type. */
+ u32 rt:4;,
+ /** Region end time us. */
+ u32 end_time_atu:12;,
+ /** Reserved. */
+ u32 rsvd:16;
+ );
+};
+typedef struct bsu_beacon_bmi_region_desc_t bsu_beacon_bmi_region_desc_t;
+
+/** Region bsu_beacon entry. */
+struct bsu_beacon_bmi_region_t
+{
+ /** Number of regions. */
+ uint nb;
+ /** Array of number of regions. */
+ bsu_beacon_bmi_region_desc_t region[BSU_BEACON_BMI_REGION_NAX];
+};
+typedef struct bsu_beacon_bmi_region_t bsu_beacon_bmi_region_t;
+
+#endif /* bsu_beacon_inc_region_h */
diff --git a/cesar/bsu/beacon/inc/schedule.h b/cesar/bsu/beacon/inc/schedule.h
new file mode 100644
index 0000000000..479717d7a4
--- /dev/null
+++ b/cesar/bsu/beacon/inc/schedule.h
@@ -0,0 +1,78 @@
+#ifndef bsu_beacon_inc_schedule_h
+#define bsu_beacon_inc_schedule_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2010 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file bsu_beacon/inc/schedule.h
+ * \brief Schedule bsu_beacon entry description.
+ * \ingroup bsu_beacon
+ */
+
+/** Maximum number of Schedule Allocation Unit. */
+#define BSU_BEACON_BMIS_SCHEDULES_SAI_MAX 5
+
+/** Maximum number of Persistent bsu_beacon entries. */
+#define BSU_BEACON_BMI_PERSISTENT_SCHEDULE_MAX 2
+
+struct bsu_beacon_sai_t
+{
+ BITFIELDS_WORD
+ (
+ /** Start Time Present Flag. */
+ u32 stpf:1;,
+ /** GLID. */
+ u32 glid:7;,
+ /** Start time. */
+ u32 start_time_atu:12;,
+ /** End time. */
+ u32 end_time_atu:12;
+ );
+};
+typedef struct bsu_beacon_sai_t bsu_beacon_sai_t;
+
+struct bsu_beacon_bmi_persistent_schedule_desc_t
+{
+ BITFIELDS_WORD
+ (
+ /** Previous countdown. */
+ u32 pscd:8;,
+ /** Current schedule countdown. */
+ u32 cscd:8;,
+ /** Number of session. */
+ u32 ns:8;,
+ /** Reserved. */
+ u32 rsvd:8;
+ );
+ /** Schedules. */
+ bsu_beacon_sai_t sais[BSU_BEACON_BMIS_SCHEDULES_SAI_MAX];
+};
+typedef struct bsu_beacon_bmi_persistent_schedule_desc_t
+bsu_beacon_bmi_persistent_schedule_desc_t;
+
+struct bsu_beacon_bmi_persistent_schedule_t
+{
+ /** Number of persistent schedule data. */
+ uint nb;
+ /** Persistent schedule descriptions. */
+ bsu_beacon_bmi_persistent_schedule_desc_t
+ ps[BSU_BEACON_BMI_PERSISTENT_SCHEDULE_MAX];
+};
+typedef struct bsu_beacon_bmi_persistent_schedule_t
+bsu_beacon_bmi_persistent_schedule_t;
+
+struct bsu_beacon_bmi_non_persistent_schedule_t
+{
+ /** Number of session. */
+ uint ns;
+ /** Schedules. */
+ bsu_beacon_sai_t sais[BSU_BEACON_BMIS_SCHEDULES_SAI_MAX];
+};
+typedef struct bsu_beacon_bmi_non_persistent_schedule_t
+bsu_beacon_bmi_non_persistent_schedule_t;
+
+#endif /* bsu_beacon_inc_schedule_h */