diff --git a/openair3/COPYING b/openair3/COPYING
deleted file mode 100644
index 94a9ed024d3859793618152ea559a168bbcbb5e2..0000000000000000000000000000000000000000
--- a/openair3/COPYING
+++ /dev/null
@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/openair3/DOCS/COPYING b/openair3/DOCS/COPYING
deleted file mode 100644
index 94a9ed024d3859793618152ea559a168bbcbb5e2..0000000000000000000000000000000000000000
--- a/openair3/DOCS/COPYING
+++ /dev/null
@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/openair3/DOCS/DOXYGEN/Doxyfile b/openair3/DOCS/DOXYGEN/Doxyfile
deleted file mode 100644
index 64c68eed76f847207ac351f9c6c93d75e2790809..0000000000000000000000000000000000000000
--- a/openair3/DOCS/DOXYGEN/Doxyfile
+++ /dev/null
@@ -1,217 +0,0 @@
-# Doxyfile 1.3.8
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME           = OPENAIR
-PROJECT_NUMBER         = 
-OUTPUT_DIRECTORY       = 
-CREATE_SUBDIRS         = NO
-OUTPUT_LANGUAGE        = English
-USE_WINDOWS_ENCODING   = YES
-BRIEF_MEMBER_DESC      = YES
-REPEAT_BRIEF           = YES
-ABBREVIATE_BRIEF       = 
-ALWAYS_DETAILED_SEC    = NO
-INLINE_INHERITED_MEMB  = NO
-FULL_PATH_NAMES        = NO
-STRIP_FROM_PATH        = 
-STRIP_FROM_INC_PATH    = 
-SHORT_NAMES            = NO
-JAVADOC_AUTOBRIEF      = YES
-MULTILINE_CPP_IS_BRIEF = YES
-DETAILS_AT_TOP         = YES
-INHERIT_DOCS           = NO
-DISTRIBUTE_GROUP_DOC   = NO
-TAB_SIZE               = 8
-ALIASES                = 
-OPTIMIZE_OUTPUT_FOR_C  = YES
-OPTIMIZE_OUTPUT_JAVA   = NO
-SUBGROUPING            = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL            = YES
-EXTRACT_PRIVATE        = NO
-EXTRACT_STATIC         = NO
-EXTRACT_LOCAL_CLASSES  = YES
-EXTRACT_LOCAL_METHODS  = YES
-HIDE_UNDOC_MEMBERS     = YES
-HIDE_UNDOC_CLASSES     = YES
-HIDE_FRIEND_COMPOUNDS  = NO
-HIDE_IN_BODY_DOCS      = NO
-INTERNAL_DOCS          = NO
-CASE_SENSE_NAMES       = YES
-HIDE_SCOPE_NAMES       = NO
-SHOW_INCLUDE_FILES     = NO
-INLINE_INFO            = YES
-SORT_MEMBER_DOCS       = NO
-SORT_BRIEF_DOCS        = NO
-SORT_BY_SCOPE_NAME     = NO
-GENERATE_TODOLIST      = YES
-GENERATE_TESTLIST      = NO
-GENERATE_BUGLIST       = YES
-GENERATE_DEPRECATEDLIST= NO
-ENABLED_SECTIONS       = 
-MAX_INITIALIZER_LINES  = 30
-SHOW_USED_FILES        = NO
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET                  = NO
-WARNINGS               = YES
-WARN_IF_UNDOCUMENTED   = YES
-WARN_IF_DOC_ERROR      = YES
-WARN_FORMAT            = "$file:$line: $text"
-WARN_LOGFILE           = 
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT                  = $(OPENAIR3_DIR)/MESH/L3_rrc_interface.h \
-			 $(OPENAIR3_DIR)/MESH/L3_rrc_defs.h \
-			 $(OPENAIR3_DIR)/MESH/cmm_rrm_interface.h \
-			 $(OPENAIR3_DIR)/MESH/cmm_ral_interface.h \
-
-FILE_PATTERNS          = *.h
-RECURSIVE              = NO
-EXCLUDE                = 
-EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
-EXAMPLE_PATH           = 
-EXAMPLE_PATTERNS       = 
-EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             = images
-INPUT_FILTER           = 
-FILTER_PATTERNS        = 
-FILTER_SOURCE_FILES    = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER         = NO
-INLINE_SOURCES         = NO
-STRIP_CODE_COMMENTS    = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION    = NO
-VERBATIM_HEADERS       = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = NO
-COLS_IN_ALPHA_INDEX    = 5
-IGNORE_PREFIX          = 
-#---------------------------------------------------------------------------
-COLS_IN_ALPHA_INDEX    = 5
-IGNORE_PREFIX          = 
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = NO
-COLS_IN_ALPHA_INDEX    = 5
-IGNORE_PREFIX          = 
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML          = YES
-HTML_OUTPUT            = html
-HTML_FILE_EXTENSION    = .html
-HTML_HEADER            = 
-HTML_FOOTER            = 
-HTML_STYLESHEET        = 
-HTML_ALIGN_MEMBERS     = YES
-GENERATE_HTMLHELP      = YES
-CHM_FILE               = irs_openair.chm
-HHC_LOCATION           = 
-GENERATE_CHI           = NO
-BINARY_TOC             = NO
-TOC_EXPAND             = NO
-DISABLE_INDEX          = NO
-ENUM_VALUES_PER_LINE   = 4
-GENERATE_TREEVIEW      = YES
-TREEVIEW_WIDTH         = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX         = NO
-LATEX_OUTPUT           = latex
-LATEX_CMD_NAME         = latex
-MAKEINDEX_CMD_NAME     = makeindex
-COMPACT_LATEX          = NO
-PAPER_TYPE             = a4wide
-EXTRA_PACKAGES         = amsmath amssymb
-LATEX_HEADER           = 
-PDF_HYPERLINKS         = YES
-USE_PDFLATEX           = YES
-LATEX_BATCHMODE        = NO
-LATEX_HIDE_INDICES     = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF           = NO
-RTF_OUTPUT             = rtf
-COMPACT_RTF            = YES
-RTF_HYPERLINKS         = YES
-RTF_STYLESHEET_FILE    = 
-RTF_EXTENSIONS_FILE    = 
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN           = NO
-MAN_OUTPUT             = man
-MAN_EXTENSION          = .3
-MAN_LINKS              = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML           = NO
-XML_OUTPUT             = xml
-XML_SCHEMA             = 
-XML_DTD                = 
-XML_PROGRAMLISTING     = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF   = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD       = NO
-PERLMOD_LATEX          = NO
-PERLMOD_PRETTY         = YES
-PERLMOD_MAKEVAR_PREFIX = 
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING   = YES
-MACRO_EXPANSION        = NO
-EXPAND_ONLY_PREDEF     = NO
-SEARCH_INCLUDES        = YES
-INCLUDE_PATH           = 
-INCLUDE_FILE_PATTERNS  = 
-PREDEFINED             = 
-EXPAND_AS_DEFINED      = 
-SKIP_FUNCTION_MACROS   = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-TAGFILES               = 
-GENERATE_TAGFILE       = 
-ALLEXTERNALS           = NO
-EXTERNAL_GROUPS        = YES
-PERL_PATH              = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS         = NO
-HIDE_UNDOC_RELATIONS   = NO
-HAVE_DOT               = NO
-CLASS_GRAPH            = NO
-COLLABORATION_GRAPH    = NO
-UML_LOOK               = NO
-TEMPLATE_RELATIONS     = NO
-INCLUDE_GRAPH          = NO
-INCLUDED_BY_GRAPH      = NO
-CALL_GRAPH             = NO
-GRAPHICAL_HIERARCHY    = NO 
-DOT_IMAGE_FORMAT       = jpg
-DOT_PATH               = 
-DOTFILE_DIRS           = ../docs/dotfiles
diff --git a/openair3/DOCS/TEMPLATES/CODE/COPYING b/openair3/DOCS/TEMPLATES/CODE/COPYING
deleted file mode 100644
index 623b6258a134210f0b0ada106fdaab7f0370d9c5..0000000000000000000000000000000000000000
--- a/openair3/DOCS/TEMPLATES/CODE/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/openair3/DOCS/TEMPLATES/CODE/Doxyfile b/openair3/DOCS/TEMPLATES/CODE/Doxyfile
deleted file mode 100644
index 131b032fb4c798e88833aef75b338ab303d90d3f..0000000000000000000000000000000000000000
--- a/openair3/DOCS/TEMPLATES/CODE/Doxyfile
+++ /dev/null
@@ -1,231 +0,0 @@
-# Doxyfile 1.5.3
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-DOXYFILE_ENCODING      = UTF-8
-PROJECT_NAME           = OpenAirInterface 
-PROJECT_NUMBER         = V1.0
-OUTPUT_DIRECTORY       = 
-CREATE_SUBDIRS         = NO
-OUTPUT_LANGUAGE        = English
-BRIEF_MEMBER_DESC      = YES
-REPEAT_BRIEF           = YES
-ABBREVIATE_BRIEF       = 
-ALWAYS_DETAILED_SEC    = NO
-INLINE_INHERITED_MEMB  = NO
-FULL_PATH_NAMES        = YES
-STRIP_FROM_PATH        = 
-STRIP_FROM_INC_PATH    = 
-SHORT_NAMES            = NO
-JAVADOC_AUTOBRIEF      = NO
-QT_AUTOBRIEF           = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP         = NO
-INHERIT_DOCS           = YES
-SEPARATE_MEMBER_PAGES  = NO
-TAB_SIZE               = 8
-ALIASES                = 
-OPTIMIZE_OUTPUT_FOR_C  = NO
-OPTIMIZE_OUTPUT_JAVA   = NO
-BUILTIN_STL_SUPPORT    = NO
-CPP_CLI_SUPPORT        = NO
-DISTRIBUTE_GROUP_DOC   = NO
-SUBGROUPING            = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL            = NO
-EXTRACT_PRIVATE        = NO
-EXTRACT_STATIC         = NO
-EXTRACT_LOCAL_CLASSES  = YES
-EXTRACT_LOCAL_METHODS  = NO
-EXTRACT_ANON_NSPACES   = NO
-HIDE_UNDOC_MEMBERS     = NO
-HIDE_UNDOC_CLASSES     = NO
-HIDE_FRIEND_COMPOUNDS  = NO
-HIDE_IN_BODY_DOCS      = NO
-INTERNAL_DOCS          = NO
-CASE_SENSE_NAMES       = YES
-HIDE_SCOPE_NAMES       = NO
-SHOW_INCLUDE_FILES     = YES
-INLINE_INFO            = YES
-SORT_MEMBER_DOCS       = YES
-SORT_BRIEF_DOCS        = NO
-SORT_BY_SCOPE_NAME     = NO
-GENERATE_TODOLIST      = YES
-GENERATE_TESTLIST      = YES
-GENERATE_BUGLIST       = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS       = 
-MAX_INITIALIZER_LINES  = 30
-SHOW_USED_FILES        = YES
-SHOW_DIRECTORIES       = NO
-FILE_VERSION_FILTER    = 
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET                  = NO
-WARNINGS               = YES
-WARN_IF_UNDOCUMENTED   = YES
-WARN_IF_DOC_ERROR      = YES
-WARN_NO_PARAMDOC       = NO
-WARN_FORMAT            = "$file:$line: $text"
-WARN_LOGFILE           = 
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT                  = example_doxy.h 
-INPUT_ENCODING         = UTF-8
-FILE_PATTERNS          = 
-RECURSIVE              = NO
-EXCLUDE                = 
-EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
-EXCLUDE_SYMBOLS        = 
-EXAMPLE_PATH           = 
-EXAMPLE_PATTERNS       = 
-EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             = images/
-INPUT_FILTER           = 
-FILTER_PATTERNS        = 
-FILTER_SOURCE_FILES    = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER         = NO
-INLINE_SOURCES         = NO
-STRIP_CODE_COMMENTS    = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION    = YES
-REFERENCES_LINK_SOURCE = YES
-USE_HTAGS              = NO
-VERBATIM_HEADERS       = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = NO
-COLS_IN_ALPHA_INDEX    = 5
-IGNORE_PREFIX          = 
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML          = YES
-HTML_OUTPUT            = html
-HTML_FILE_EXTENSION    = .html
-HTML_HEADER            = 
-HTML_FOOTER            = 
-HTML_STYLESHEET        = 
-HTML_ALIGN_MEMBERS     = YES
-GENERATE_HTMLHELP      = NO
-HTML_DYNAMIC_SECTIONS  = NO
-CHM_FILE               = 
-HHC_LOCATION           = 
-GENERATE_CHI           = NO
-BINARY_TOC             = NO
-TOC_EXPAND             = NO
-DISABLE_INDEX          = NO
-ENUM_VALUES_PER_LINE   = 4
-GENERATE_TREEVIEW      = YES
-TREEVIEW_WIDTH         = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX         = YES
-LATEX_OUTPUT           = latex
-LATEX_CMD_NAME         = latex
-MAKEINDEX_CMD_NAME     = makeindex
-COMPACT_LATEX          = NO
-PAPER_TYPE             = a4wide
-EXTRA_PACKAGES         = 
-LATEX_HEADER           = 
-PDF_HYPERLINKS         = NO
-USE_PDFLATEX           = NO
-LATEX_BATCHMODE        = NO
-LATEX_HIDE_INDICES     = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF           = NO
-RTF_OUTPUT             = rtf
-COMPACT_RTF            = NO
-RTF_HYPERLINKS         = NO
-RTF_STYLESHEET_FILE    = 
-RTF_EXTENSIONS_FILE    = 
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN           = NO
-MAN_OUTPUT             = man
-MAN_EXTENSION          = .3
-MAN_LINKS              = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML           = NO
-XML_OUTPUT             = xml
-XML_SCHEMA             = 
-XML_DTD                = 
-XML_PROGRAMLISTING     = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF   = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD       = NO
-PERLMOD_LATEX          = NO
-PERLMOD_PRETTY         = YES
-PERLMOD_MAKEVAR_PREFIX = 
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING   = YES
-MACRO_EXPANSION        = NO
-EXPAND_ONLY_PREDEF     = NO
-SEARCH_INCLUDES        = YES
-INCLUDE_PATH           = 
-INCLUDE_FILE_PATTERNS  = 
-PREDEFINED             = 
-EXPAND_AS_DEFINED      = 
-SKIP_FUNCTION_MACROS   = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-TAGFILES               = 
-GENERATE_TAGFILE       = 
-ALLEXTERNALS           = NO
-EXTERNAL_GROUPS        = YES
-PERL_PATH              = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS         = YES
-MSCGEN_PATH            = 
-HIDE_UNDOC_RELATIONS   = YES
-HAVE_DOT               = NO
-CLASS_GRAPH            = YES
-COLLABORATION_GRAPH    = YES
-GROUP_GRAPHS           = YES
-UML_LOOK               = NO
-TEMPLATE_RELATIONS     = NO
-INCLUDE_GRAPH          = YES
-INCLUDED_BY_GRAPH      = YES
-CALL_GRAPH             = NO
-CALLER_GRAPH           = NO
-GRAPHICAL_HIERARCHY    = YES
-DIRECTORY_GRAPH        = YES
-DOT_IMAGE_FORMAT       = png
-DOT_PATH               = /usr/bin/dot
-DOTFILE_DIRS           = 
-DOT_GRAPH_MAX_NODES    = 50
-MAX_DOT_GRAPH_DEPTH    = 0
-DOT_TRANSPARENT        = NO
-DOT_MULTI_TARGETS      = NO
-GENERATE_LEGEND        = YES
-DOT_CLEANUP            = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-SEARCHENGINE           = NO
diff --git a/openair3/DOCS/TEMPLATES/CODE/example_doxy.h b/openair3/DOCS/TEMPLATES/CODE/example_doxy.h
deleted file mode 100644
index 8ced85652f7983c0e8b5d84728290a98d201fdf8..0000000000000000000000000000000000000000
--- a/openair3/DOCS/TEMPLATES/CODE/example_doxy.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
-
-  Eurecom OpenAirInterface 3
-  Copyright(c) 1999 - 2010 Eurecom
-
-  This program is free software; you can redistribute it and/or modify it
-  under the terms and conditions of the GNU General Public License,
-  version 2, as published by the Free Software Foundation.
-
-  This program is distributed in the hope it will be useful, but WITHOUT
-  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-  more details.
-
-  You should have received a copy of the GNU General Public License along with
-  this program; if not, write to the Free Software Foundation, Inc.,
-  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
-
-  The full GNU General Public License is included in this distribution in
-  the file called "COPYING".
-
-  Contact Information
-  Openair Admin: openair_admin@eurecom.fr
-  Openair Tech : openair_tech@eurecom.fr
-  Forums       : http://forums.eurecom.fsr/openairinterface
-  Address      : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
-
-*******************************************************************************/
-
-
-/*! \file doxy_template.h
-* \brief explain how this block is organized, and how it works
-* \author Navid Nikaein
-* \date 2006-2010
-* \version 4.0
-* \company Eurecom
-* \email: navid.nikaein@eurecom.fr
-* \note this a note
-* \bug  this is a bug
-* \warning  this is a warning
-*/
-
-//-----------------------------------begin group-----------------------------
-
-
-/** @defgroup _oai System definitions
-
-
-
-There is different modules:
-- OAI Address
-- OAI Components
-- \ref _frame
-
-The following diagram is based on graphviz (http://www.graphviz.org/), you need to install the package to view the diagram.
-
- * \dot
- * digraph group_frame  {
- *     node [shape=rect, fontname=Helvetica, fontsize=8,style=filled,fillcolor=lightgrey];
- *     a [ label = " address"];
- *     b [ label = " component"];
- *     c [ label = " frame",URL="\ref _frame"];
- *    a->b;
- *    a->c;
- *    b->d;
- *  label="Architecture"
- *
- * }
- * \enddot
-
-\section _doxy Doxygen Help
-You can use the provided Doxyfile as the configuration file or alternatively run "doxygen -g Doxyfile" to generat the file.
-You need at least to set the some variables in the Doxyfile including "PROJECT_NAME","PROJECT_NUMBER","INPUT","IMAGE_PATH".
-Doxygen help and commands can be found at http://www.stack.nl/~dimitri/doxygen/commands.html#cmdprotocol
-
-\section _arch Architecture
-
-You need to set the IMAGE_PATH in your Doxyfile
-
-\image html arch.png "Architecture"
-\image latex arch.eps "Architecture"
-
-\subsection _mac MAC
-thisis the mac
-\subsection _rlc RLC
-this is the rlc
-\subsection _impl Implementation
-what about the implementation
-
-
-*@{*/
-
-/*!\brief OAI protocol verion */
-#define OAI_PROTOCOL_Version  0x00
-/*!\brief Length in bytes of the OAI address */
-#define OAI_ADDR_LEN        6
-
-/*!\brief OAI snode type */
-enum NodeType {
-  /*!\brief mesh routers are */
-  meshrouter = 1,
-  /*!\brief relay nodes are */
-  relaynode = 2,
-  /*!\brief clusterheads are */
-  clusterhead = 3
-};
-
-
-/*@}*/
-
-// --------------------------end group ------------------------------
-
-
-//---------------------------begin group------------------------------
-/** @defgroup _frame Frame Structure
- * @ingroup _oai
-The Frame is composed of ....
-
-
-*@{*/
-/*! \brief the frame structure is ... */
-struct frame {
-  u_short   duration; /*!< \brief Duration in us (2 bytes) */
-  u_char    da[OAI_ADDR_LEN];/*!< \brief Destination MAC@ (OAI_ADDR_LEN bytes) */
-  u_char    sa[OAI_ADDR_LEN];/*!< \brief Source MAC@ (OAI_ADDR_LEN bytes)*/
-  u_char    body[0]; /*!< \brief Body of the frame */
-};
-/*! \brief Broadcast ID is ... */
-#define BROADCAST_ID 15
-
-
-/*@}*/
-
-//--------------------------end group-----------------------
-
-
-//-----------------------begin func proto-------------------
-
-/*! \fn int init(int,int)
-* \brief this function initializes and allocates memories and etc.
-* \param[in] src the memory area to copy frrm
-* \param[out] dst the memory area to copy to
-* \return 0 on success, otherwise -1
-* \note
-* @ingroup  _oai
-*/
-int init(int src, int dst);
-
-//-----------------------end func proto-------------------
diff --git a/openair3/DOCS/TEMPLATES/CODE/images/arch.eps b/openair3/DOCS/TEMPLATES/CODE/images/arch.eps
deleted file mode 100644
index a64e194fdb81e20905d9656651090262f5225fe9..0000000000000000000000000000000000000000
--- a/openair3/DOCS/TEMPLATES/CODE/images/arch.eps
+++ /dev/null
@@ -1,785 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: /homes/nikaeinn/templates/dev/arch.dia
-%%Creator: Dia v0.95
-%%CreationDate: Fri Dec 11 12:31:01 2009
-%%For: nikaeinn
-%%Orientation: Portrait
-%%Magnification: 1.0000
-%%BoundingBox: 0 0 355 138
-%%BeginSetup
-%%EndSetup
-%%EndComments
-%%BeginProlog
-[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
-/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
-/two /three /four /five /six /seven /eight /nine /colon /semicolon
-/less /equal /greater /question /at /A /B /C /D /E
-/F /G /H /I /J /K /L /M /N /O
-/P /Q /R /S /T /U /V /W /X /Y
-/Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c
-/d /e /f /g /h /i /j /k /l /m
-/n /o /p /q /r /s /t /u /v /w
-/x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright
-/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior
-/acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf
-/threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
-/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde
-/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
-/Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring
-/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
-/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave
-/uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def
-/cp {closepath} bind def
-/c {curveto} bind def
-/f {fill} bind def
-/a {arc} bind def
-/ef {eofill} bind def
-/ex {exch} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/sa {save} bind def
-/rs {restore} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/rm {rmoveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/sh {show} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/sd {setdash} bind def
-/ff {findfont} bind def
-/sf {setfont} bind def
-/scf {scalefont} bind def
-/sw {stringwidth pop} bind def
-/tr {translate} bind def
-
-/ellipsedict 8 dict def
-ellipsedict /mtrx matrix put
-/ellipse
-{ ellipsedict begin
-   /endangle exch def
-   /startangle exch def
-   /yrad exch def
-   /xrad exch def
-   /y exch def
-   /x exch def   /savematrix mtrx currentmatrix def
-   x y tr xrad yrad sc
-   0 0 1 startangle endangle arc
-   savematrix setmatrix
-   end
-} def
-
-/mergeprocs {
-dup length
-3 -1 roll
-dup
-length
-dup
-5 1 roll
-3 -1 roll
-add
-array cvx
-dup
-3 -1 roll
-0 exch
-putinterval
-dup
-4 2 roll
-putinterval
-} bind def
-/dpi_x 300 def
-/dpi_y 300 def
-/conicto {
-    /to_y exch def
-    /to_x exch def
-    /conic_cntrl_y exch def
-    /conic_cntrl_x exch def
-    currentpoint
-    /p0_y exch def
-    /p0_x exch def
-    /p1_x p0_x conic_cntrl_x p0_x sub 2 3 div mul add def
-    /p1_y p0_y conic_cntrl_y p0_y sub 2 3 div mul add def
-    /p2_x p1_x to_x p0_x sub 1 3 div mul add def
-    /p2_y p1_y to_y p0_y sub 1 3 div mul add def
-    p1_x p1_y p2_x p2_y to_x to_y curveto
-} bind def
-/start_ol { gsave 1.1 dpi_x div dup scale} bind def
-/end_ol { closepath fill grestore } bind def
-28.346000 -28.346000 scale
--4.400000 -8.150000 translate
-%%EndProlog
-
-
-1.000000 1.000000 1.000000 srgb
-n 4.450000 3.350000 m 4.450000 8.100000 l 16.850000 8.100000 l 16.850000 3.350000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 4.450000 3.350000 m 4.450000 8.100000 l 16.850000 8.100000 l 16.850000 3.350000 l cp s
-gsave 8.875000 4.300000 translate 0.035278 -0.035278 scale
-start_ol
-1762 3044 moveto
-1276 3044 990 2673 conicto
-704 2303 704 1663 conicto
-704 1025 990 654 conicto
-1276 284 1762 284 conicto
-2248 284 2532 654 conicto
-2816 1025 2816 1663 conicto
-2816 2303 2532 2673 conicto
-2248 3044 1762 3044 conicto
-1762 3392 moveto
-2446 3392 2855 2922 conicto
-3264 2453 3264 1664 conicto
-3264 876 2855 406 conicto
-2446 -64 1762 -64 conicto
-1077 -64 666 405 conicto
-256 874 256 1664 conicto
-256 2453 666 2922 conicto
-1077 3392 1762 3392 conicto
-end_ol grestore 
-gsave 9.330083 4.300000 translate 0.035278 -0.035278 scale
-start_ol
-1536 2838 moveto
-935 1180 lineto
-2140 1180 lineto
-1536 2838 lineto
-1286 3282 moveto
-1789 3282 lineto
-3038 0 lineto
-2577 0 lineto
-2278 832 lineto
-801 832 lineto
-503 0 lineto
-35 0 lineto
-1286 3282 lineto
-end_ol grestore 
-gsave 9.736483 4.300000 translate 0.035278 -0.035278 scale
-start_ol
-448 3328 moveto
-874 3328 lineto
-874 0 lineto
-448 0 lineto
-448 3328 lineto
-end_ol grestore 
-gsave 9.914283 4.300000 translate 0.035278 -0.035278 scale
-start_ol
-end_ol grestore 
-gsave 10.100550 4.300000 translate 0.035278 -0.035278 scale
-start_ol
-1536 2838 moveto
-935 1180 lineto
-2140 1180 lineto
-1536 2838 lineto
-1286 3282 moveto
-1789 3282 lineto
-3038 0 lineto
-2577 0 lineto
-2278 832 lineto
-801 832 lineto
-503 0 lineto
-35 0 lineto
-1286 3282 lineto
-end_ol grestore 
-gsave 10.506950 4.300000 translate 0.035278 -0.035278 scale
-start_ol
-1842 2133 moveto
-1776 2174 1696 2193 conicto
-1616 2212 1519 2212 conicto
-1177 2212 993 1983 conicto
-810 1755 810 1328 conicto
-810 0 lineto
-384 0 lineto
-384 2496 lineto
-810 2496 lineto
-810 2129 lineto
-937 2347 1141 2453 conicto
-1345 2560 1638 2560 conicto
-1680 2560 1730 2554 conicto
-1781 2548 1842 2536 conicto
-1842 2133 lineto
-end_ol grestore 
-gsave 10.752483 4.300000 translate 0.035278 -0.035278 scale
-start_ol
-2176 2404 moveto
-2176 2020 lineto
-2008 2116 1838 2164 conicto
-1669 2212 1496 2212 conicto
-1109 2212 895 1958 conicto
-682 1705 682 1248 conicto
-682 791 895 537 conicto
-1109 284 1496 284 conicto
-1669 284 1838 332 conicto
-2008 380 2176 476 conicto
-2176 97 lineto
-2009 17 1830 -23 conicto
-1652 -64 1449 -64 conicto
-902 -64 579 291 conicto
-256 646 256 1248 conicto
-256 1859 582 2209 conicto
-909 2560 1476 2560 conicto
-1660 2560 1835 2521 conicto
-2011 2482 2176 2404 conicto
-end_ol grestore 
-gsave 11.074217 4.300000 translate 0.035278 -0.035278 scale
-start_ol
-2474 1509 moveto
-2474 0 lineto
-2048 0 lineto
-2048 1502 lineto
-2048 1858 1913 2035 conicto
-1778 2212 1509 2212 conicto
-1185 2212 997 1999 conicto
-810 1786 810 1419 conicto
-810 0 lineto
-384 0 lineto
-384 3456 lineto
-810 3456 lineto
-810 2120 lineto
-954 2343 1152 2451 conicto
-1350 2560 1609 2560 conicto
-2037 2560 2255 2293 conicto
-2474 2027 2474 1509 conicto
-end_ol grestore 
-1.000000 1.000000 1.000000 srgb
-n 4.900000 6.250000 m 4.900000 7.500000 l 8.250000 7.500000 l 8.250000 6.250000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 4.900000 6.250000 m 4.900000 7.500000 l 8.250000 7.500000 l 8.250000 6.250000 l cp s
-1.000000 1.000000 1.000000 srgb
-n 8.900000 6.200000 m 8.900000 7.495000 l 12.500000 7.495000 l 12.500000 6.200000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 8.900000 6.200000 m 8.900000 7.495000 l 12.500000 7.495000 l 12.500000 6.200000 l cp s
-1.000000 1.000000 1.000000 srgb
-n 13.090000 6.195000 m 13.090000 7.495000 l 16.400000 7.495000 l 16.400000 6.195000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 13.090000 6.195000 m 13.090000 7.495000 l 16.400000 7.495000 l 16.400000 6.195000 l cp s
-gsave 5.400000 7.100000 translate 0.035278 -0.035278 scale
-start_ol
-1536 2838 moveto
-935 1180 lineto
-2140 1180 lineto
-1536 2838 lineto
-1286 3282 moveto
-1789 3282 lineto
-3038 0 lineto
-2577 0 lineto
-2278 832 lineto
-801 832 lineto
-503 0 lineto
-35 0 lineto
-1286 3282 lineto
-end_ol grestore 
-gsave 5.795817 7.100000 translate 0.035278 -0.035278 scale
-start_ol
-2048 2116 moveto
-2048 3456 lineto
-2474 3456 lineto
-2474 0 lineto
-2048 0 lineto
-2048 380 lineto
-1922 154 1727 45 conicto
-1533 -64 1261 -64 conicto
-816 -64 536 297 conicto
-256 659 256 1248 conicto
-256 1837 536 2198 conicto
-816 2560 1260 2560 conicto
-1532 2560 1726 2450 conicto
-1921 2341 2048 2116 conicto
-682 1248 moveto
-682 798 864 541 conicto
-1046 284 1364 284 conicto
-1683 284 1865 541 conicto
-2048 798 2048 1248 conicto
-2048 1699 1865 1955 conicto
-1683 2212 1364 2212 conicto
-1046 2212 864 1955 conicto
-682 1699 682 1248 conicto
-end_ol grestore 
-gsave 6.176817 7.100000 translate 0.035278 -0.035278 scale
-start_ol
-2048 2116 moveto
-2048 3456 lineto
-2474 3456 lineto
-2474 0 lineto
-2048 0 lineto
-2048 380 lineto
-1922 154 1727 45 conicto
-1533 -64 1261 -64 conicto
-816 -64 536 297 conicto
-256 659 256 1248 conicto
-256 1837 536 2198 conicto
-816 2560 1260 2560 conicto
-1532 2560 1726 2450 conicto
-1921 2341 2048 2116 conicto
-682 1248 moveto
-682 798 864 541 conicto
-1046 284 1364 284 conicto
-1683 284 1865 541 conicto
-2048 798 2048 1248 conicto
-2048 1699 1865 1955 conicto
-1683 2212 1364 2212 conicto
-1046 2212 864 1955 conicto
-682 1699 682 1248 conicto
-end_ol grestore 
-gsave 6.557817 7.100000 translate 0.035278 -0.035278 scale
-start_ol
-1842 2133 moveto
-1776 2174 1696 2193 conicto
-1616 2212 1519 2212 conicto
-1177 2212 993 1983 conicto
-810 1755 810 1328 conicto
-810 0 lineto
-384 0 lineto
-384 2496 lineto
-810 2496 lineto
-810 2129 lineto
-937 2347 1141 2453 conicto
-1345 2560 1638 2560 conicto
-1680 2560 1730 2554 conicto
-1781 2548 1842 2536 conicto
-1842 2133 lineto
-end_ol grestore 
-gsave 6.790121 7.100000 translate 0.035278 -0.035278 scale
-start_ol
-2538 1329 moveto
-2538 1124 lineto
-682 1124 lineto
-682 714 908 499 conicto
-1134 284 1537 284 conicto
-1772 284 1991 340 conicto
-2211 396 2432 509 conicto
-2432 128 lineto
-2216 34 1988 -15 conicto
-1760 -64 1526 -64 conicto
-940 -64 598 284 conicto
-256 633 256 1226 conicto
-256 1839 582 2199 conicto
-909 2560 1463 2560 conicto
-1960 2560 2249 2229 conicto
-2538 1898 2538 1329 conicto
-2112 1472 moveto
-2112 1809 1931 2010 conicto
-1751 2212 1453 2212 conicto
-1116 2212 914 2018 conicto
-712 1824 682 1472 conicto
-2112 1472 lineto
-end_ol grestore 
-gsave 7.154187 7.100000 translate 0.035278 -0.035278 scale
-start_ol
-2021 2424 moveto
-2021 2034 lineto
-1818 2123 1638 2167 conicto
-1459 2212 1267 2212 conicto
-975 2212 828 2119 conicto
-682 2026 682 1838 conicto
-682 1696 784 1615 conicto
-887 1535 1196 1461 conicto
-1327 1430 lineto
-1748 1337 1930 1166 conicto
-2112 995 2112 690 conicto
-2112 342 1839 139 conicto
-1566 -64 1089 -64 conicto
-891 -64 675 -25 conicto
-460 14 222 94 conicto
-222 519 lineto
-481 402 692 343 conicto
-903 284 1110 284 conicto
-1387 284 1536 383 conicto
-1686 482 1686 661 conicto
-1686 829 1580 917 conicto
-1475 1006 1118 1088 conicto
-985 1121 lineto
-620 1201 438 1367 conicto
-256 1533 256 1823 conicto
-256 2176 507 2368 conicto
-758 2560 1219 2560 conicto
-1448 2560 1649 2526 conicto
-1851 2492 2021 2424 conicto
-end_ol grestore 
-gsave 7.458988 7.100000 translate 0.035278 -0.035278 scale
-start_ol
-2021 2424 moveto
-2021 2034 lineto
-1818 2123 1638 2167 conicto
-1459 2212 1267 2212 conicto
-975 2212 828 2119 conicto
-682 2026 682 1838 conicto
-682 1696 784 1615 conicto
-887 1535 1196 1461 conicto
-1327 1430 lineto
-1748 1337 1930 1166 conicto
-2112 995 2112 690 conicto
-2112 342 1839 139 conicto
-1566 -64 1089 -64 conicto
-891 -64 675 -25 conicto
-460 14 222 94 conicto
-222 519 lineto
-481 402 692 343 conicto
-903 284 1110 284 conicto
-1387 284 1536 383 conicto
-1686 482 1686 661 conicto
-1686 829 1580 917 conicto
-1475 1006 1118 1088 conicto
-985 1121 lineto
-620 1201 438 1367 conicto
-256 1533 256 1823 conicto
-256 2176 507 2368 conicto
-758 2560 1219 2560 conicto
-1448 2560 1649 2526 conicto
-1851 2492 2021 2424 conicto
-end_ol grestore 
-gsave 9.020000 7.095000 translate 0.035278 -0.035278 scale
-start_ol
-2880 3094 moveto
-2880 2615 lineto
-2656 2831 2402 2937 conicto
-2149 3044 1864 3044 conicto
-1301 3044 1002 2689 conicto
-704 2334 704 1663 conicto
-704 993 1002 638 conicto
-1301 284 1864 284 conicto
-2149 284 2402 390 conicto
-2656 497 2880 713 conicto
-2880 238 lineto
-2649 87 2390 11 conicto
-2132 -64 1845 -64 conicto
-1106 -64 681 399 conicto
-256 863 256 1664 conicto
-256 2466 681 2929 conicto
-1106 3392 1845 3392 conicto
-2137 3392 2395 3317 conicto
-2654 3243 2880 3094 conicto
-end_ol grestore 
-gsave 9.434867 7.095000 translate 0.035278 -0.035278 scale
-start_ol
-1377 2212 moveto
-1055 2212 868 1954 conicto
-682 1696 682 1248 conicto
-682 800 867 542 conicto
-1053 284 1377 284 conicto
-1697 284 1883 543 conicto
-2070 802 2070 1248 conicto
-2070 1692 1883 1952 conicto
-1697 2212 1377 2212 conicto
-1376 2560 moveto
-1899 2560 2197 2212 conicto
-2496 1864 2496 1248 conicto
-2496 635 2197 285 conicto
-1899 -64 1376 -64 conicto
-851 -64 553 285 conicto
-256 635 256 1248 conicto
-256 1864 553 2212 conicto
-851 2560 1376 2560 conicto
-end_ol grestore 
-gsave 9.798933 7.095000 translate 0.035278 -0.035278 scale
-start_ol
-2339 2028 moveto
-2493 2302 2705 2431 conicto
-2918 2560 3204 2560 conicto
-3591 2560 3800 2286 conicto
-4010 2013 4010 1509 conicto
-4010 0 lineto
-3584 0 lineto
-3584 1502 lineto
-3584 1862 3460 2037 conicto
-3336 2212 3082 2212 conicto
-2771 2212 2590 1999 conicto
-2410 1786 2410 1419 conicto
-2410 0 lineto
-1984 0 lineto
-1984 1502 lineto
-1984 1865 1860 2038 conicto
-1736 2212 1477 2212 conicto
-1171 2212 990 1998 conicto
-810 1784 810 1419 conicto
-810 0 lineto
-384 0 lineto
-384 2496 lineto
-810 2496 lineto
-810 2120 lineto
-947 2344 1141 2452 conicto
-1335 2560 1602 2560 conicto
-1871 2560 2060 2423 conicto
-2249 2287 2339 2028 conicto
-end_ol grestore 
-gsave 10.383133 7.095000 translate 0.035278 -0.035278 scale
-start_ol
-810 380 moveto
-810 -960 lineto
-384 -960 lineto
-384 2496 lineto
-810 2496 lineto
-810 2116 lineto
-937 2339 1131 2449 conicto
-1325 2560 1595 2560 conicto
-2042 2560 2322 2198 conicto
-2602 1837 2602 1248 conicto
-2602 659 2322 297 conicto
-2043 -64 1595 -64 conicto
-1325 -64 1131 45 conicto
-938 155 810 380 conicto
-2176 1248 moveto
-2176 1699 1994 1955 conicto
-1812 2212 1493 2212 conicto
-1175 2212 992 1955 conicto
-810 1699 810 1248 conicto
-810 798 992 541 conicto
-1175 284 1493 284 conicto
-1812 284 1994 541 conicto
-2176 798 2176 1248 conicto
-end_ol grestore 
-gsave 10.755667 7.095000 translate 0.035278 -0.035278 scale
-start_ol
-1377 2212 moveto
-1055 2212 868 1954 conicto
-682 1696 682 1248 conicto
-682 800 867 542 conicto
-1053 284 1377 284 conicto
-1697 284 1883 543 conicto
-2070 802 2070 1248 conicto
-2070 1692 1883 1952 conicto
-1697 2212 1377 2212 conicto
-1376 2560 moveto
-1899 2560 2197 2212 conicto
-2496 1864 2496 1248 conicto
-2496 635 2197 285 conicto
-1899 -64 1376 -64 conicto
-851 -64 553 285 conicto
-256 635 256 1248 conicto
-256 1864 553 2212 conicto
-851 2560 1376 2560 conicto
-end_ol grestore 
-gsave 11.119733 7.095000 translate 0.035278 -0.035278 scale
-start_ol
-2474 1509 moveto
-2474 0 lineto
-2048 0 lineto
-2048 1502 lineto
-2048 1858 1913 2035 conicto
-1778 2212 1509 2212 conicto
-1185 2212 997 1999 conicto
-810 1786 810 1419 conicto
-810 0 lineto
-384 0 lineto
-384 2496 lineto
-810 2496 lineto
-810 2120 lineto
-954 2340 1152 2450 conicto
-1350 2560 1609 2560 conicto
-2037 2560 2255 2293 conicto
-2474 2027 2474 1509 conicto
-end_ol grestore 
-gsave 11.500733 7.095000 translate 0.035278 -0.035278 scale
-start_ol
-2538 1329 moveto
-2538 1124 lineto
-682 1124 lineto
-682 714 908 499 conicto
-1134 284 1537 284 conicto
-1772 284 1991 340 conicto
-2211 396 2432 509 conicto
-2432 128 lineto
-2216 34 1988 -15 conicto
-1760 -64 1526 -64 conicto
-940 -64 598 284 conicto
-256 633 256 1226 conicto
-256 1839 582 2199 conicto
-909 2560 1463 2560 conicto
-1960 2560 2249 2229 conicto
-2538 1898 2538 1329 conicto
-2112 1472 moveto
-2112 1809 1931 2010 conicto
-1751 2212 1453 2212 conicto
-1116 2212 914 2018 conicto
-712 1824 682 1472 conicto
-2112 1472 lineto
-end_ol grestore 
-gsave 11.864800 7.095000 translate 0.035278 -0.035278 scale
-start_ol
-2474 1509 moveto
-2474 0 lineto
-2048 0 lineto
-2048 1502 lineto
-2048 1858 1913 2035 conicto
-1778 2212 1509 2212 conicto
-1185 2212 997 1999 conicto
-810 1786 810 1419 conicto
-810 0 lineto
-384 0 lineto
-384 2496 lineto
-810 2496 lineto
-810 2120 lineto
-954 2340 1152 2450 conicto
-1350 2560 1609 2560 conicto
-2037 2560 2255 2293 conicto
-2474 2027 2474 1509 conicto
-end_ol grestore 
-gsave 12.245800 7.095000 translate 0.035278 -0.035278 scale
-start_ol
-832 3213 moveto
-832 2524 lineto
-1664 2524 lineto
-1664 2176 lineto
-832 2176 lineto
-832 826 lineto
-832 521 914 434 conicto
-997 348 1249 348 conicto
-1664 348 lineto
-1664 0 lineto
-1242 0 lineto
-768 0 587 179 conicto
-406 359 406 826 conicto
-406 2176 lineto
-128 2176 lineto
-128 2524 lineto
-406 2524 lineto
-406 3213 lineto
-832 3213 lineto
-end_ol grestore 
-gsave 13.945000 6.995000 translate 0.035278 -0.035278 scale
-start_ol
-448 3328 moveto
-2313 3328 lineto
-2313 2980 lineto
-874 2980 lineto
-874 1948 lineto
-2173 1948 lineto
-2173 1600 lineto
-874 1600 lineto
-874 27 lineto
-448 27 lineto
-448 3328 lineto
-end_ol grestore 
-gsave 14.239614 6.995000 translate 0.035278 -0.035278 scale
-start_ol
-1842 2133 moveto
-1776 2174 1696 2193 conicto
-1616 2212 1519 2212 conicto
-1177 2212 993 1983 conicto
-810 1755 810 1328 conicto
-810 0 lineto
-384 0 lineto
-384 2496 lineto
-810 2496 lineto
-810 2129 lineto
-937 2347 1141 2453 conicto
-1345 2560 1638 2560 conicto
-1680 2560 1730 2554 conicto
-1781 2548 1842 2536 conicto
-1842 2133 lineto
-end_ol grestore 
-gsave 14.485147 6.995000 translate 0.035278 -0.035278 scale
-start_ol
-1528 1252 moveto
-1050 1252 866 1139 conicto
-682 1026 682 754 conicto
-682 538 820 411 conicto
-958 284 1196 284 conicto
-1523 284 1721 523 conicto
-1920 763 1920 1161 conicto
-1920 1252 lineto
-1528 1252 lineto
-2346 1426 moveto
-2346 0 lineto
-1920 0 lineto
-1920 383 lineto
-1785 154 1579 45 conicto
-1374 -64 1076 -64 conicto
-701 -64 478 154 conicto
-256 373 256 739 conicto
-256 1166 543 1383 conicto
-830 1600 1367 1600 conicto
-1920 1600 lineto
-1920 1639 lineto
-1920 1913 1740 2062 conicto
-1561 2212 1238 2212 conicto
-1032 2212 836 2162 conicto
-641 2113 448 2014 conicto
-448 2386 lineto
-670 2473 879 2516 conicto
-1088 2560 1285 2560 conicto
-1819 2560 2082 2279 conicto
-2346 1998 2346 1426 conicto
-end_ol grestore 
-gsave 14.849214 6.995000 translate 0.035278 -0.035278 scale
-start_ol
-2339 2028 moveto
-2493 2302 2705 2431 conicto
-2918 2560 3204 2560 conicto
-3591 2560 3800 2286 conicto
-4010 2013 4010 1509 conicto
-4010 0 lineto
-3584 0 lineto
-3584 1502 lineto
-3584 1862 3460 2037 conicto
-3336 2212 3082 2212 conicto
-2771 2212 2590 1999 conicto
-2410 1786 2410 1419 conicto
-2410 0 lineto
-1984 0 lineto
-1984 1502 lineto
-1984 1865 1860 2038 conicto
-1736 2212 1477 2212 conicto
-1171 2212 990 1998 conicto
-810 1784 810 1419 conicto
-810 0 lineto
-384 0 lineto
-384 2496 lineto
-810 2496 lineto
-810 2120 lineto
-947 2344 1141 2452 conicto
-1335 2560 1602 2560 conicto
-1871 2560 2060 2423 conicto
-2249 2287 2339 2028 conicto
-end_ol grestore 
-gsave 15.433414 6.995000 translate 0.035278 -0.035278 scale
-start_ol
-2538 1329 moveto
-2538 1124 lineto
-682 1124 lineto
-682 714 908 499 conicto
-1134 284 1537 284 conicto
-1772 284 1991 340 conicto
-2211 396 2432 509 conicto
-2432 128 lineto
-2216 34 1988 -15 conicto
-1760 -64 1526 -64 conicto
-940 -64 598 284 conicto
-256 633 256 1226 conicto
-256 1839 582 2199 conicto
-909 2560 1463 2560 conicto
-1960 2560 2249 2229 conicto
-2538 1898 2538 1329 conicto
-2112 1472 moveto
-2112 1809 1931 2010 conicto
-1751 2212 1453 2212 conicto
-1116 2212 914 2018 conicto
-712 1824 682 1472 conicto
-2112 1472 lineto
-end_ol grestore 
-showpage
diff --git a/openair3/DOCS/TEMPLATES/CODE/images/arch.png b/openair3/DOCS/TEMPLATES/CODE/images/arch.png
deleted file mode 100644
index 24741b93ef5d85d47f4bf2691b6572a2b34f4e90..0000000000000000000000000000000000000000
Binary files a/openair3/DOCS/TEMPLATES/CODE/images/arch.png and /dev/null differ
diff --git a/openair3/DOCS/TEMPLATES/README/Readme.doxy b/openair3/DOCS/TEMPLATES/README/Readme.doxy
deleted file mode 100644
index 43e4e3b87aee0b983feb33b80508ebc02e3579dc..0000000000000000000000000000000000000000
--- a/openair3/DOCS/TEMPLATES/README/Readme.doxy
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
-
-  OPENAIRINTERFACE 0/1/2/3 
-  Copyright(c) 1999 - 2010 EURECOM
-
-  This program is free software; you can redistribute it and/or modify it
-  under the terms and conditions of the GNU General Public License,
-  version 2, as published by the Free Software Foundation.
-
-  This program is distributed in the hope it will be useful, but WITHOUT
-  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-  more details.
-
-  You should have received a copy of the GNU General Public License along with
-  this program; if not, write to the Free Software Foundation, Inc.,
-  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
-
-  The full GNU General Public License is included in this distribution in
-  the file called "COPYING".
-
-  Contact Information:
-  Openair Admin <openair_admin@eurecom.fr>
-  Mailing List <openair_tech@eurecom.fr>
-  Forums  http://forums.eurecom.fr/openairinterface
-  Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France
-
-*******************************************************************************/
-
-/*! \file Readme.doxy
-* \brief explain how this block is organized, and how it works 
-* \author Navid Nikaein
-* \date 2009
-* \version 0.1 
-* \company Eurecom
-* \note This conde is under GNU GENERAL PUBLIC LICENSE, version 2, June 1991
-* \email: navid.nikaein@eurecom.fr
-* \warning 
-*/ 
-
-/*! \mainpage Table of contents
-
-The content of this readme is the following: 
-
-  -# What is this block about in OpenAirInterface
-  -# Folders and files description
-  -# Organization of the folders and their dependancies
-  -# Makefile targets and how to build
-  -# How to use through a tutorial: run a simple experimentation
-
-
-\section _block What is this block about in OpenAirInterface ?
-     
-
-     It essentially means "the hardware part" located at openair0.
-
-     Explain through the figures: 
-     \image html image.png "caption" width=3cm
-     \image latex image.pdf "caption" 
-
-     More information about ???  can be found on the Twiki:
-     https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome
-
-
-\section _folders Folders and files description
-
-The structure is the following: 
-<table>
-<tr><td>File/Folder</td> <td> Description </td> </tr>      
-</table>
-
-- Folder1:     Contains this and that      
-- Folder2:     Contains this and that 
-- init.bash:   A simple script file, that any user SHOULD source from its environment personal set-up script (this is typically ~/.bashrc) by adding the following lines to it:
-	          This is my ~/.bashrc file or equivalent export OPENAIRX=path/to/my/openairX/folder source $OPENAIRX/init.bash.  The file includes variable definitions & path settings to access softwares, sources & Makefiles, software distribution in openair, and so on.
-
-
-YOU DEFINETELY NEED TO SOURCE THIS FILE. Description
-
-\section  _organization Organization of the folders and their dependancies
-    
-
-     The 3 folders have the following structures
-
-     - Folder1/subfolder1/:  contains any ressource related to the design
-
-     - Folder2/subfolder2/: contains 
-
-     - Folder2/src/ 
-
-     - Folder2/lib/ 
-
-     - Folder2/bin/ 
-
-      Explain where are the source files.  
-      Explain the relationship with other Blocks.
-
-    
-\section  _makefile Makefile targets and how to build
-     	  
-     Explain whether you are using symbolic links or not,
-     how to backup/archive
-     how to generate the tags
-     how to print the vars
-     how to create the documentation 
-
-\section _howto How to use through a tutorial: run a simple experimentation
-          ...
-
-
-*/
-
diff --git a/openair3/DOCS/TEMPLATES/README/readme.txt b/openair3/DOCS/TEMPLATES/README/readme.txt
deleted file mode 100644
index 12d67a31dc2e32c87938301a8c27be5661a6f3c8..0000000000000000000000000000000000000000
--- a/openair3/DOCS/TEMPLATES/README/readme.txt
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
-
-  OPENAIRINTERFACE 0/1/2/3 
-  Copyright(c) 1999 - 2010 EURECOM
-
-  This program is free software; you can redistribute it and/or modify it
-  under the terms and conditions of the GNU General Public License,
-  version 2, as published by the Free Software Foundation.
-
-  This program is distributed in the hope it will be useful, but WITHOUT
-  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-  more details.
-
-  You should have received a copy of the GNU General Public License along with
-  this program; if not, write to the Free Software Foundation, Inc.,
-  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
-
-  The full GNU General Public License is included in this distribution in
-  the file called "COPYING".
-
-  Contact Information:
-  Openair Admin <openair_admin@eurecom.fr>
-  Mailing List <openair_tech@eurecom.fr>
-  Forums  http://forums.eurecom.fr/openairinterface
-  Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France
-
-*******************************************************************************/
-/*________________________OEPNAIR/OPENAIR0/________________________
-
- File    : Readme.txt 
- Authors : navid nikaein
- Company : EURECOM
- Emails  : navid.nikaein@eurecom.fr
-________________________________________________________________*/
-
-
--------------------------
-Table of contents
--------------------------
-
-The content of this readme is the following: 
-
-  1) What is this block about in OpenAirInterface
-  2) Folders and files description
-  3) Organization of the folders and their dependancies
-  4) Makefile targets and how to build
-  5) How to use through a tutorial: run a simple experimentation
-
-------------------------------------------------
-1) What is this block about in OpenAirInterface ?
------------------------------------------------
-     
-
-     It essentially means "the hardware part" located at openair0.
-
-     More information about ???  can be found on the Twiki:
-     https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome
-
------------------------------------------
-2) Folders and files description
------------------------------------------
-
-   File/Folder        Description
-    -----------        -----------
-    
-    - Folder1/       contains 
-    
-    - Folder2/       contains 
-    
-    - init.bash          A simple script file, that any user SHOULD source from 
-    		       its environment personal set-up script (this is typically ~/.bashrc) 
-		       by adding the following lines to it:
-
-                        # This is my ~/.bashrc file or equivalent
-                         export OPENAIRX=path/to/my/openairX/folder
-                         source $OPENAIRX/init.bash
-    
-                       The file includes variable definitions & path settings to
-                       access softwares, sources & Makefiles, software
-                       distribution in openair, and so on.
-
-                       YOU DEFINETELY NEED TO SOURCE THIS FILE.
-
-----------------------------------------------------
-3) Organization of the folders and their dependancies
-----------------------------------------------------
-
-     The 3 folders have the following structures
-
-     - Folder1/subfolder1/  contains any ressource related to the design
-
-     - Folder2/subfolder2/ contains 
-
-     - Folder2/src/ 
-
-     - Folder2/lib/ 
-
-     - Folder2/bin/ 
-
-      Explain where are the source files.  
-      Explain the relationship with other Blocks.
-
-    
------------------------------------------
-4)  Makefile targets and how to build
------------------------------------------
-
-     Explain whether you are using symbolic links or not,
-     how to backup/archive
-     how to generate the tags
-     how to print the vars
-     how to create the documentation 
-
-----------------------------------------------------------------
-6)  How to use through a tutorial: run a simple experimentation
-----------------------------------------------------------------
-
-      ...
-
diff --git a/openair3/MESH/COPYING b/openair3/MESH/COPYING
deleted file mode 100644
index 94a9ed024d3859793618152ea559a168bbcbb5e2..0000000000000000000000000000000000000000
--- a/openair3/MESH/COPYING
+++ /dev/null
@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/openair3/MESH/L3_rrc_defs.h b/openair3/MESH/L3_rrc_defs.h
deleted file mode 100644
index a6c82a9828cfb1edfbea70f4c040d5dd7c1c6da4..0000000000000000000000000000000000000000
--- a/openair3/MESH/L3_rrc_defs.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/** @addtogroup _mesh_layer3_
-  * @{ This page describes the interface between the RRC and RRM/RRCI modules for OpenAirInterface Mesh.
-  */
-
-
-#ifndef __L3_RRC_DEFS_H__
-#define __L3_RRC_DEFS_H__
-
-#define MAX_L3_INFO    16
-#define LENGTH_L2_ID   8
-#define IEEE_ADDR_LEN 6
-
-
-#include "COMMON/mac_rrc_primitives.h"
-
-/*! \brief SENDORA scenario active: flags to set at the beginning of the simulation
-*/
-#define WSN            1  ///if wsn = 0 -> secondary network, else sensor network 
-#define SCEN_1         1
-#define SCEN_2_CENTR   0
-#define SCEN_2_DISTR   0
-#define COLL_CLUST     0  //mod_lor_10_11_04
-
-//mod_lor_10_05_05++
-/*!
-*******************************************************************************
-\brief Id of different CRRM entities in case of multiple entities on same machine
-  */
-#define BTS_ID -1
-#define FC_ID -1
-#define CH_COLL_ID -1
-#define FIRST_SENSOR_ID 0
-#define FIRST_SECOND_CLUSTER_USER_ID 5 //add_lor_11_01_06 AAA: if two clusters on two pcs this parameter should be greater than the number of rrm instances
-#define FIRST_MR_ID 8 //mod_lor_11_02_18: if cluster on more than 1 pc, this is the ID of first MR
-//mod_lor_10_05_05--
-
-/*!
- *******************************************************************************
- \brief Parameters about channels:
- *
-*/
-#define NB_OF_SENSORS 3 //!< Number of units that can perform sensing (if scen2_centr it includes secondary users of both clusters)
-#define CH_NEEDED_FOR_SN 1 //!< Number of channels needed by secondary network//mod_lor_10_05_17
-#define SB_NEEDED_FOR_SN 25 //mod_lor_10_05_26: 
-#define NB_SENS_MAX    4  //!< Maximum number of channels accepted by the system; AAA: should be low (4) in SCEN_2 otherwise overflow at rrc level
-#define MAX_NUM_SB 50//mod_eure_lor
-#define SB_BANDWIDTH   180  //! in khz, bandwidth of each sub-band; AAA -> modify only in relation with NUM_SB and sensing parameters in emul_interface!  //mod_lor_10_05_26
-#define NUM_SB 50//mod_eure_lor
-#define LAMBDA0 -90   //mod_lor_10_05_26: for mu0 that is the averaged value
-#define LAMBDA1 -75   //mod_lor_10_05_26: for mu1 that is the maximum value
-#define MIN_NB_SB_CH 25   //mod_lor_10_05_26: for mu1 that is the maximum value
-#define BG 8 //! sub-bands of protection between channels
-#define MAX_USER_NB 5 //! max number of users //add_lor_10_11_03
-
-/*! \brief Transaction ID descriptor
-*/
-typedef unsigned int Transaction_t;
-
-/*! \brief Instance ID descriptor
- */
-typedef unsigned char Instance_t;
-
-/*!\brief Radio Bearer ID descriptor
- */
-typedef unsigned short RB_ID;
-
-
-typedef unsigned short QOS_CLASS_T;
-
-#define LCHAN_BCCH      0
-#define LCHAN_CCCH      1
-#define LCHAN_DCCH      2
-#define LCHAN_DTCH_B    3
-#define LCHAN_DTCH      4
-#define LCHAN_MRBCH     5
-
-/*!\brief Layer 2 Identifier
- */
-
-typedef struct {
-  unsigned char L2_id[LENGTH_L2_ID];
-} L2_ID;
-
-
-
-/*!\brief Measurement Mode
- */
-typedef enum {
-  PERIODIC=0,   /*!< Periodic measurement*/
-  EVENT_DRIVEN  /*!< Event-driven measurement*/
-} MEAS_MODE;
-
-/*!\brief Sensing measurement descriptor
- */
-typedef struct {
-  unsigned char RSSI_Threshold;    /*!< Threshold (minus in dBm) for neighbour RSSI measurement*/
-  unsigned char RSSI_F_Factor;    /*!< Forgetting factor for RSSI averaging*/
-  unsigned short Rep_interval;  /*!< \brief Reporting interval between successive measurement reports in this process*/
-} SENSING_MEAS_DESC;
-
-/*!\brief Sensing measurement information
- */
-typedef struct {
-  unsigned char Rssi;    /*!< RSSI (minus in dBm) for neighbour*/
-  L2_ID L2_id;           /*!< Layer 2 ID for neighbour*/
-} SENSING_MEAS_T;
-
-/*!
-*******************************************************************************
-\brief Structure of sensing information database
-*/
-typedef struct  Sens_ch_s {
-  unsigned int        Start_f    ; ///< frequence initial du canal //mod_lor_10_03_17: intxflot
-  unsigned int        Final_f    ; ///< frequence final du canal   //mod_lor_10_03_17: intxflot
-  unsigned int        Ch_id      ; ///< ID du canal
-  //mod_eure_lor++
-  char I0[MAX_NUM_SB] ;
-  char mu0[MAX_NUM_SB];
-  char mu1[MAX_NUM_SB];
-
-  //float               meas       ; ///< Sensing results
-  unsigned int        is_free  [MAX_NUM_SB]  ; ///< Decision about the channel //mod_lor_10_05_28 ->char instead of int
-  //mod_eure_lor--
-  struct  Sens_ch_s   *next      ; ///< pointeur sur le prochain canal
-} Sens_ch_t ;
-
-/*!
-*******************************************************************************
-\brief Structure that describes the channels
-*/
-typedef struct {
-  unsigned int        Start_f    ; ///< frequence initial du canal //mod_lor_10_03_17: intxflot
-  unsigned int        Final_f    ; ///< frequence final du canal   //mod_lor_10_03_17: intxflot
-  unsigned int        Ch_id      ; ///< ID du canal               //mod_lor_10_03_17: intxflot
-  QOS_CLASS_T         QoS        ; ///< Max QoS possible on the channel
-} CHANNEL_T ;
-
-/*!\brief cooperation type between CHs
- */
-typedef enum {
-  NO_COOP     = 0, //!< No cooperation
-  AMPL_FORW   = 1, //!< amplify and forward collaboration
-  DECO_FORW   = 2, //!< decode and forward collaboration
-} COOPERATION_T;
-/*!
-*******************************************************************************
-\brief Structure that describes the channels
-*/
-typedef struct {
-  //float               Start_f    ; ///< frequence initial du canal
-  //float               Final_f    ; ///< frequence final du canal
-  int                 Ch_id      ; ///< ID du canal
-  //QOS_CLASS_T         QoS        ; ///< Max QoS possible on the channel
-} MAC_INFO_T ;
-
-
-/*!\brief Layer 3 Info types for RRC messages
- */
-typedef enum {
-  NONE_L3     = 0, //!< No information
-  IPv4_ADDR   = 4, //!< IPv4 Address = size Info
-  IPv6_ADDR   =16, //!< IPv6 Address = size Info
-  MAC_ADDR    = 8  //!< MAC Id       = size Info
-} L3_INFO_T;
-
-/*!\brief Layer 3 Info types for RRC messages
- */
-typedef enum {
-  BROADCAST=0,        /*!< Broadcast bearer*/
-  UNICAST,            /*!< Unicast bearer*/
-  MULTICAST           /*!< Multicast bearer*/
-} RB_TYPE;
-
-
-/*!
-*******************************************************************************
-\brief Entete de la file des messages reçus ou a envoyer
-*/
-typedef struct channels_db_s {
-  double               info_time ; ///< information age
-  unsigned int         is_free   ; ///< channel availability   //mod_lor_10_05_28 ->char instead of int
-  unsigned int         priority  ; ///< channel priority
-  unsigned int         is_ass    ; ///< channel used by secondary network
-  L2_ID                source_id ; ///< SU using channel (source)
-  L2_ID                dest_id   ; ///< SU using channel (dest)
-  CHANNEL_T            channel   ; ///< channel description
-  struct channels_db_s *next     ; ///< next node pointer
-} CHANNELS_DB_T ;
-
-#endif //__L3_RRC_DEFS_H__
-/** @} */
diff --git a/openair3/MESH/L3_rrc_interface.h b/openair3/MESH/L3_rrc_interface.h
deleted file mode 100644
index 967e32097bd449385a67500103f16bf176d44350..0000000000000000000000000000000000000000
--- a/openair3/MESH/L3_rrc_interface.h
+++ /dev/null
@@ -1,491 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*! @defgroup _mesh_layer3_ OpenAirInterface MESH L2/L3 Interfaces
- * @{
- */
-
-/*!
-\brief Ask RRC to establish a radio bearer.  Used mainly by CH, except during
-        initialization phase of MR for default bearers (SRB0,SRB1).  Sends
-        CH IPAddr to RRC for attachment signaling (for example during DTCH_B
-        configuration).
- */
-void rrm_rb_establish_req(
-  Instance_t         inst             , //!< Identification de l'instance
-  LCHAN_DESC        *Lchan_desc       , //!< Logical Channel Descriptor Array
-  MAC_RLC_MEAS_DESC *Mac_rlc_meas_desc, //!< MAC/RLC Measurement descriptors for RB
-  L2_ID             *L2_id            , //!< Layer 2 (MAC) IDs for link
-  Transaction_t      Trans_id         , //!< Transaction ID
-  unsigned char     *L3_info          , //!< Optional L3 Information
-  L3_INFO_T          L3_info_t          //!< Type of L3 Information
-);
-/*!
-\brief RRC response to rb_establish_req.  RRC Acknowledgement of reception of
-       rrc_rb_establishment_req.
- */
-void rrc_rb_establish_resp(
-  Instance_t         inst             , //!< Identification de l'instance
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
- \brief RRC confirmation of rb_establish_req.  RRC confirmation of
-         rrc_rb_establishment_req after transactions are complete. Essentially
-         for CH only (except SRB0/1)
- */
-void rrc_rb_establish_cfm(
-  Instance_t         inst             , //!< Identification de l'instance
-  RB_ID              Rb_id            , //!< Radio Bearer ID used by RRC
-  RB_TYPE            RB_type          , //!< Radio Bearer Type
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
-\brief RRC Connection Establishment indication.  Message received by RRM in CH
-       at completion of attachment phase of a new MR (after configuration MR
-       IPAddr). Here L3_info contains MR IPAddr. Message received by RRCI in MR
-       after configuration of initial RBs and reception of CH IPAddr.  Here
-       L3_info contains CH IPAddr.  For MR the RBID's of basic IP services are
-       also required.
-*/
-void rrc_cx_establish_ind(
-  Instance_t         inst             , //!< Identification de l'instance
-  L2_ID              L2_id            , //!< Layer 2 (MAC) ID
-  Transaction_t      Trans_id         , //!< Transaction ID
-  unsigned char     *L3_info          , //!< Optional L3 Information
-  L3_INFO_T          L3_info_t        , //!< Type of L3 Information
-  RB_ID              DTCH_B_id        , //!< RBID of broadcast IP service (MR only)
-  RB_ID              DTCH_id            //!< RBID of default IP service (MR only)
-);
-/*!
-\brief RRCI Connection Establishment response.  Received by RRC in MR at
-       completion of attachment phase and address configuration of a new MR.
-       L3_info contains IPAddr of MR.
-*/
-void rrci_cx_establish_resp(
-  Instance_t         inst             , //!< Identification de l'instance
-  Transaction_t      Trans_id         , //!< Transaction ID
-  unsigned char     *L3_info          , //!< Optional L3 Information
-  L3_INFO_T          L3_info_t          //!< Type of L3 Information
-);
-/*!
-\brief Ask RRC to modify the QoS/Measurements of a radio bearer
- */
-void rrm_rb_modify_req(
-  Instance_t         inst             , //!< Identification de l'instance
-  LCHAN_DESC        *Lchan_desc       , //!< Logical Channel Descriptor Array
-  MAC_RLC_MEAS_DESC *Mac_meas_desc    , //!< MAC/RLC Measurement descriptors for RB
-  RB_ID              Rb_id            , //!< Radio Bearer ID
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
-\brief RRC response to rb_modify_req
- */
-void rrc_rb_modify_resp(
-  Instance_t         inst             , //!< Identification de l'instance
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
-\brief RRC confirmation of rb_modify_req
- */
-void rrc_rb_modify_cfm(
-  Instance_t         inst             , //!< Identification de l'instance
-  RB_ID              Rb_id            , //!< Radio Bearer ID used by RRC
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
-\brief Ask RRC to release a radio bearer
- */
-void rrm_rb_release_req(
-  Instance_t         inst             , //!< Identification de l'instance
-  RB_ID              Rb_id            , //!< Radio Bearer ID
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
-\brief RRC response to rb_release_req
- */
-void rrc_rb_release_resp(
-  Instance_t         inst             , //!< Identification de l'instance
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
-\brief RRC measurement indication
- */
-void rrc_rb_meas_ind(
-  Instance_t         inst             , //!< Identification de l'instance
-  RB_ID              Rb_id            , //!< Radio Bearer ID
-  L2_ID              L2_id            , //!< Layer 2 (MAC) IDs for link
-  MEAS_MODE          Meas_mode        , //!< Measurement mode (periodic or event-driven)
-  MAC_RLC_MEAS_T     Mac_rlc_meas     , //!< MAC/RLC measurements
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-
-/*!
-\brief RRM response to rb_meas_ind
- */
-void rrm_rb_meas_resp(
-  Instance_t         inst             , //!< Identification de l'instance
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
-\brief Configure a sensing measurement
- */
-void rrm_sensing_meas_req(
-  Instance_t         inst             ,  //!< Identification de l'instance
-  L2_ID              L2_id            ,  //!< Layer 2 (MAC) ID
-  SENSING_MEAS_DESC  Sensing_meas_desc,  //!< Sensing Measurement Descriptor
-  Transaction_t      Trans_id            //!< Transaction ID
-);
-/*!
-\brief RRC response to sensing_meas_req
- */
-void rrc_sensing_meas_resp(
-  Instance_t         inst             , //!< Identification de l'instance
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
-\brief RRC sensing measurement indication
- */
-void rrc_sensing_meas_ind(
-  Instance_t         inst             , //!< Identification de l'instance
-  L2_ID              L2_id            , //!< Layer 2 ID (MAC) of sensing node
-  unsigned int       NB_meas          , //!< Layer 2 ID (MAC) of sensing node
-  SENSING_MEAS_T    *Sensing_meas     , //!< Sensing Information
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
-\brief RRM response to sensing_meas_resp
- */
-void rrm_sensing_meas_resp(
-  Instance_t         inst             , //!< Identification de l'instance
-  Transaction_t      Trans_id           //!< Transaction ID
-);
-/*!
-\brief Clusterhead PHY-Synch Indication
- */
-void rrc_phy_synch_to_CH_ind(
-  Instance_t         inst             , //!< Identification de l'instance
-  unsigned int       Ch_index         , //!< Clusterhead index
-  L2_ID              L2_id              //!< Layer 2 ID (MAC) of CH
-);
-/*!
-\brief Mesh router PHY-Synch Indication
- */
-void rrc_phy_synch_to_MR_ind(
-  Instance_t         inst             , //!< Identification de l'instance
-  L2_ID              L2_id              //!< Layer 2 ID (MAC) of MR
-);
-
-/*!
-\brief Clusterhead PHY-Out-of-Synch Indication
- */
-void rrc_phy_out_of_synch_CH_ind(
-  Instance_t          inst             , //!< Identification de l'instance
-  unsigned int        Ch_index           //!< Clusterhead Index
-);
-
-/*!
-\brief MR loss indication
- */
-void rrc_MR_loss_ind(
-  Instance_t          inst             , //!< Identification de l'instance
-  L2_ID               L2_id              //!< Layer 2 (MAC) ID
-);
-/*!
-\brief Release all resources for MR
- */
-void rrm_MR_release_all(
-  Instance_t          inst             , //!< Identification de l'instance
-  L2_ID               L2_id              //!< Layer 2 (MAC) ID
-);
-/*!
-\brief MR attachement indication. Sent by RRC to RRM to indicate the MAC ID of
-       a new MR attached to CH at layer 2
- */
-void rrc_MR_attach_ind(
-  Instance_t         inst              , //!< Identification de l'instance
-  L2_ID              L2_id               //!< Layer 2 (MAC) ID
-);
-/*!
-\brief initialization CH request . Sent by RRM to RRC to create the default
-       Radio bearer : SRB0 and SRB1
- */
-
-void rrm_init_ch_req(
-  Instance_t         inst             , //!< Identification de l'instance
-  Transaction_t      Trans_id         , //!< Transaction ID
-  LCHAN_DESC        *Lchan_desc_srb0  , //!< Logical Channel Descriptor Array for SRB0
-  LCHAN_DESC        *Lchan_desc_srb1  , //!< Logical Channel Descriptor Array for SRB1
-  L2_ID             *L2_id              //!< Layer 2 (MAC) ID
-)  ;
-
-/*!
-\brief initialization MR request . Sent by RRCI to RRC to create the default
-       Radio bearer : SRB0 and SRB1
- */
-void rrci_init_mr_req(
-  Instance_t         inst             , //!< Identification de l'instance
-  Transaction_t      Trans_id         , //!< Transaction ID
-  LCHAN_DESC        *Lchan_desc_srb0  , //!< Logical Channel Descriptor Array for SRB0
-  LCHAN_DESC        *Lchan_desc_srb1  , //!< Logical Channel Descriptor Array for SRB1
-  unsigned char      CH_index         , //!< index to identify the CH
-  L2_ID             *L2_id              //!< Layer 2 (MAC) ID
-);
-
-/*!
-\brief sns and ip sensing measurement indication
- */
-void rrc_update_sens( //mod_lor_10_01_25: RRC function, but also IP function
-  Instance_t         inst             , //!< Identification de l'instance
-  L2_ID              L2_id            , //!< Layer 2 ID (MAC) of sensing node
-  unsigned int       NB_info          , //!< Number of channels info
-  Sens_ch_t          *Sense_meas      , //!< Sensing Information
-  double info_time                      //!< Info time
-);
-
-/*!
-\brief RRC starting sensing request
- */
-void rrc_init_scan_req(
-  Instance_t        inst            , //!< instance ID
-  L2_ID             L2_id           , //!< FC address
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq,
-  Transaction_t     Trans_id          //!< Transaction ID
-);
-
-
-/*!
-\brief RRC ending sensing confirmation
- */
-void rrc_end_scan_conf(
-  Instance_t        inst            , //!< instance ID
-  L2_ID             L2_id           ,
-  Transaction_t     Trans_id          //!< Transaction ID
-
-);
-
-/*!
-\brief RRC ending sensing request (sensors side)
- */
-void rrc_end_scan_req(
-  Instance_t        inst            , //!< instance ID
-  L2_ID             L2_id           ,
-  Transaction_t     Trans_id          //!< Transaction ID
-
-);
-
-/*!
-\brief RRC starting monitoring request
- */
-void rrc_init_mon_req(
-  Instance_t inst           , //!< identification de l'instance
-  L2_ID     L2_id           , //!< FC address
-  unsigned int  *ch_to_scan ,
-  unsigned int  NB_chan     ,
-  unsigned int  interv          , //!< sensing freq.
-  Transaction_t  Trans_id     //!< Transaction ID
-);
-
-
-/*!
-\brief update open frequencies -> correspondent message via IP
-*/
-unsigned int update_open_freq( //mod_lor_10_01_25: IP function; //mod_lor_10_05_18: return unsigned int instead of void
-  Instance_t inst,            //!< instance ID
-  L2_ID L2_id,                //!< L2_id of the FC/CH
-  unsigned int NB_chan,
-  unsigned int *occ_channels  , //!< vector on wich the selected frequencies will be saved //mod_lor_10_05_18
-  CHANNELS_DB_T *fr_channels,
-  Transaction_t Trans_id
-);
-
-/*!
-\brief ask for frequencies   -> correspondent message via IP
- */
-unsigned int open_freq_query( //mod_lor_10_01_25: IP function
-  Instance_t    inst,
-  L2_ID         L2_id           ,
-  QOS_CLASS_T   QoS             ,
-  Transaction_t Trans_id
-);
-
-/*!
-\brief update secondary network frequencies in use  -> correspondent message via IP
- */
-unsigned int update_SN_occ_freq( //mod_lor_10_01_25: IP function
-  Instance_t inst             , //!< instance ID
-  L2_ID L2_id                 , //!< Layer 2 (MAC) ID of BTS
-  unsigned int NB_chan        ,
-  unsigned int *occ_channels  ,
-  Transaction_t Trans_id        //!< Transaction ID
-);
-
-/*!
-\brief RRC cluster scan request from CH1 reported to RRM of CH2
- */
-void rrc_clust_scan_req(
-  Instance_t inst             , //!< instance ID
-  L2_ID L2_id                 , //!< Layer 2 (MAC) ID of CH2
-  float interv                ,
-  COOPERATION_T coop          ,
-  Transaction_t Trans_id
-);
-
-/*!
-\brief RRC starting monitoring request ordered from another CH
- */
-void rrc_clust_mon_req(
-  Instance_t inst           , //!< identification de l'instance
-  L2_ID     L2_id           , //!< CH1 address
-  unsigned int  *ch_to_scan ,
-  unsigned int  NB_chan     ,
-  float     interv          , //!< sensing freq.
-  Transaction_t  Trans_id     //!< Transaction ID
-);
-
-/*!
-\brief RRC reported confirmation about the connection
- */
-void rrc_init_conn_conf(
-  Instance_t    inst      , //!< identification de l'instance
-  L2_ID L2_id             ,
-  unsigned int Session_id ,
-  Transaction_t Trans_id
-);
-
-/*!
-\brief RRC reported confirmation from SU2 on the proposed channels
- */
-void rrc_freq_all_prop_conf(
-  Instance_t    inst              ,
-  L2_ID         L2_id             ,
-  unsigned int Session_id         ,
-  unsigned int NB_free_ch         ,
-  CHANNEL_T   *fr_channels        ,
-  Transaction_t Trans_id
-);
-
-/*!
-\brief RRC reported assignement from CH of a channel (SENDORA scenario 2 distr)
- */
-void rrc_rep_freq_ack(
-  Instance_t    inst              ,
-  L2_ID         L2_id_ch          ,
-  L2_ID         L2_id_source      ,
-  L2_ID         L2_id_dest        ,
-  unsigned int  Session_id        ,
-  CHANNEL_T     all_channel       ,
-  Transaction_t Trans_id
-);
-
-/*!
-\brief RRC init connection request from another SU (SENDORA scenario 2 distr)
- */
-void rrc_init_conn_req(
-  Instance_t    inst            ,
-  L2_ID         L2_id           ,
-  unsigned int Session_id       ,
-  QOS_CLASS_T QoS_class         ,
-  Transaction_t Trans_id
-);
-
-/*!
-\brief RRC reported proposed channels from SU1 in SU2
- */
-void rrc_freq_all_prop(
-  Instance_t    inst              ,
-  L2_ID         L2_id             ,
-  unsigned int Session_id         ,
-  unsigned int NB_free_ch         ,
-  CHANNEL_T   *fr_channels        ,
-  Transaction_t Trans_id
-);
-
-/*!
-\brief RRC reported proposed channels from SU1 in CH
- */
-void rrc_rep_freq_all(
-  Instance_t    inst              ,
-  L2_ID         L2_id_source      ,
-  L2_ID         L2_id_dest        ,
-  unsigned int  Session_id        ,
-  unsigned int  NB_prop_ch        ,
-  CHANNEL_T     *pr_channels      ,
-  Transaction_t Trans_id
-);
-
-/*!
-\brief  IP interface. Updating of the sensing measures -> correspondent message via IP
-*/
-unsigned int update_sens_results(
-  Instance_t inst         , //!< Identification de l'instance
-  L2_ID L2_id             , //!< Adresse L2 of the source of information
-  unsigned int NB_info    , //!< Number of channel info
-  Sens_ch_t *Sens_meas    , //!< Pointer to the sensing information
-  double info_time
-);
-
-/*!
-\brief  Sensing Unit interface. End sensing confirmation
-*/
-void sns_end_scan_conf(
-  Instance_t inst          //!< Identification de l'instance
-);
-
-//mod_lor_10_05_10++
-/*!
-\brief  Updating sensing information received from collaborative Cluster
-*/
-void up_coll_sens_results( //AAA: to add weights for the collaborative cluster information
-  Instance_t inst         , //!< Identification de l'instance
-  L2_ID L2_id             , //!< Adresse L2 of the source of information
-  unsigned int NB_info    , //!< Number of channel info
-  Sens_ch_t *Sens_meas    , //!< Pointer to the sensing information
-  double info_time
-);//mod_lor_10_05_10--
-
-/*!
-\brief  Received request of frequencies from secondary user -> attribute available channels
-*/
-unsigned int ask_freq_to_CH(
-  Instance_t    inst                   , //!< identification de l'instance
-  L2_ID         L2_id[NB_SENS_MAX]     , //!< L2_id of the SU
-  L2_ID         L2_id_dest[NB_SENS_MAX], //!< L2_id of the SU dest
-  unsigned int  N_users                , //!< quality of service required (i.e. number of channels required)
-  Transaction_t Trans_id                 //!< Transaction ID
-);
-
-
-/*! @} */
-
diff --git a/openair3/MESH/RRM/DOC/Doxyfile_rrm b/openair3/MESH/RRM/DOC/Doxyfile_rrm
deleted file mode 100755
index 85eedb8b5c9d0b3076c41429373e66ceadd0ed6b..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/DOC/Doxyfile_rrm
+++ /dev/null
@@ -1,305 +0,0 @@
-# Doxyfile 1.4.6
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME           = "Radio Resource Managment (RRM)"
-PROJECT_NUMBER         = 0.0.1
-OUTPUT_DIRECTORY       = /home/burlot/rrm_nl/doc/rrm/
-CREATE_SUBDIRS         = NO
-OUTPUT_LANGUAGE        = English
-USE_WINDOWS_ENCODING   = NO
-BRIEF_MEMBER_DESC      = YES
-REPEAT_BRIEF           = YES
-ABBREVIATE_BRIEF       = "The $name class" \
-                         "The $name widget" \
-                         "The $name file" \
-                         is \
-                         provides \
-                         specifies \
-                         contains \
-                         represents \
-                         a \
-                         an \
-                         the
-ALWAYS_DETAILED_SEC    = NO
-INLINE_INHERITED_MEMB  = NO
-FULL_PATH_NAMES        = YES
-STRIP_FROM_PATH        = /home/burlot/rrm_nl/
-STRIP_FROM_INC_PATH    = 
-SHORT_NAMES            = NO
-JAVADOC_AUTOBRIEF      = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP         = NO
-INHERIT_DOCS           = YES
-SEPARATE_MEMBER_PAGES  = NO
-TAB_SIZE               = 4
-ALIASES                = 
-OPTIMIZE_OUTPUT_FOR_C  = YES
-OPTIMIZE_OUTPUT_JAVA   = NO
-BUILTIN_STL_SUPPORT    = NO
-DISTRIBUTE_GROUP_DOC   = NO
-SUBGROUPING            = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL            = NO
-EXTRACT_PRIVATE        = NO
-EXTRACT_STATIC         = NO
-EXTRACT_LOCAL_CLASSES  = YES
-EXTRACT_LOCAL_METHODS  = NO
-HIDE_UNDOC_MEMBERS     = YES
-HIDE_UNDOC_CLASSES     = YES
-HIDE_FRIEND_COMPOUNDS  = NO
-HIDE_IN_BODY_DOCS      = NO
-INTERNAL_DOCS          = NO
-CASE_SENSE_NAMES       = YES
-HIDE_SCOPE_NAMES       = NO
-SHOW_INCLUDE_FILES     = YES
-INLINE_INFO            = YES
-SORT_MEMBER_DOCS       = YES
-SORT_BRIEF_DOCS        = NO
-SORT_BY_SCOPE_NAME     = NO
-GENERATE_TODOLIST      = YES
-GENERATE_TESTLIST      = YES
-GENERATE_BUGLIST       = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS       = 
-MAX_INITIALIZER_LINES  = 30
-SHOW_USED_FILES        = YES
-SHOW_DIRECTORIES       = NO
-FILE_VERSION_FILTER    = 
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET                  = NO
-WARNINGS               = YES
-WARN_IF_UNDOCUMENTED   = YES
-WARN_IF_DOC_ERROR      = YES
-WARN_NO_PARAMDOC       = NO
-WARN_FORMAT            = "$file:$line: $text"
-WARN_LOGFILE           = 
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT                  = /home/burlot/rrm_nl/ch_init.c \
-                         /home/burlot/rrm_nl/ch_init.h \
-                         /home/burlot/rrm_nl/cmm_msg.c \
-                         /home/burlot/rrm_nl/cmm_msg.h \
-                         /home/burlot/rrm_nl/debug.h \
-                         /home/burlot/rrm_nl/mr_attach.c \
-                         /home/burlot/rrm_nl/mr_attach.h \
-                         /home/burlot/rrm_nl/msg_mngt.c \
-                         /home/burlot/rrm_nl/msg_mngt.h \
-                         /home/burlot/rrm_nl/neighbor_db.c \
-                         /home/burlot/rrm_nl/neighbor_db.h \
-                         /home/burlot/rrm_nl/pusu_msg.c \
-                         /home/burlot/rrm_nl/pusu_msg.h \
-                         /home/burlot/rrm_nl/rb_db.c \
-                         /home/burlot/rrm_nl/rb_db.h \
-                         /home/burlot/rrm_nl/rb_mngt.c \
-                         /home/burlot/rrm_nl/rb_mngt.h \
-                         /home/burlot/rrm_nl/rrc_msg.c \
-                         /home/burlot/rrm_nl/rrc_msg.h \
-                         /home/burlot/rrm_nl/rrm.c \
-                         /home/burlot/rrm_nl/rrm_constant.c \
-                         /home/burlot/rrm_nl/rrm_constant.h \
-                         /home/burlot/rrm_nl/rrm.h \
-                         /home/burlot/rrm_nl/rrm_sock.c \
-                         /home/burlot/rrm_nl/rrm_sock.h \
-                         /home/burlot/rrm_nl/rrm_util.c \
-                         /home/burlot/rrm_nl/rrm_util.h \
-                         /home/burlot/rrm_nl/interface/cmm_ral_interface.h \
-                         /home/burlot/rrm_nl/interface/cmm_rrm_interface.h \
-                         /home/burlot/rrm_nl/interface/L3_rrc_defs.h \
-                         /home/burlot/rrm_nl/interface/L3_rrc_interface.h \
-                         /home/burlot/rrm_nl/transact.c \
-                         /home/burlot/rrm_nl/transact.h
-FILE_PATTERNS          = *.c \
-                         *.cc \
-                         *.cxx \
-                         *.cpp \
-                         *.c++ \
-                         *.d \
-                         *.java \
-                         *.ii \
-                         *.ixx \
-                         *.ipp \
-                         *.i++ \
-                         *.inl \
-                         *.h \
-                         *.hh \
-                         *.hxx \
-                         *.hpp \
-                         *.h++ \
-                         *.idl \
-                         *.odl \
-                         *.cs \
-                         *.php \
-                         *.php3 \
-                         *.inc \
-                         *.m \
-                         *.mm \
-                         *.dox \
-                         *.py \
-                         *.C \
-                         *.CC \
-                         *.C++ \
-                         *.II \
-                         *.I++ \
-                         *.H \
-                         *.HH \
-                         *.H++ \
-                         *.CS \
-                         *.PHP \
-                         *.PHP3 \
-                         *.M \
-                         *.MM \
-                         *.PY
-RECURSIVE              = NO
-EXCLUDE                = 
-EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
-EXAMPLE_PATH           = 
-EXAMPLE_PATTERNS       = *
-EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             = 
-INPUT_FILTER           = 
-FILTER_PATTERNS        = 
-FILTER_SOURCE_FILES    = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER         = YES
-INLINE_SOURCES         = YES
-STRIP_CODE_COMMENTS    = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION    = YES
-USE_HTAGS              = NO
-VERBATIM_HEADERS       = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = NO
-COLS_IN_ALPHA_INDEX    = 5
-IGNORE_PREFIX          = 
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML          = YES
-HTML_OUTPUT            = html
-HTML_FILE_EXTENSION    = .html
-HTML_HEADER            = 
-HTML_FOOTER            = 
-HTML_STYLESHEET        = 
-HTML_ALIGN_MEMBERS     = YES
-GENERATE_HTMLHELP      = NO
-CHM_FILE               = 
-HHC_LOCATION           = 
-GENERATE_CHI           = NO
-BINARY_TOC             = NO
-TOC_EXPAND             = NO
-DISABLE_INDEX          = NO
-ENUM_VALUES_PER_LINE   = 4
-GENERATE_TREEVIEW      = NO
-TREEVIEW_WIDTH         = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX         = NO
-LATEX_OUTPUT           = latex
-LATEX_CMD_NAME         = latex
-MAKEINDEX_CMD_NAME     = makeindex
-COMPACT_LATEX          = NO
-PAPER_TYPE             = a4wide
-EXTRA_PACKAGES         = 
-LATEX_HEADER           = 
-PDF_HYPERLINKS         = NO
-USE_PDFLATEX           = NO
-LATEX_BATCHMODE        = NO
-LATEX_HIDE_INDICES     = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF           = NO
-RTF_OUTPUT             = rtf
-COMPACT_RTF            = NO
-RTF_HYPERLINKS         = NO
-RTF_STYLESHEET_FILE    = 
-RTF_EXTENSIONS_FILE    = 
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN           = NO
-MAN_OUTPUT             = man
-MAN_EXTENSION          = .3
-MAN_LINKS              = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML           = NO
-XML_OUTPUT             = xml
-XML_SCHEMA             = 
-XML_DTD                = 
-XML_PROGRAMLISTING     = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF   = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD       = NO
-PERLMOD_LATEX          = NO
-PERLMOD_PRETTY         = YES
-PERLMOD_MAKEVAR_PREFIX = 
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING   = YES
-MACRO_EXPANSION        = NO
-EXPAND_ONLY_PREDEF     = NO
-SEARCH_INCLUDES        = YES
-INCLUDE_PATH           = 
-INCLUDE_FILE_PATTERNS  = 
-PREDEFINED             = 
-EXPAND_AS_DEFINED      = 
-SKIP_FUNCTION_MACROS   = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-TAGFILES               = 
-GENERATE_TAGFILE       = 
-ALLEXTERNALS           = NO
-EXTERNAL_GROUPS        = YES
-PERL_PATH              = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS         = NO
-HIDE_UNDOC_RELATIONS   = YES
-HAVE_DOT               = YES
-CLASS_GRAPH            = YES
-COLLABORATION_GRAPH    = YES
-GROUP_GRAPHS           = YES
-UML_LOOK               = NO
-TEMPLATE_RELATIONS     = NO
-INCLUDE_GRAPH          = YES
-INCLUDED_BY_GRAPH      = YES
-CALL_GRAPH             = YES
-GRAPHICAL_HIERARCHY    = YES
-DIRECTORY_GRAPH        = YES
-DOT_IMAGE_FORMAT       = png
-DOT_PATH               = 
-DOTFILE_DIRS           = 
-MAX_DOT_GRAPH_WIDTH    = 1024
-MAX_DOT_GRAPH_HEIGHT   = 1024
-MAX_DOT_GRAPH_DEPTH    = 1000
-DOT_TRANSPARENT        = NO
-DOT_MULTI_TARGETS      = NO
-GENERATE_LEGEND        = YES
-DOT_CLEANUP            = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-SEARCHENGINE           = NO
diff --git a/openair3/MESH/RRM/EMUL/.tmp_versions/kemul_nl.mod b/openair3/MESH/RRM/EMUL/.tmp_versions/kemul_nl.mod
deleted file mode 100755
index faa28584d6682c4c426cb47129317e16ea7544a3..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/EMUL/.tmp_versions/kemul_nl.mod
+++ /dev/null
@@ -1,2 +0,0 @@
-/home/burlot/rrm/emul/kemul_nl.ko
-/home/burlot/rrm/emul/kemul_nl.o
diff --git a/openair3/MESH/RRM/EMUL/Makefile b/openair3/MESH/RRM/EMUL/Makefile
deleted file mode 100755
index 65c2494e265dafd2816bfaa89318290311eb044c..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/EMUL/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-obj-m 		+= kemul_nl.o
-
-all:
-	make -C .. 	
-
-modules:
-	@echo "**** module $(obj-m) ******"
-	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
-	
-cleank:
-	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
diff --git a/openair3/MESH/RRM/EMUL/actdiff.c b/openair3/MESH/RRM/EMUL/actdiff.c
deleted file mode 100755
index 54b63f4a0f35e7ebae822816934bc9943421f856..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/EMUL/actdiff.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       actdiff.c
-
-\brief      Gestion des actions differees d'envoi de messages sur les sockets
-            ( emulation du traitement par un retard )
-
-
-\author     BURLOT Pascal
-
-\date       13/08/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <time.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "rrm_util.h"
-#include "rrm_sock.h"
-#include "actdiff.h"
-
-#define DBG_ACTDIFF 0
-
-#if DBG_ACTDIFF==0
-#define PRINT_ACTDIFF(...)
-#else
-#define PRINT_ACTDIFF(...) print_actdiff( __VA_ARGS__ )
-#endif
-
-
-/******************************************************************************
- * \brief   La fonction affiche a l'ecran la liste
- *
- * \return  aucune valeur retournee
- */
-static void print_actdiff( actdiff_t *pEntry )
-{
-  actdiff_t *pCurrentItem = pEntry;
-
-  fprintf(stderr,"actdiff_t=[\n");
-
-  while ( pCurrentItem != NULL) {
-    fprintf(stderr,"  @%p(.tv=%lf, .id=%d,  .sock=%p,  .msg=%p, .next=%p)\n",
-            pCurrentItem, pCurrentItem->tv, pCurrentItem->id, pCurrentItem->sock,
-            pCurrentItem->msg, pCurrentItem->next);
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  fprintf(stderr," ]\n");
-
-}
-
-/******************************************************************************
- * \brief   La fonction ajoute un element en fin de la liste des actions differees
- *          non-cloturees.
- *
- * \return  retourne le pointeur de debut de liste.
- */
-actdiff_t *add_actdiff(
-  actdiff_t **pEntry ,
-  double delai,
-  int   id,
-  sock_rrm_t   *sock,
-  msg_t  *msg
-)
-{
-  actdiff_t *pNewItem = RRM_MALLOC(actdiff_t , 1 ) ;
-
-  PNULL(pNewItem) ;
-
-  if ( pNewItem == NULL )
-    return NULL ;
-
-  pNewItem->id        =  id                   ;
-  pNewItem->msg       =  msg                  ;
-  pNewItem->sock      =  sock                 ;
-
-  pNewItem->tv        =  get_currentclock() + delai ;
-  pNewItem->next      =  NULL         ;
-
-  if ( *pEntry == NULL ) {
-    *pEntry             =  pNewItem             ;
-  } else {
-    actdiff_t *pCurrentItem = *pEntry;
-    actdiff_t *pNextItem    ;
-
-    while ( pCurrentItem != NULL ) {
-      pNextItem =  pCurrentItem->next ;
-
-      if ( pNextItem == NULL ) {
-        pCurrentItem->next = pNewItem ;
-        break ;
-      }
-
-      pCurrentItem = pNextItem ;
-    }
-  }
-
-  PRINT_ACTDIFF(*pEntry) ;
-
-  return pNewItem ;
-}
-
-/******************************************************************************
- * \brief   La fonction detruit l'action no Id de la liste .
- *
- * \return  aucune valeur.
- */
-void del_actdiff( actdiff_t **pEntry , int   id )
-{
-  actdiff_t *pCurrentItem = *pEntry;
-  actdiff_t *pNextItem    ;
-  actdiff_t **ppPrevItem  = pEntry ;
-
-  if ( (pCurrentItem == NULL)  || (pEntry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-
-    if ( pCurrentItem->id == id ) {
-      *ppPrevItem = pNextItem;
-
-      RRM_FREE( pCurrentItem ) ;
-      break ;
-    }
-
-    ppPrevItem   = &(pCurrentItem->next) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  PRINT_ACTDIFF(*pEntry) ;
-}
-
-
-/******************************************************************************
- * \brief   La fonction traite les actions arrivees a echeance.
- *
- * \return  aucune valeur.
- */
-void processing_actdiff( actdiff_t **pEntry )
-{
-  double tv_current ;
-
-  actdiff_t *pCurrentItem = *pEntry;
-  actdiff_t *pNextItem    ;
-
-  if ( (pCurrentItem == NULL)  || (pEntry==NULL))
-    return ;
-
-  tv_current  =  get_currentclock() ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-
-    if ( pCurrentItem->tv <= tv_current ) {
-      send_msg( pCurrentItem->sock, pCurrentItem->msg ) ;
-      //fprintf(stderr,"act diff: %lf \n", tv_current);
-      del_actdiff(pEntry,pCurrentItem->id) ;
-    }
-
-    pCurrentItem = pNextItem ;
-  }
-}
-
-
-
diff --git a/openair3/MESH/RRM/EMUL/actdiff.h b/openair3/MESH/RRM/EMUL/actdiff.h
deleted file mode 100755
index 9cd58c1bd54e01f636ef2c1707684546dec2861c..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/EMUL/actdiff.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       actdiff.h
-
-\brief      Fichier d'entête
-
-            Il contient les declarations de type, des defines relatif aux
-            fonctions à la gestion des actions differees.
-
-\author     BURLOT Pascal
-
-\date       13/08/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-
-#ifndef ACTDIFF_H
-#define ACTDIFF_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-///< \brief action differee ( a traiter ulterieurement )
-typedef struct actdiff_s {
-  double            tv   ; ///< date du traitement
-  int               id   ; ///< ID de l'action differee
-  sock_rrm_t       *sock ; ///< socket associe
-  msg_t            *msg  ; ///< message a envoyer
-  struct actdiff_s *next ; ///< pointeur sur la prochaine action differee
-} actdiff_t ;
-
-actdiff_t *add_actdiff(
-  actdiff_t **pEntry ,
-  double delai,
-  int   id,
-  sock_rrm_t *sock,
-  msg_t  *msg
-);
-
-void processing_actdiff( actdiff_t **pEntry ) ;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ACTDIFF_H */
diff --git a/openair3/MESH/RRM/EMUL/emul_interface.c b/openair3/MESH/RRM/EMUL/emul_interface.c
deleted file mode 100755
index bef08e8df835e5ae5dfb2fca8f64384fac99339b..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/EMUL/emul_interface.c
+++ /dev/null
@@ -1,1124 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       emul_interface.c
-
-\brief      Emulation des interfaces du RRM (Radio Ressource Manager )
-
-            Cette application d'envoyer des stimuli sur les interfaces RRM:
-                - RRC -> RRM
-                - CMM -> RRM
-
-\author     BURLOT Pascal
-
-\date       10/07/08
-
-
-\par     Historique:
-            L.IACOBELLI 2009-10-19
-                + new messages
-            L.IACOBELLI 2010-04-15
-                + add sensing unit emulation
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-#include <time.h>
-
-#include "debug.h"
-
-#include "L3_rrc_defs.h"
-#include "cmm_rrm_interface.h"
-
-#include "rrm_sock.h"
-#include "cmm_msg.h"
-#include "rrc_rrm_msg.h"
-#include "ip_msg.h" //mod_lor_10_04_27
-#include "pusu_msg.h"
-#include "sensing_rrm_msg.h"
-
-#include "transact.h"
-#include "actdiff.h"
-#include "rrm_util.h"
-#include "rrm_constant.h"
-
-#define NUM_SCENARIO  14
-#define SENSORS_NB 3 //mod_lor_10_03_03
-#define PUSU_EMUL
-/*#define BTS_ID 1
-#define FC_ID 0
-#define CH_COLL_ID 0*/
-
-
-#ifdef RRC_EMUL
-
-extern msg_t *msg_rrc_rb_meas_ind(Instance_t inst, RB_ID Rb_id, L2_ID L2_id, MEAS_MODE Meas_mode, MAC_RLC_MEAS_T *Mac_rlc_meas_t, Transaction_t Trans_id );
-extern msg_t *msg_rrc_sensing_meas_ind( Instance_t inst, L2_ID L2_id, unsigned int NB_meas, SENSING_MEAS_T *Sensing_meas, Transaction_t Trans_id );
-extern msg_t *msg_rrc_sensing_meas_resp( Instance_t inst, Transaction_t Trans_id )  ;
-extern msg_t *msg_rrc_cx_establish_ind( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id,unsigned char *L3_info, L3_INFO_T L3_info_t,
-                                        RB_ID DTCH_B_id, RB_ID DTCH_id );
-extern msg_t *msg_rrc_phy_synch_to_MR_ind( Instance_t inst, L2_ID L2_id);
-extern msg_t *msg_rrc_phy_synch_to_CH_ind( Instance_t inst, unsigned int Ch_index,L2_ID L2_id );
-extern msg_t *msg_rrc_rb_establish_resp( Instance_t inst, Transaction_t Trans_id  );
-extern msg_t *msg_rrc_rb_establish_cfm( Instance_t inst, RB_ID Rb_id, RB_TYPE RB_type, Transaction_t Trans_id );
-extern msg_t *msg_rrc_rb_modify_resp( Instance_t inst, Transaction_t Trans_id );
-extern msg_t *msg_rrc_rb_modify_cfm(Instance_t inst, RB_ID Rb_id, Transaction_t Trans_id  );
-extern msg_t *msg_rrc_rb_release_resp( Instance_t inst, Transaction_t Trans_id );
-extern msg_t *msg_rrc_MR_attach_ind( Instance_t inst, L2_ID L2_id );
-extern msg_t *msg_rrc_update_sens( Instance_t inst,  /*double info_time,*/ L2_ID L2_id, unsigned int NB_info, Sens_ch_t *Sens_meas, Transaction_t Trans_id);
-#endif
-
-#ifdef SNS_EMUL
-extern msg_t *msg_sensing_end_scan_conf ( Instance_t inst);
-#endif
-
-typedef struct {
-  L2_ID               L2_id               ; ///< identification de niveau L2
-  L3_INFO_T           L3_info_t           ; ///< type de l'identification de niveau L3
-  unsigned char       L3_info[MAX_L3_INFO]; ///< identification de niveau L3
-} node_info_t ;
-
-static char c; //mod_lor_10_04_27
-
-/*node_info_t node_info[10] = {
- { .L2_id={{0x00,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} },
- { .L2_id={{0x01,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} },
- { .L2_id={{0x02,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} },
- { .L2_id={{0x03,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} },
- { .L2_id={{0x04,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} },
- { .L2_id={{0x05,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} },
- { .L2_id={{0x06,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} },
- { .L2_id={{0x07,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} },
- { .L2_id={{0x08,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} },
- { .L2_id={{0x09,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} }
-} ;*/
-//mod_lor_10_01_25++
-node_info_t node_info[10] = {
-  { .L2_id={{0x00,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0xC0,0xA8,0x0C,0x43} },
-  { .L2_id={{0x01,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0xC0,0xA8,0x0C,0x14} },
-  { .L2_id={{0x02,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x03,0x03} },
-  { .L2_id={{0x03,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x04,0x04} },
-  { .L2_id={{0x04,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x05,0x05} },
-  { .L2_id={{0x05,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x06,0x06} },
-  { .L2_id={{0x06,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x07,0x07} },
-  { .L2_id={{0x07,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x08,0x08} },
-  { .L2_id={{0x08,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x09,0x09} },
-  { .L2_id={{0x09,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x10,0x10} }
-} ;
-//mod_lor_10_01_25--*/
-/*****************************************************************************
- * \brief  Sensing Parameters
- */
-unsigned int     Start_fr   = 2420000; //!< Low frequency limit KHz
-unsigned int     Stop_fr    = 2438000; //!< High frequency limit KHz
-unsigned int     Meas_band  =   9000;  //!< Channel bandwidth KHz
-unsigned int     Meas_tpf   = 2;    //!< Misuration time per frequency
-unsigned int     Overlap    = 5;    //!< Overlap
-unsigned int     Sampl_freq = 10;   //!< Sample frequency
-
-
-//void print_pusu_msg( neighbor_entry_RRM_to_CMM_t *pEntry );
-
-static int flag_not_exit = 1 ;
-int attached_sensors = 0;//mod_lor_10_01_25
-
-static pthread_t        pthread_rrc_hnd,
-       pthread_sns_hnd,
-       pthread_cmm_hnd ,
-       pthread_pusu_hnd , // Publish Subscribe : -> routing CH
-       pthread_action_differe_hnd;
-
-pthread_mutex_t         cmm_transact_exclu,
-                        rrc_transact_exclu,
-                        sns_transact_exclu;
-
-unsigned int            cmm_transaction=512,
-                        rrc_transaction=256,
-                        sns_transaction=128 ;
-
-transact_t              *cmm_transact_list=NULL,
-                         *rrc_transact_list=NULL,
-                          *sns_transact_list=NULL ;
-
-static RB_ID rb_id      =4 ;
-
-pthread_mutex_t actdiff_exclu;
-actdiff_t       *list_actdiff   = NULL ;
-unsigned int    cnt_actdiff     = 512;
-
-
-extern void scenario(  int num , sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm, sock_rrm_t *s_sns) ;
-
-/*****************************************************************************
- * \brief  thread d'emulation de l'interface du Publish/subcribe (routingCH).
- * \return NULL
- */
-#ifdef PUSU_EMUL
-static void *fn_pusu (
-  void * p_data /**< parametre du pthread */
-)
-{
-  sock_rrm_t *s = (sock_rrm_t *) p_data ;
-  msg_head_t  *header ;
-
-#ifdef TRACE
-  FILE *fd = fopen( "VCD/rrm2pusu.txt", "w") ;
-  PNULL(fd) ;
-#endif
-
-  fprintf(stderr,"PUSU interfaces :starting ...\n");
-
-  while (flag_not_exit) {
-    header = (msg_head_t *) recv_msg(s) ;
-
-    if (header == NULL ) {
-      fprintf(stderr,"Server closed connection\n");
-      //flag_not_exit = 0; //mod_lor_10_04_27
-    } else {
-      char *msg = NULL ;
-
-      if ( header->size > 0 ) {
-        msg = (char *) (header +1) ;
-      }
-
-#ifdef TRACE
-
-      if ( header->msg_type < NB_MSG_RRM_PUSU )
-        fprintf(fd,"%lf RRM->PUSU %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_pusu_rrm[header->msg_type],header->msg_type,header->Trans_id);
-      else
-        fprintf(fd,"%lf RRM->PUSU %-30s %d %d\n",get_currentclock(), "inconnu", header->msg_type,header->Trans_id);
-
-      fflush(fd);
-#endif
-
-      switch ( header->msg_type ) {
-      case RRM_PUBLISH_IND: {
-        //               msg_fct( "[RRM]>[PUSU]:%d:RRM_PUBLISH_IND\n",header->inst);
-        send_msg( s, msg_pusu_resp( header->inst, PUSU_PUBLISH_RESP, header->Trans_id )) ;
-      }
-      break ;
-
-      case RRM_UNPUBLISH_IND: {
-        //                 msg_fct( "[RRM]>[PUSU]:%d:RRM_UNPUBLISH_IND\n",header->inst);
-        send_msg( s, msg_pusu_resp( header->inst, PUSU_UNPUBLISH_RESP, header->Trans_id )) ;
-      }
-      break ;
-
-      case RRM_LINK_INFO_IND: {
-        msg_fct( "[RRM]>[PUSU]:%d:RRM_LINK_INFO_IND\n",header->inst);
-        send_msg( s, msg_pusu_resp( header->inst, PUSU_LINK_INFO_RESP, header->Trans_id )) ;
-      }
-      break ;
-
-      case RRM_SENSING_INFO_IND: {
-        //            msg_fct( "[RRM]>[PUSU]:%d:RRM_SENSING_INFO_IND\n",header->inst);
-        send_msg( s, msg_pusu_resp( header->inst, PUSU_SENSING_INFO_RESP, header->Trans_id )) ;
-      }
-      break ;
-
-      case RRM_CH_LOAD_IND: {
-        //           msg_fct( "[RRM]>[PUSU]:%d:RRM_CH_LOAD_IND\n",header->inst);
-        send_msg( s, msg_pusu_resp( header->inst, PUSU_CH_LOAD_RESP, header->Trans_id )) ;
-      }
-      break ;
-
-      default:
-        fprintf(stderr, "[RRM]>[PUSU]: msg unknown %d\n", header->msg_type) ;
-        //printHex(msg,n,1);
-      }
-
-      RRM_FREE(header);
-    }
-  }
-
-  fprintf(stderr,"... stopped PUSU interfaces\n");
-#ifdef TRACE
-  fclose(fd) ;
-#endif
-
-  return NULL;
-}
-#endif /* PUSU_EMUL */
-
-#ifdef RRC_EMUL
-
-/*****************************************************************************
- * \brief  thread d'emulation de l'interface du rrc.
- * \return NULL
- */
-static void * fn_rrc (
-  void * p_data /**< parametre du pthread */
-)
-{
-  sock_rrm_t *s = (sock_rrm_t *) p_data ;
-  msg_head_t *header ;
-
-#ifdef TRACE
-  FILE *fd = fopen( "VCD/rrm2rrc.txt", "w") ;
-  PNULL(fd) ;
-#endif
-
-  fprintf(stderr,"RRC interfaces :starting ...\n");
-  fprintf(stderr,"prova\n"); //dbg
-
-  while (flag_not_exit) {
-    header = (msg_head_t *) recv_msg(s) ;
-
-    if (header == NULL ) {
-      fprintf(stderr,"Server closed connection\n");
-      //flag_not_exit = 0;//mod_lor_10_04_27
-    } else {
-      char *msg = NULL ;
-
-      if ( header->size > 0 ) {
-        msg = (char *) (header +1) ;
-      }
-
-#ifdef TRACE
-
-      if ( header->msg_type < NB_MSG_RRC_RRM )
-        fprintf(fd,"%lf RRM->RRC %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_rrc_rrm[header->msg_type],header->msg_type,header->Trans_id);
-      else
-        fprintf(fd,"%lf RRM->RRC %-30s %d %d\n",get_currentclock(), "inconnu", header->msg_type,header->Trans_id);
-
-      fflush(fd);
-#endif
-
-      switch ( header->msg_type ) {
-      case RRM_RB_ESTABLISH_REQ: {
-        //rrm_rb_establish_req_t *p = (rrm_rb_establish_req_t *) msg ;
-        msg_fct( "[RRM]>[RRC]:%d:RRM_RB_ESTABLISH_REQ\n",header->inst);
-
-        send_msg( s, msg_rrc_rb_establish_resp( header->inst, header->Trans_id )) ;
-
-        pthread_mutex_lock( &actdiff_exclu  ) ;
-        add_actdiff(&list_actdiff,0.05, cnt_actdiff++,  s,
-                    msg_rrc_rb_establish_cfm( header->inst, rb_id++, UNICAST,header->Trans_id) ) ;
-
-        pthread_mutex_unlock( &actdiff_exclu ) ;
-      }
-      break ;
-
-      case RRM_RB_MODIFY_REQ: {
-        rrm_rb_modify_req_t *p = (rrm_rb_modify_req_t *) msg ;
-        msg_fct( "[RRM]>[RRC]:%d:RRM_RB_MODIFY_REQ\n",header->inst);
-
-        send_msg( s, msg_rrc_rb_modify_resp( header->inst,header->Trans_id )) ;
-
-        pthread_mutex_lock( &actdiff_exclu  ) ;
-
-        add_actdiff(&list_actdiff,0.05, cnt_actdiff++,  s,
-                    msg_rrc_rb_modify_cfm( header->inst, p->Rb_id, header->Trans_id) ) ;
-
-        pthread_mutex_unlock( &actdiff_exclu ) ;
-
-      }
-      break ;
-
-      case RRM_RB_RELEASE_REQ: {
-        //rrm_rb_release_req_t *p = (rrm_rb_release_req_t *) msg ;
-        msg_fct( "[RRM]>[RRC]:%d:RRM_RB_RELEASE_REQ\n",header->inst);
-
-        send_msg( s, msg_rrc_rb_release_resp( header->inst,header->Trans_id )) ;
-      }
-      break ;
-
-      case RRM_SENSING_MEAS_REQ: {
-        //rrm_sensing_meas_req_t *p = (rrm_sensing_meas_req_t *) msg ;
-        msg_fct( "[RRM]>[RRC]:%d:RRM_SENSING_MEAS_REQ\n",header->inst);
-
-        send_msg( s, msg_rrc_sensing_meas_resp( header->inst, header->Trans_id ) );
-      }
-      break ;
-
-      case RRCI_CX_ESTABLISH_RESP: {
-        rrci_cx_establish_resp_t *p = (rrci_cx_establish_resp_t *) msg ;
-        msg_fct( "[RRCI]>[RRC]:%d:RRCI_CX_ESTABLISH_RESP\n",header->inst);
-
-        fprintf(stderr,"L3_id: ");
-        print_L3_id(p->L3_info_t, p->L3_info );
-        fprintf(stderr,"\n");
-
-      }
-      break ;
-
-      case RRM_SENSING_MEAS_RESP: {
-        msg_fct( "[RRM]>[RRC]:%d:RRM_SENSING_MEAS_RESP\n",header->inst);
-      }
-      break ;
-
-      case RRM_RB_MEAS_RESP: {
-        msg_fct( "[RRM]>[RRC]:%d:RRM_RB_MEAS_RESP\n",header->inst);
-      }
-      break ;
-
-      case RRM_INIT_CH_REQ: {
-        msg_fct( "[RRM]>[RRC]:%d:RRM_INIT_CH_REQ\n",header->inst);
-      }
-      break ;
-
-      case RRCI_INIT_MR_REQ: {
-        msg_fct( "[RRM]>[RRC]:%d:RRM_INIT_MR_REQ\n",header->inst);
-      }
-      break ;
-
-      case RRM_INIT_MON_REQ: {
-        rrm_init_mon_req_t *p = (rrm_init_mon_req_t *) msg ;
-        msg_fct( "[RRM]>[RRC]:%d:RRM_INIT_MON_REQ on channels: ",header->inst);
-        fprintf(stdout,"chan nb: %d\n", p->NB_chan); //dbg
-
-        for ( int i=0; i<p->NB_chan; i++)
-          msg_fct("%d ", p->ch_to_scan[i]);
-
-        msg_fct( "\n");
-
-      }
-      break ;
-
-      case RRM_INIT_SCAN_REQ: {
-        msg_fct( "[RRM]>[RRC]:%d:RRM_INIT_SCAN_REQ\n",header->inst);
-
-      }
-      break ;
-
-      case RRM_END_SCAN_REQ: {
-        rrm_end_scan_req_t *p = (rrm_end_scan_req_t *) msg ;
-        msg_fct( "[RRM]>[RRC]:%d:RRM_END_SCAN_REQ on sensor",header->inst);
-
-        for ( int i=0; i<8; i++)
-          msg_fct("%02X", p->L2_id.L2_id[i]);
-
-        msg_fct( "\n");
-
-
-      }
-      break ;
-
-      case RRM_END_SCAN_ORD: {
-        msg_fct( "[RRM]>[RRC]:%d:RRM_END_SCAN_ORD\n",header->inst);
-
-      }
-      break ;
-
-      case RRM_UP_FREQ_ASS : {
-        msg_fct( "[RRM]>[RRC]:%d:RRM_UP_FREQ_ASS\n",header->inst);
-      }
-      break ;
-
-      default :
-        fprintf(stderr, "RRC: msg unknown %d\n", header->msg_type) ;
-        //printHex(msg,n,1);
-      }
-
-      RRM_FREE(header);
-    }
-
-  }
-
-  fprintf(stderr,"... stopped RRC interfaces\n");
-
-#ifdef TRACE
-  fclose(fd) ;
-#endif
-
-  return NULL;
-}
-
-#endif /* RRC_EMUL */
-
-/*****************************************************************************
- * \brief  thread d'emulation de l'interface du cmm.
- * \return NULL
- */
-static void * fn_cmm (
-  void * p_data /**< parametre du pthread */
-)
-{
-  sock_rrm_t *s = (sock_rrm_t *) p_data ;
-  msg_head_t *header ;
-
-#ifdef TRACE
-  FILE *fd = fopen( "VCD/rrm2cmm.txt", "w") ;
-  PNULL(fd) ;
-#endif
-
-  fprintf(stderr,"CMM interfaces :starting ...\n");
-
-  while (flag_not_exit) {
-    header = (msg_head_t *) recv_msg(s) ;
-
-    if (header == NULL ) {
-      fprintf(stderr,"Server closed connection\n");
-      //flag_not_exit = 0;//mod_lor_10_04_27
-    } else {
-      char *msg = NULL ;
-
-      if ( header->size > 0 ) {
-        msg = (char *) (header +1) ;
-      }
-
-#ifdef TRACE
-
-      if ( header->msg_type < NB_MSG_CMM_RRM )
-        fprintf(fd,"%lf RRM->CMM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_cmm_rrm[header->msg_type],header->msg_type,header->Trans_id);
-      else
-        fprintf(fd,"%lf RRM->CMM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id);
-
-      fflush(fd);
-#endif
-
-      switch ( header->msg_type ) {
-      case RRM_CX_SETUP_CNF : {
-        // rrm_cx_setup_cnf_t *p = (rrm_cx_setup_cnf_t *) msg ;
-        //             msg_fct( "[RRM]>[CMM]:%d:RRM_CX_SETUP_CNF\n",header->inst);
-
-        pthread_mutex_lock( &cmm_transact_exclu ) ;
-        del_item_transact( &cmm_transact_list, header->Trans_id );
-        pthread_mutex_unlock( &cmm_transact_exclu ) ;
-      }
-      break ;
-
-      case RRM_CX_MODIFY_CNF : {
-        //rrm_cx_modify_cnf_t *p = (rrm_cx_modify_cnf_t *) msg ;
-        //          msg_fct( "[RRM]>[CMM]:%d:RRM_CX_MODIFY_CNF\n",header->inst);
-      }
-      break ;
-
-      case RRM_CX_RELEASE_CNF : {
-        //rrm_cx_release_cnf_t *p = (rrm_cx_release_cnf_t *) msg ;
-        //          msg_fct( "[RRM]>[CMM]:%d:RRM_CX_RELEASE_CNF\n",header->inst);
-      }
-      break ;
-
-      case RRM_CX_RELEASE_ALL_CNF : {
-        //rrm_cx_release_all_cnf_t *p = (rrm_cx_release_all_cnf_t *) msg ;
-        //         msg_fct( "[RRM]>[CMM]:%d:RRM_CX_RELEASE_ALL_CNF\n",header->inst);
-      }
-      break ;
-
-      case RRCI_ATTACH_REQ : {
-#ifndef PHY_EMUL
-        float delai = 0.05 ;
-#else
-        float delai = 0.00 ;
-#endif
-        rrci_attach_req_t *p = (rrci_attach_req_t *) msg ;
-
-        //         msg_fct( "[RRM]>[CMM]:%d:RRCI_ATTACH_REQ \n",header->inst);
-        //MSG_L2ID(p->L2_id);
-        //add_lor_11_01_07++
-        if (SCEN_2_CENTR)
-          sleep(2);
-
-        //add_lor_11_01_07--
-        pthread_mutex_lock( &actdiff_exclu  ) ;
-
-
-        add_actdiff(&list_actdiff,delai, cnt_actdiff++, s,
-                    msg_cmm_attach_cnf(header->inst,p->L2_id,node_info[header->inst].L3_info_t,node_info[header->inst].L3_info,header->Trans_id ) ) ;
-
-        pthread_mutex_unlock( &actdiff_exclu ) ;
-      }
-      break ;
-
-      case RRM_ATTACH_IND : {
-        //mod_lor: 10_02_09++
-        if (WSN && header->inst == 0) //inst_to_change: remove header->inst == 0 in case WSN and SN not on the same machine
-          attached_sensors ++;//mod_lor: 10_01_25
-
-        //msg_fct( "attached_sensors %d \n\n",attached_sensors); //dbg
-#ifndef PHY_EMUL
-        float delai = 0.05 ;
-#else
-        float delai = 0.00 ;
-#endif
-        //         msg_fct( "[RRM]>[CMM]:%d:RRM_ATTACH_IND\n",header->inst);
-
-        /*   //mod_lor_10_04_27++
-        //if (WSN && attached_sensors==SENSORS_NB && header->inst == 0){ //AAA inst_to_change: remove header->inst == 0 in case WSN and SN not on the same machine
-           //mod_lor_10_03_12++
-           unsigned int     Start_fr   = 1000;
-           unsigned int     Stop_fr    = 2000;
-           unsigned int     Meas_band  = 200;
-           unsigned int     Meas_tpf   = 2;
-           unsigned int     Nb_channels= (Stop_fr-Start_fr)/Meas_band;
-           unsigned int     Overlap    = 5;
-           unsigned int     Sampl_freq = 10;
-
-
-           scanf("%c",&c); //mod_lor_10_04_27
-           if (c == 's'){//mod_lor_10_04_27
-
-               pthread_mutex_lock( &actdiff_exclu  ) ;
-               add_actdiff(&list_actdiff,5, cnt_actdiff++, s,
-                       msg_cmm_init_sensing(header->inst,Start_fr,Stop_fr,Meas_band,Meas_tpf,
-                       Nb_channels,Overlap, Sampl_freq) );
-
-               pthread_mutex_unlock( &actdiff_exclu ) ;  //mod_lor: 10_02_09--
-               scanf("%c",&c); //mod_lor_10_04_27
-           }
-
-           if (c == 'e'){//mod_lor_10_04_27
-               pthread_mutex_lock( &actdiff_exclu  ) ;
-               add_actdiff(&list_actdiff,5, cnt_actdiff++, s,
-                       msg_cmm_stop_sensing(0) );
-
-               pthread_mutex_unlock( &actdiff_exclu ) ;  //mod_lor: 10_02_09--
-           }
-
-        } //mod_lor_10_03_12++
-        //mod_lor_10_04_27--*/
-      }
-      break ;
-
-      case RRM_MR_ATTACH_IND : {
-        L2_ID L2_id_mr;
-#ifndef PHY_EMUL
-        float delai = 0.05 ;
-#else
-        float delai = 0.00 ;
-#endif
-        rrm_MR_attach_ind_t *p = (rrm_MR_attach_ind_t *) msg ;
-
-        //        msg_fct( "[RRM]>[CMM]:%d:RRM_MR_ATTACH_IND\n",header->inst);
-        memcpy( L2_id_mr.L2_id, p->L2_id.L2_id, sizeof(L2_ID));
-
-        //add_lor_11_01_07++
-        if (SCEN_2_CENTR)
-          sleep(2);
-
-        //add_lor_11_01_07--
-        pthread_mutex_lock( &actdiff_exclu  ) ;
-
-        cmm_transaction++;
-        add_actdiff(&list_actdiff,delai, cnt_actdiff++, s,
-                    msg_cmm_cx_setup_req(header->inst,node_info[header->inst].L2_id,L2_id_mr, QOS_DTCH_D, cmm_transaction ) ) ;
-
-        pthread_mutex_unlock( &actdiff_exclu ) ;
-
-        pthread_mutex_lock( &cmm_transact_exclu ) ;
-        add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM,CMM_CX_SETUP_REQ,0,NO_PARENT);
-        pthread_mutex_unlock( &cmm_transact_exclu ) ;
-      }
-      break ;
-
-      case ROUTER_IS_CH_IND : {
-#ifndef PHY_EMUL
-        float delai  = 0.05 ; //mod_lor_10_04_22: 5 instead of 0.05
-        float delai2 = 0.08 ;
-#else
-        float delai  = 0.00 ;
-        float delai2 = 0.00 ;
-#endif
-        router_is_CH_ind_t *p =(router_is_CH_ind_t *)msg ;
-        //         msg_fct( "[RRM]>[CMM]:%d:ROUTER_IS_CH_IND\n",header->inst);
-
-        memcpy( node_info[header->inst].L2_id.L2_id, p->L2_id.L2_id, sizeof(L2_ID));
-        //print_L2_id(&L2_id_ch ); printf("=>L2_id_ch\n");
-
-        pthread_mutex_lock( &actdiff_exclu  ) ;
-
-        add_actdiff(&list_actdiff,delai, cnt_actdiff++,  s,
-                    msg_cmm_init_ch_req( header->inst,node_info[header->inst].L3_info_t,node_info[header->inst].L3_info )) ;
-
-        cmm_transaction++;
-        add_actdiff(&list_actdiff,delai2, cnt_actdiff++, s,
-                    msg_cmm_cx_setup_req(header->inst,node_info[header->inst].L2_id,node_info[header->inst].L2_id, QOS_DTCH_B, cmm_transaction ) ) ;
-
-        pthread_mutex_unlock( &actdiff_exclu ) ;
-
-        pthread_mutex_lock( &cmm_transact_exclu ) ;
-        add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_CX_SETUP_REQ,0,NO_PARENT);
-        pthread_mutex_unlock( &cmm_transact_exclu ) ;
-
-        /*//mod_lor_10_04_27++
-        if (header->inst==1){
-            //scanf("%c",&c); //mod_lor_10_04_27
-            //if (c == 'a'){//mod_lor_10_04_27
-                pthread_mutex_lock( &actdiff_exclu  ) ;
-                add_actdiff(&list_actdiff,20, cnt_actdiff++, s, msg_cmm_ask_freq(header->inst) );
-                pthread_mutex_unlock( &actdiff_exclu ) ;
-            //}
-        }//mod_lor_10_04_27--*/
-      }
-      break ;
-
-      case RRCI_CH_SYNCH_IND : {
-        //            msg_fct( "[RRM]>[CMM]:%d:RRCI_CH_SYNCH_IND\n",header->inst);
-      }
-      break ;
-
-      case RRM_MR_SYNCH_IND : {
-        //                msg_fct( "[RRM]>[CMM]:%d:RRM_MR_SYNCH_IND\n",header->inst);
-      }
-      break ;
-
-      case RRM_NO_SYNCH_IND: {
-        //                msg_fct( "[RRM]>[CMM]:%d:RRM_NO_SYNCH_IND\n",header->inst);
-      }
-      break ;
-
-      default :
-        fprintf(stderr, "CMM:unknown msg %d\n", header->msg_type) ;
-        //printHex(msg,n,1);
-      }
-
-      RRM_FREE(header);
-    }
-  }
-
-  fprintf(stderr,"... stopped CMM interfaces\n");
-
-#ifdef TRACE
-  fclose(fd) ;
-#endif
-
-  return NULL;
-}
-//mod_lor_10_04_15++ -> emulation sensing
-/*****************************************************************************
- * \brief  thread d'emulation de l'interface du Publish/subcribe (routingCH).
- * \return NULL
- */
-#ifdef SNS_EMUL
-static void *fn_sns (
-  void * p_data /**< parametre du pthread */
-)
-{
-  sock_rrm_t *s = (sock_rrm_t *) p_data ;
-  msg_head_t  *header ;
-
-#ifdef TRACE
-  FILE *fd = fopen( "VCD/rrm2sns.txt", "w") ;
-  PNULL(fd) ;
-#endif
-
-  fprintf(stderr,"SNS interfaces :starting ...\n");
-
-  while (flag_not_exit) {
-    header = (msg_head_t *) recv_msg(s) ;
-
-    if (header == NULL ) {
-      fprintf(stderr,"Server closed connection\n");
-      //flag_not_exit = 0; //mod_lor_10_04_27
-    } else {
-      char *msg = NULL ;
-
-      if ( header->size > 0 ) {
-        msg = (char *) (header +1) ;
-      }
-
-#ifdef TRACE
-
-      if ( header->msg_type < NB_MSG_SNS_RRM  )
-        fprintf(fd,"%lf RRM->SENSING %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_sns_rrm[header->msg_type],header->msg_type,header->Trans_id);
-      else
-        fprintf(fd,"%lf RRM->SENSING %-30s %d %d\n",get_currentclock(), "inconnu", header->msg_type,header->Trans_id);
-
-      fflush(fd);
-#endif
-
-      switch ( header->msg_type ) {
-      case RRM_SCAN_ORD: {
-        rrm_scan_ord_t *p  = (rrm_scan_ord_t *) msg ;
-        msg_fct( "[RRM]>[SENSING]:%d:RRM_SCAN_ORD\n",header->inst);
-
-        /*fprintf(stderr,"NB_chan = %d;\nMeas_tpf: %d;\nOverlap: %d;\nSampl_freq: %d;\n",p->NB_chan, p->Meas_tpf, p->Overlap,p->Sampl_freq);//dbg
-        fprintf(stderr,"Channels ids:   ");//dbg
-        for ( int i=0; i<p->NB_chan; i++)//dbg
-            fprintf(stderr," %d     ",p->ch_to_scan[i].Ch_id);//dbg
-        fprintf(stderr," \n\n");//dbg*/
-
-      }
-      break ;
-
-      case RRM_END_SCAN_ORD: {
-        msg_fct( "[RRM]>[SENSING]:%d:RRM_END_SCAN_ORD\n",header->inst);
-        send_msg( s, msg_sensing_end_scan_conf( header->inst)) ;
-
-      }
-      break ;
-
-
-      default:
-        fprintf(stderr, "[RRM]>[SENSING]: msg unknown %d\n", header->msg_type) ;
-        //printHex(msg,n,1);
-      }
-
-      RRM_FREE(header);
-    }
-  }
-
-  fprintf(stderr,"... stopped SENSING interfaces\n");
-#ifdef TRACE
-  fclose(fd) ;
-#endif
-
-  return NULL;
-}
-#endif /* SNS_EMUL */
-
-//mod_lor_10_04_15--
-
-/*****************************************************************************
- * \brief  thread d'emulation de l'interface du cmm.
- * \return NULL
- */
-static void * fn_action_differe (
-  void * p_data /**< parametre du pthread */
-)
-{
-  fprintf(stderr,"thread action differe :starting ...\n");
-
-  while (flag_not_exit) {
-    usleep( 10*1000 ) ;
-
-    //  traitement de liste d'actions differees
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    processing_actdiff(&list_actdiff ) ;
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  }
-
-  fprintf(stderr,"... stopped thread action differe\n");
-  return NULL;
-}
-
-int main( int argc , char **argv )
-{
-  int ret = 0;
-  int tr, rec;
-#ifdef RRC_EMUL
-  sock_rrm_t s_rrc ;
-#endif /* RRC_EMUL */
-#ifdef SNS_EMUL
-  sock_rrm_t s_sns ;
-#endif /* SNS_EMUL */
-  sock_rrm_t s_cmm ;
-  sock_rrm_t s_pusu ;
-
-  /* ***** MUTEX ***** */
-  pthread_attr_t attr ;
-
-  // initialise les attributs des threads
-  pthread_attr_init( &attr ) ;
-  pthread_attr_setschedpolicy( &attr, SCHED_RR ) ;
-
-  pthread_mutex_init( &actdiff_exclu      , NULL ) ;
-  pthread_mutex_init( &cmm_transact_exclu , NULL ) ;
-  pthread_mutex_init( &rrc_transact_exclu , NULL ) ;
-  pthread_mutex_init( &sns_transact_exclu , NULL ) ;
-
-  fprintf(stderr,"Emulation des interfaces\n");
-
-#ifdef RRC_EMUL
-  fprintf(stderr,"Trying to connect... RRM-RRC\n");
-  open_socket(&s_rrc, RRC_RRM_SOCK_PATH, RRM_RRC_SOCK_PATH,0) ;
-
-  if (s_rrc.s  == -1)
-    exit(1);
-
-  fprintf(stderr,"Connected... RRM-RRC (s=%d)\n",s_rrc.s);
-#endif /* RRC_EMUL */
-
-#ifdef SNS_EMUL
-  fprintf(stderr,"Trying to connect... RRM-SNS\n");
-  open_socket(&s_sns, SENSING_RRM_SOCK_PATH, RRM_SENSING_SOCK_PATH,0) ;
-
-  if (s_sns.s  == -1)
-    exit(1);
-
-  fprintf(stderr,"Connected... RRM-SNS (s=%d)\n",s_sns.s);
-#endif /* SNS_EMUL */
-
-
-  fprintf(stderr,"Trying to connect... CRRM-CMM\n");
-  open_socket(&s_cmm,CMM_RRM_SOCK_PATH,RRM_CMM_SOCK_PATH,0) ;
-
-  if (s_cmm.s  == -1)
-    exit(1);
-
-  fprintf(stderr,"Connected... CRRM-CMM (s=%d)\n",s_cmm.s);
-
-#ifdef PUSU_EMUL
-  fprintf(stderr,"Trying to connect... CRRM-PUSU\n");
-  open_socket(&s_pusu,PUSU_RRM_SOCK_PATH,RRM_PUSU_SOCK_PATH,0) ;
-
-  if (s_pusu.s  == -1)
-    exit(1);
-
-  fprintf(stderr,"Connected... CRRM-PUSU (s=%d)\n",s_pusu.s);
-#endif
-
-#ifdef RRC_EMUL
-  /* Creation du thread RRC */
-  fprintf(stderr,"Creation du thread RRC \n");
-  ret = pthread_create ( &pthread_rrc_hnd, NULL, fn_rrc, &s_rrc );
-
-  if (ret) {
-    fprintf(stderr, "%s", strerror (ret));
-  }
-
-#endif /* RRC_EMUL */
-
-#ifdef SNS_EMUL
-  /* Creation du thread SENSING */
-  fprintf(stderr,"Creation du thread SNS \n");
-  ret = pthread_create ( &pthread_sns_hnd, NULL, fn_sns, &s_sns );
-
-  if (ret) {
-    fprintf(stderr, "%s", strerror (ret));
-  }
-
-#endif /* SNS_EMUL */
-
-  /* Creation du thread CMM */
-  ret = pthread_create(&pthread_cmm_hnd , NULL, fn_cmm, &s_cmm );
-
-  if (ret) {
-    fprintf(stderr, "%s", strerror (ret));
-  }
-
-#ifdef PUSU_EMUL
-  /* Creation du thread Publish Subscribe (Routing CH) */
-  ret = pthread_create (&pthread_pusu_hnd , NULL, fn_pusu, &s_pusu );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-  }
-
-#endif /*PUSU_EMUL */
-
-  /* Creation du thread action_differe */
-  ret = pthread_create (&pthread_action_differe_hnd , NULL, fn_action_differe, NULL );
-
-  if (ret) {
-    fprintf(stderr, "%s", strerror (ret));
-  }
-
-#ifdef RRC_EMUL
-  usleep(100000);
-  scenario( NUM_SCENARIO, &s_rrc, &s_cmm, &s_sns );
-#endif /* RRC_EMUL */
-  sleep(5);
-  //mod_lor_11_02_15 ++: reorganization
-  printf("\n\n\nCommands: \n    'q' to exit\n" );
-
-  if(SCEN_2_CENTR || (SCEN_1 && FC_ID>=0)) {
-    printf("    's' to start sensing\n    'e' to end sensing\n" );
-
-    if (SCEN_1)
-      printf("\n\n" );
-  }
-
-  if (SCEN_1 && BTS_ID>=0)
-    printf("    'a' to active BTS request\n\n\n" );
-
-  if (SCEN_2_CENTR)
-    printf("    'c' to active collaborative sensing\n    'a' to active a secondary user\n    'l' to remove a link between two secondary users\n    'd' to disconnect a secondary user\n\n\n" );
-
-  //mod_lor_11_02_15 --
-
-  //getchar() ;//mod_lor_10_04_27
-  while (flag_not_exit) {
-    scanf("%c",&c);
-
-    if (c == 'q')
-      flag_not_exit = 0;//mod_lor_10_04_27
-    else if (c == 's') { //mod_lor_10_04_27
-      printf("Starting sensing ... \n\n");
-      unsigned int     Nb_channels= (Stop_fr-Start_fr)/Meas_band;
-
-      if (Nb_channels>NB_SENS_MAX) {
-        printf("ERROR! too many channels! Maximum number of channels is %d",NB_SENS_MAX);
-        break;
-      }
-
-      pthread_mutex_lock( &actdiff_exclu  ) ;
-      add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm,
-                  msg_cmm_init_sensing(FC_ID,Start_fr,Stop_fr,Meas_band,Meas_tpf,
-                                       Nb_channels,Overlap, Sampl_freq) );
-      pthread_mutex_unlock( &actdiff_exclu ) ;  //mod_lor: 10_02_09--
-    } else if (c == 'd') { //add_lor_10_11_09
-      printf("Select user to disconnect (from 1 to 3)  ... \n");
-      scanf("%d",&tr);
-
-      while (tr<1||tr>3) {
-        printf(" User id not valid!\nSelect user (from 1 to 3)  ... \n");
-        scanf("%d",&tr);
-      }
-
-      //mod_lor_10_12_07++
-      tr = tr+FIRST_SENSOR_ID-1;
-      //mod_lor_10_12_07--
-      pthread_mutex_lock( &actdiff_exclu  ) ;
-      add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, msg_cmm_user_disc(tr) );
-      pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    } else if (c == 'l') { //add_lor_10_11_09
-      printf("Digit id of users involved in the link to remove (from 1 to 3)  ... \n");
-      scanf("%d",&tr);
-
-      while (tr<1||tr>3) {
-        printf(" User id not valid!\nSelect user (from 1 to 3)  ... \n");
-        scanf("%d",&tr);
-      }
-
-      scanf("%d",&rec);
-
-      while (rec<1||rec>3||rec==tr) {
-        if (rec==tr)
-          printf(" A user cannot have a link with itself!\n");
-        else
-          printf(" User id not valid!\n");
-
-        printf("Select user (from 1 to 3)  ... \n");
-        scanf("%d",&rec);
-      }
-
-      //mod_lor_10_12_07++
-      tr = tr+FIRST_SENSOR_ID-1;
-      rec = rec+FIRST_SENSOR_ID-1;
-      //mod_lor_10_12_07--
-
-      pthread_mutex_lock( &actdiff_exclu  ) ;
-      add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, msg_cmm_link_disc(tr,rec) );
-      pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    } else if (c == 'c') { //add_lor_10_11_08
-      printf("Starting collaborative sensing ... \n\n");
-      unsigned int     Nb_channels= (Stop_fr-Start_fr)/Meas_band;
-
-      if (Nb_channels>NB_SENS_MAX) {
-        printf("ERROR! too many channels! Maximum number of channels is %d",NB_SENS_MAX);
-        break;
-      }
-
-      pthread_mutex_lock( &actdiff_exclu  ) ;
-      add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm,
-                  msg_cmm_init_coll_sensing(FC_ID,Start_fr,Stop_fr,Meas_band,Meas_tpf,
-                                            Nb_channels,Overlap, Sampl_freq) );
-      pthread_mutex_unlock( &actdiff_exclu ) ;
-    } else if (c == 'e') { //mod_lor_10_04_27
-      printf("Ending sensing ... \n\n");
-      pthread_mutex_lock( &actdiff_exclu  ) ;
-      add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm,
-                  msg_cmm_stop_sensing(FC_ID) );
-
-      pthread_mutex_unlock( &actdiff_exclu ) ;  //mod_lor: 10_02_09--*/
-    } else if (c == 'a') {
-      if (BTS_ID>=0) {
-        printf("Activating BTS to ask for frequencies  ... \n\n");
-        pthread_mutex_lock( &actdiff_exclu  ) ;
-        add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, msg_cmm_ask_freq(BTS_ID) );
-        pthread_mutex_unlock( &actdiff_exclu ) ;
-      }
-      //mod_lor_10_10_28++
-      //mod_lor_10_10_28--
-      else if (SCEN_2_CENTR) {
-        printf("Select user that wants to transmit (from 1 to 3)  ... \n");
-        scanf("%d",&tr);
-
-        while (tr<1||tr>3) {
-          printf(" User id not valid!\nSelect user that wants to transmit (from 1 to 3)  ... \n");
-          scanf("%d",&tr);
-        }
-
-        printf("Select user destination of the transmission(from 1 to 3)  ... \n");
-        scanf("%d",&rec);
-
-        while (rec<1||rec>3||rec==tr) {
-          if (rec==tr)
-            printf(" Receiver could not be equal to transmitter!\n");
-          else
-            printf(" User id not valid!\n");
-
-          printf("Select user destination (from 1 to 3)  ... \n");
-          scanf("%d",&rec);
-        }
-
-        //mod_lor_10_12_07++
-        tr = tr+FIRST_SENSOR_ID-1;
-        rec = rec+FIRST_SENSOR_ID-1;
-        //mod_lor_10_12_07--
-
-        pthread_mutex_lock( &actdiff_exclu  ) ;
-        add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, msg_cmm_need_to_tx(tr,rec,1) );
-        pthread_mutex_unlock( &actdiff_exclu ) ;
-      } else
-        printf("BTS not connected  ... \n\n");
-    }
-
-  }
-
-  //mod_lor_10_04_27--*/
-
-
-#ifdef RRC_EMUL
-  close_socket(&s_rrc);
-#endif /* RRC_EMUL */
-
-#ifdef SNS_EMUL
-  close_socket(&s_sns);
-#endif /* SNS_EMUL */
-
-  close_socket(&s_cmm);
-
-#ifdef PUSU_EMUL
-  close_socket(&s_pusu);
-#endif /*PUSU_EMUL */
-
-  /* Attente de la fin des threads. */
-  pthread_join (pthread_cmm_hnd, NULL);
-#ifdef PUSU_EMUL
-  pthread_join (pthread_pusu_hnd, NULL);
-#endif /*PUSU_EMUL */
-#ifdef RRC_EMUL
-  pthread_join (pthread_rrc_hnd, NULL);
-#endif /* RRC_EMUL */
-#ifdef SNS_EMUL
-  pthread_join (pthread_sns_hnd, NULL);
-#endif /* SNS_EMUL */
-  pthread_join (pthread_action_differe_hnd, NULL);
-
-  return 0 ;
-}
diff --git a/openair3/MESH/RRM/EMUL/emul_interface.h b/openair3/MESH/RRM/EMUL/emul_interface.h
deleted file mode 100755
index c8eac108e2466beb0bae86ab93c1c06fd96839f9..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/EMUL/emul_interface.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       emul_interface.h
-
-\brief      Fichier d'entête
-
-            Il contient les declarations de type, des defines relatif aux
-            fonctions d'emulation  des interfaces du RRM (Radio Resource
-            Management ).
-
-\author     BURLOT Pascal
-
-\date       15/07/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-
-
-#ifndef EMUL_INTERFACE_H
-#define EMUL_INTERFACE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern pthread_mutex_t   cmm_transact_exclu;
-extern pthread_mutex_t   rrc_transact_exclu;
-
-extern unsigned int      cmm_transaction;
-extern unsigned int      rrc_transaction;
-
-extern pthread_mutex_t   actdiff_exclu;
-extern actdiff_t        *list_actdiff;
-extern unsigned int      cnt_actdiff;
-
-extern transact_t       *cmm_transact_list;
-extern transact_t       *rrc_transact_list;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* EMUL_INTERFACE_H */
diff --git a/openair3/MESH/RRM/EMUL/scenario.c b/openair3/MESH/RRM/EMUL/scenario.c
deleted file mode 100755
index e396038766301c8fe66452ae72150963692f74fd..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/EMUL/scenario.c
+++ /dev/null
@@ -1,1292 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       scenario.c
-
-\brief      Emulation d'un scenario de test  sur les interfaces du RRM
-
-            Cette application d'envoyer des stimuli sur les interfaces RRM:
-                - RRC -> RRM
-                - CMM -> RRM
-
-\author     BURLOT Pascal
-
-\date       10/07/08
-
-
-\par     Historique:
-            IACOBELLI Lorenzo 15/04/2010
-            - scenarios from 14 that include sensing unit emulation
-
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-#include <time.h>
-
-#include "debug.h"
-
-#include "L3_rrc_defs.h"
-#include "cmm_rrm_interface.h"
-
-#include "rrm_sock.h"
-#include "cmm_msg.h"
-#include "rrc_rrm_msg.h"
-#include "ip_msg.h" //mod_lor_10_04_27
-#include "pusu_msg.h"
-#include "sensing_rrm_msg.h" //mod_lor_10_04_15
-
-#include "transact.h"
-#include "actdiff.h"
-#include "rrm_util.h"
-#include "rrm_constant.h"
-#include "emul_interface.h"
-
-extern msg_t *msg_rrc_rb_meas_ind(Instance_t inst, RB_ID Rb_id, L2_ID L2_id, MEAS_MODE Meas_mode, MAC_RLC_MEAS_T *Mac_rlc_meas_t, Transaction_t Trans_id );
-extern msg_t *msg_rrc_sensing_meas_ind( Instance_t inst, L2_ID L2_id, unsigned int NB_meas, SENSING_MEAS_T *Sensing_meas, Transaction_t Trans_id );
-extern msg_t *msg_rrc_sensing_meas_resp( Instance_t inst, Transaction_t Trans_id )  ;
-extern msg_t *msg_rrc_cx_establish_ind( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id,unsigned char *L3_info, L3_INFO_T L3_info_t,
-                                        RB_ID DTCH_B_id, RB_ID DTCH_id );
-extern msg_t *msg_rrc_phy_synch_to_MR_ind( Instance_t inst, L2_ID L2_id);
-extern msg_t *msg_rrc_phy_synch_to_CH_ind( Instance_t inst, unsigned int Ch_index,L2_ID L2_id );
-extern msg_t *msg_rrc_rb_establish_resp( Instance_t inst, Transaction_t Trans_id  );
-extern msg_t *msg_rrc_rb_establish_cfm( Instance_t inst, RB_ID Rb_id, RB_TYPE RB_type, Transaction_t Trans_id );
-extern msg_t *msg_rrc_rb_modify_resp( Instance_t inst, Transaction_t Trans_id );
-extern msg_t *msg_rrc_rb_modify_cfm(Instance_t inst, RB_ID Rb_id, Transaction_t Trans_id  );
-extern msg_t *msg_rrc_rb_release_resp( Instance_t inst, Transaction_t Trans_id );
-extern msg_t *msg_rrc_MR_attach_ind( Instance_t inst, L2_ID L2_id );
-extern msg_t *msg_rrc_update_sens( Instance_t inst, L2_ID L2_id, unsigned int NB_info, Sens_ch_t *Sens_meas, Transaction_t Trans_id);
-extern msg_t *msg_rrc_init_scan_req(Instance_t inst, L2_ID L2_id, unsigned int  Start_fr, unsigned int  Stop_fr,unsigned int Meas_band,
-                                    unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq, Transaction_t Trans_id );
-extern msg_t *msg_rrc_end_scan_conf(Instance_t inst, L2_ID L2_id, Transaction_t Trans_id );
-extern msg_t *msg_rrc_end_scan_req( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id );
-extern msg_t *msg_rrc_init_mon_req(Instance_t inst, L2_ID L2_id, unsigned int *ch_to_scan, unsigned int NB_chan, float interval, Transaction_t Trans_id );
-extern msg_t *msg_rrc_open_freq( Instance_t inst, L2_ID L2_id,unsigned int NB_chan, CHANNEL_T *fr_channels, Transaction_t Trans_id);
-extern msg_t *msg_rrc_ask_for_freq( Instance_t inst, L2_ID L2_id, QOS_CLASS_T QoS, Transaction_t Trans_id );
-extern msg_t *msg_rrc_update_SN_freq( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, unsigned int *occ_channels, Transaction_t Trans_id);
-extern msg_t *msg_rrc_clust_scan_req( Instance_t inst, L2_ID L2_id, float interv, COOPERATION_T coop, Transaction_t Trans_id);
-extern msg_t *msg_rrc_clust_mon_req(Instance_t inst, L2_ID L2_id, unsigned int *ch_to_scan, unsigned int NB_chan, float interval, Transaction_t Trans_id );
-extern msg_t *msg_rrc_init_conn_conf( Instance_t inst, L2_ID L2_id, unsigned int Session_id, Transaction_t Trans_id );
-extern msg_t *msg_rrc_freq_all_prop_conf( Instance_t inst, L2_ID L2_id, unsigned int Session_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels, Transaction_t Trans_id);
-extern msg_t *msg_rrc_rep_freq_ack( Instance_t inst, L2_ID L2_id_ch, L2_ID L2_id_source, L2_ID L2_id_dest, unsigned int Session_id, CHANNEL_T all_channel, Transaction_t Trans_id);
-extern msg_t *msg_rrc_init_conn_req( Instance_t inst, L2_ID L2_id , unsigned int Session_id, QOS_CLASS_T QoS_class, Transaction_t Trans_id );
-extern msg_t *msg_rrc_freq_all_prop( Instance_t inst, L2_ID L2_id, unsigned int Session_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels, Transaction_t Trans_id);
-extern msg_t *msg_rrc_rep_freq_all( Instance_t inst, L2_ID L2_id_source,L2_ID L2_id_dest, unsigned int Session_id, unsigned int NB_prop_ch, CHANNEL_T *pr_channels, Transaction_t Trans_id);
-
-
-L2_ID L2_id_ch  = {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}};
-L2_ID L2_id_fc  = {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}};
-L2_ID L2_id_mr  = {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}};
-L2_ID L2_id_mr2 = {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x33,0x00}};
-L2_ID L2_id_mr3 = {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x44,0x00}};
-L2_ID L2_id_bts = {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x00,0x11}};
-L2_ID L2_id_ch2 = {{0xAA,0xCC,0x33,0x55,0x00,0x22,0x00,0x00}};
-
-unsigned char L3_info_mr3[MAX_L3_INFO] = { 0x0A, 0x00, 3, 3 } ;
-unsigned char L3_info_mr2[MAX_L3_INFO] = { 0x0A, 0x00, 2, 2 } ;
-unsigned char L3_info_mr[MAX_L3_INFO]  = { 0x0A, 0x00, 1, 1 } ;
-unsigned char L3_info_ch[MAX_L3_INFO]  = { 0x0A, 0x00, 0, 0 } ;
-
-//mod_lor_10_03_12++ : init sensing global parameters
-unsigned int     Start_fr   = 1000;
-unsigned int     Stop_fr    = 2000;
-unsigned int     Meas_band  = 200;
-unsigned int     Meas_tpf   = 2;
-unsigned int     Nb_channels= 5;
-unsigned int     Overlap    = 5;
-unsigned int     Sampl_freq = 10;
-//mod_lor_10_03_12--
-
-static void prg_opening_RB( sock_rrm_t *s_cmm, double date, L2_ID *src, L2_ID *dst, QOS_CLASS_T qos )
-{
-  cmm_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm,
-              msg_cmm_cx_setup_req(0,*src,*dst, qos, cmm_transaction ) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &cmm_transact_exclu ) ;
-  add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM,CMM_CX_SETUP_REQ,0,NO_PARENT);
-  pthread_mutex_unlock( &cmm_transact_exclu ) ;
-}
-
-static void prg_modifying_RB( sock_rrm_t *s_cmm, double date, RB_ID Rb_id, QOS_CLASS_T qos )
-{
-  cmm_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm,
-              msg_cmm_cx_modify_req(0,Rb_id, qos, cmm_transaction ) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &cmm_transact_exclu ) ;
-  add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM,CMM_CX_MODIFY_REQ,0,NO_PARENT);
-  pthread_mutex_unlock( &cmm_transact_exclu ) ;
-}
-
-static void prg_releasing_RB( sock_rrm_t *s_cmm, double date, RB_ID Rb_id )
-{
-  cmm_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm,
-              msg_cmm_cx_release_req(0,Rb_id, cmm_transaction ) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &cmm_transact_exclu ) ;
-  add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM,CMM_CX_RELEASE_REQ,0,NO_PARENT);
-  pthread_mutex_unlock( &cmm_transact_exclu ) ;
-}
-
-static void prg_phy_synch_to_MR( sock_rrm_t *s_rrc, double date )
-{
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_phy_synch_to_MR_ind(0, L2_id_ch) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_PHY_SYNCH_TO_MR_IND,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-}
-
-static void prg_rrc_MR_attach_ind( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr  )
-{
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc,
-              msg_rrc_MR_attach_ind(0,*L2_id_mr ) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_MR_ATTACH_IND,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-}
-
-static void prg_rrc_cx_establish_ind(
-  sock_rrm_t *s_rrc, double date,
-  L2_ID *L2_id,
-  unsigned char *L3_info,
-  L3_INFO_T L3_info_t,
-  RB_ID dtch_b_id,
-  RB_ID dtch_id
-)
-{
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc,
-              msg_rrc_cx_establish_ind(0,*L2_id,rrc_transaction, L3_info, L3_info_t, dtch_b_id, dtch_id ) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_CX_ESTABLISH_IND,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-}
-
-static void prg_rrc_sensing_meas_ind( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr,
-                                      int nb_meas, SENSING_MEAS_T *Sensing_meas )
-{
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc,
-              msg_rrc_sensing_meas_ind(0,*L2_id_mr,nb_meas,Sensing_meas, rrc_transaction ) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_SENSING_MEAS_IND,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-}
-
-static void prg_rrc_rb_meas_ind( sock_rrm_t *s_rrc, double date, RB_ID Rb_id, L2_ID *L2_id,MEAS_MODE Meas_mode,
-                                 MAC_RLC_MEAS_T *Mac_rlc_meas )
-{
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc,
-              msg_rrc_rb_meas_ind(0, Rb_id, *L2_id, Meas_mode, Mac_rlc_meas,  rrc_transaction ) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_RB_MEAS_IND,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-}
-
-static void prg_cmm_init_sensing( sock_rrm_t *s_cmm, double date, unsigned int Start_fr,unsigned int Stop_fr,unsigned int Meas_band,unsigned int Meas_tpf,
-                                  unsigned int Nb_channels,unsigned int Overlap,unsigned int Sampl_freq )
-{
-  cmm_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, msg_cmm_init_sensing ( 0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq));
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &cmm_transact_exclu ) ;
-  add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_INIT_SENSING,0,NO_PARENT);
-  pthread_mutex_unlock( &cmm_transact_exclu ) ;
-
-}
-static void prg_rrc_update_sens( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr,
-                                 unsigned int NB_info, Sens_ch_t *Sens_meas )
-{
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_update_sens ( 0, *L2_id_mr, NB_info, Sens_meas, rrc_transaction));
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_UPDATE_SENS,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-static void prg_rrc_init_scan_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_fc,
-                                   unsigned int Start_fr,unsigned int Stop_fr,unsigned int Meas_band,unsigned int Meas_tpf,
-                                   unsigned int Nb_channels,unsigned int Overlap,unsigned int Sampl_freq )
-{
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_init_scan_req ( 0, *L2_id_fc, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq, rrc_transaction));
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_INIT_SCAN_REQ,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_cmm_stop_sensing( sock_rrm_t *s_cmm, double date)
-{
-  cmm_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, msg_cmm_stop_sensing ( 0 ));
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &cmm_transact_exclu ) ;
-  add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_STOP_SENSING,0,NO_PARENT);
-  pthread_mutex_unlock( &cmm_transact_exclu ) ;
-
-}
-
-static void prg_rrc_end_scan_conf( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr )
-{
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_end_scan_conf ( 0, *L2_id_mr, rrc_transaction));
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_END_SCAN_CONF,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_rrc_end_scan_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_fc )
-{
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_end_scan_req ( 0, *L2_id_fc, rrc_transaction));
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_END_SCAN_REQ,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_rrc_init_mon_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_fc, unsigned int *ch_to_scan, unsigned int NB_chan, float interv )
-{
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_init_mon_req ( 0, *L2_id_fc, ch_to_scan, NB_chan, interv, rrc_transaction));
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_INIT_MON_REQ,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-
-/*
-static void prg_cmm_ask_freq( sock_rrm_t *s_cmm, double date)
-{
-    cmm_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, msg_cmm_ask_freq ( 0 ));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &cmm_transact_exclu ) ;
-    add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_ASK_FREQ,0,NO_PARENT);
-    pthread_mutex_unlock( &cmm_transact_exclu ) ;
-
-}
-
-static void prg_rrc_open_freq( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_fc,
-                                    unsigned int NB_chan, CHANNEL_T *fr_channels)
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_open_freq ( 0, *L2_id_fc, NB_chan, fr_channels, rrc_transaction ));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_OPEN_FREQ,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-
-static void prg_rrc_ask_for_freq( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_bts,
-                                   QOS_CLASS_T QoS)
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_ask_for_freq ( 0, *L2_id_bts, QoS, rrc_transaction ));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_ASK_FOR_FREQ,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-
-static void prg_rrc_update_SN_freq( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_bts,
-                                   unsigned int NB_chan, unsigned int *occ_channels)
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_update_SN_freq ( 0, *L2_id_bts, NB_chan, occ_channels, rrc_transaction ));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_UPDATE_SN_FREQ,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_cmm_need_to_tx( sock_rrm_t *s_cmm, double date, QOS_CLASS_T QoS_class)
-{
-    cmm_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, msg_cmm_need_to_tx ( 0, QoS_class ));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &cmm_transact_exclu ) ;
-    add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_NEED_TO_TX,0,NO_PARENT);
-    pthread_mutex_unlock( &cmm_transact_exclu ) ;
-
-}
-
-static void prg_rrc_clust_scan_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_ch2,
-                                   float interv, COOPERATION_T coop)
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_clust_scan_req ( 0, *L2_id_ch2, interv, coop, rrc_transaction ));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_CLUST_SCAN_REQ,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_rrc_clust_mon_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_fc, unsigned int *ch_to_scan, unsigned int NB_chan, float interv )
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_clust_mon_req ( 0, *L2_id_fc, ch_to_scan, NB_chan, interv, rrc_transaction));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_CLUST_MON_REQ,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_cmm_init_trans_req( sock_rrm_t *s_cmm, double date, L2_ID *L2_id_mr2, unsigned int Session_id, QOS_CLASS_T QoS_class)
-{
-    cmm_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, msg_cmm_init_trans_req ( 0, *L2_id_mr2, Session_id,  QoS_class, cmm_transaction));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &cmm_transact_exclu ) ;
-    add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_INIT_TRANS_REQ,0,NO_PARENT);
-    pthread_mutex_unlock( &cmm_transact_exclu ) ;
-
-}
-
-static void prg_rrc_init_conn_conf ( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr2, unsigned int Session_id )
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_init_conn_conf ( 0, *L2_id_mr2, Session_id, rrc_transaction));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_INIT_CONN_CONF,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_rrc_freq_all_prop_conf ( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr2,
-            unsigned int Session_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels   )
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_freq_all_prop_conf ( 0, *L2_id_mr2, Session_id, NB_free_ch, fr_channels, rrc_transaction));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_FREQ_ALL_PROP_CONF,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_rrc_init_conn_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr2, unsigned int Session_id, QOS_CLASS_T QoS_class)
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_init_conn_req ( 0, *L2_id_mr2, Session_id, QoS_class, rrc_transaction));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_INIT_CONN_REQ,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_rrc_freq_all_prop ( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr2,
-            unsigned int Session_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels   )
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_freq_all_prop ( 0, *L2_id_mr2, Session_id, NB_free_ch, fr_channels, rrc_transaction));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_FREQ_ALL_PROP,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_rrc_rep_freq_all ( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr, L2_ID *L2_id_mr2,
-            unsigned int Session_id, unsigned int NB_prop_ch, CHANNEL_T *pr_channels   )
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_rep_freq_all ( 0,  *L2_id_mr, *L2_id_mr2, Session_id, NB_prop_ch, pr_channels, rrc_transaction));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_REP_FREQ_ALL,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}
-
-static void prg_rrc_rep_freq_ack ( sock_rrm_t *s_rrc, double date,  L2_ID *L2_id_ch, L2_ID *L2_id_mr, L2_ID *L2_id_mr2,
-            unsigned int Session_id, CHANNEL_T all_channel   )
-{
-    rrc_transaction++;
-    pthread_mutex_lock( &actdiff_exclu  ) ;
-    add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_rep_freq_ack ( 0,  *L2_id_ch, *L2_id_mr, *L2_id_mr2, Session_id, all_channel, rrc_transaction));
-    pthread_mutex_unlock( &actdiff_exclu ) ;
-
-    pthread_mutex_lock( &rrc_transact_exclu ) ;
-    add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_REP_FREQ_ACK,0,NO_PARENT);
-    pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-}*/
-
-
-
-/* =========================================================================== *
- *                              SCENARII                                       *
- * =========================================================================== */
-
-/**
- * \brief Cette fonction simule le passage de IN en CH (TIMEOUT) ,
- *        ensuite  l'ouverture d'un RB, la modification et finalement la
- *        libération.
- */
-static void scenario0(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm )
-{
-  printf("\nSCENARIO 0: ...\n\n" ) ;
-  // ========================= ISOLATED NODE to CLUSTERHEAD
-  prg_phy_synch_to_MR( s_rrc, 0.1 );
-
-  // ========================= Ouverture d'un RB
-  prg_opening_RB( s_cmm, 2.0, &L2_id_ch,&L2_id_mr,QOS_DTCH_USER1 );
-  // ========================= Modification d'un RB
-  prg_modifying_RB( s_cmm, 2.2 , 5, QOS_DTCH_USER2 );
-  // ========================= Fermeture d'un RB
-  prg_releasing_RB( s_cmm, 2.5, 5 );
-}
-
-/**
- * \brief Cette fonction simule le passage de IN en CH par la reception du
- *        SYNCH d'un MR, et ensuite  l'ouverture d'un RB
- */
-static void scenario1(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm )
-{
-  printf("\nSCENARIO 1: ...\n\n" ) ;
-  // ========================= ISOLATED NODE to CLUSTERHEAD : RRC_PHY_SYNCH_TO_MR_IND
-  prg_phy_synch_to_MR( s_rrc, 0.2 );
-
-  // ========================= Ouverture d'un RB
-  prg_opening_RB( s_cmm, 2.0, &L2_id_ch,&L2_id_mr,QOS_DTCH_USER1 );
-}
-
-/**
- * \brief Cette fonction simule le passage de IN en CH ,
- *        puis l'attachement d'un MR et finalement l'ouverture d'un RB.
- */
-static void scenario2(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  printf("\nSCENARIO 2: ...\n\n" ) ;
-  // ========================= ISOLATED NODE to CLUSTERHEAD
-  prg_phy_synch_to_MR( s_rrc, 0.1 );
-
-  // ========================= Attachement d'un MR
-  prg_rrc_MR_attach_ind( s_rrc, 2.0, &L2_id_mr );
-  prg_rrc_MR_attach_ind( s_rrc, 3.0, &L2_id_mr2 );
-  prg_rrc_MR_attach_ind( s_rrc, 4.0, &L2_id_mr3 );
-
-  // ========================= Indicateur d'une connexion établie
-  prg_rrc_cx_establish_ind( s_rrc, 5.0, &L2_id_mr, L3_info_mr,IPv4_ADDR,0,0);
-  prg_rrc_cx_establish_ind( s_rrc, 6.0, &L2_id_mr2, L3_info_mr2,IPv4_ADDR,0,0);
-  prg_rrc_cx_establish_ind( s_rrc, 7.0, &L2_id_mr3, L3_info_mr3,IPv4_ADDR,0,0);
-}
-
-/**
- * \brief Cette fonction simule le passage de IN en MR par la reception du
- *        SYNCH d'un CH
- */
-static void scenario3(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  printf("\nSCENARIO 3: ...\n\n" ) ;
-
-  // ========================= Attachement d'un MR
-
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,0.2, cnt_actdiff++, s_rrc,msg_rrc_phy_synch_to_CH_ind(0, 1, L2_id_mr ) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_PHY_SYNCH_TO_CH_IND,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-  // ========================= Connexion etablit du MR au CH
-  prg_rrc_cx_establish_ind( s_rrc, 1.0, &L2_id_ch, L3_info_ch,IPv4_ADDR, 10, 20 ) ;
-}
-
-/**
- * \brief Cette fonction simule le passage de IN en CH (TIMEOUT),
- *        puis l'attachement d'un MR ,
- *        puis l'ouverture d'un RB.
- *        puis la remontee de mesures du MR au CH.
- */
-static void scenario4(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  SENSING_MEAS_T Sensing_meas[3]= {
-    { 15, {{0xAA,0xCC,0x33,0x55,0x11,0x00,0x22,0x00}} },
-    { 20, {{0xAA,0xCC,0x33,0x55,0x22,0x00,0x22,0x00}} },
-    { 10, {{0xAA,0xCC,0x33,0x55,0x33,0x00,0x22,0x00}} }
-  };
-  printf("\nSCENARIO 4: ...\n\n" ) ;
-  // ========================= ISOLATED NODE to CLUSTERHEAD
-  prg_phy_synch_to_MR( s_rrc, 0.1 );
-
-  // ========================= Attachement d'un MR
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr  ) ;
-
-  // ========================= Indicateur d'une connexion établie
-  prg_rrc_cx_establish_ind( s_rrc, 5.0, &L2_id_mr, L3_info_mr, IPv4_ADDR, 0, 0 ) ;
-
-  // ========================= Remontée de mesure par le RRC
-
-  // Meas 1
-  prg_rrc_sensing_meas_ind( s_rrc, 5.00, &L2_id_mr, 1, Sensing_meas );
-
-  // Meas 2
-  prg_rrc_sensing_meas_ind( s_rrc, 5.25, &L2_id_mr, 3, Sensing_meas );
-
-  // Meas 3
-  prg_rrc_sensing_meas_ind( s_rrc, 5.50, &L2_id_mr, 2, Sensing_meas );
-
-  // Meas 4
-  prg_rrc_sensing_meas_ind( s_rrc, 5.75, &L2_id_mr, 0, Sensing_meas );
-}
-
-/**
- * \brief Cette fonction simule le passage de IN en CH (TIMEOUT),
- *        puis l'attachement de 3 MR ,
- *        puis l'ouverture d'un RB.
- *        puis la remontee de mesures du MR au CH.
- */
-static void scenario5(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  static SENSING_MEAS_T Sensing_meas[3]= {
-    { 15, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} },
-    { 20, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x44,0x00}} },
-    { 10, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x33,0x00}} }
-  };
-  static SENSING_MEAS_T Sensing_meas2[3]= {
-    { 16, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} },
-    { 25, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} },
-    { 30, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x44,0x00}} }
-  };
-  static SENSING_MEAS_T Sensing_meas3[3]= {
-    { 14, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} },
-    { 17, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} },
-    { 29, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x33,0x00}} }
-  };
-
-  printf("\nSCENARIO 5: ...\n\n" ) ;
-  // ========================= ISOLATED NODE to CLUSTERHEAD :
-  prg_phy_synch_to_MR( s_rrc, 0.1 );
-
-  // ========================= Attachement d'un MR
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr  ) ;
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr2  ) ;
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr3  ) ;
-
-  // =========================  Indicateur d'une connexion établie
-  prg_rrc_cx_establish_ind( s_rrc, 5.0, &L2_id_mr, L3_info_mr, IPv6_ADDR, 0, 0 ) ;
-  prg_rrc_cx_establish_ind( s_rrc, 5.0, &L2_id_mr2, L3_info_mr, IPv6_ADDR, 0, 0 ) ;
-  prg_rrc_cx_establish_ind( s_rrc, 5.0, &L2_id_mr3, L3_info_mr, IPv6_ADDR, 0, 0 ) ;
-
-  // ========================= Remontée de mesure par le RRC
-
-  // Meas 1
-  prg_rrc_sensing_meas_ind( s_rrc, 5.10, &L2_id_mr, 1, Sensing_meas );
-  prg_rrc_sensing_meas_ind( s_rrc, 5.10, &L2_id_mr2, 1, Sensing_meas2 );
-  prg_rrc_sensing_meas_ind( s_rrc, 5.10, &L2_id_mr3, 1, Sensing_meas3 );
-
-  // Meas 2
-  prg_rrc_sensing_meas_ind( s_rrc, 5.25, &L2_id_mr, 2, Sensing_meas );
-  prg_rrc_sensing_meas_ind( s_rrc, 5.25, &L2_id_mr2, 2, Sensing_meas2 );
-  prg_rrc_sensing_meas_ind( s_rrc, 5.25, &L2_id_mr3, 2, Sensing_meas3 );
-
-  // Meas 3
-  prg_rrc_sensing_meas_ind( s_rrc, 5.50, &L2_id_mr, 3, Sensing_meas );
-  prg_rrc_sensing_meas_ind( s_rrc, 5.50, &L2_id_mr2, 3, Sensing_meas2 );
-  prg_rrc_sensing_meas_ind( s_rrc, 5.50, &L2_id_mr3, 3, Sensing_meas3 );
-
-}
-
-/**
- * \brief Cette fonction simule le passage de IN en CH (TIMEOUT) ,
- *        ensuite  l'ouverture d'un RB, la modification et finalement la
- *        libération.
- */
-static void scenario6(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm )
-{
-
-  static MAC_RLC_MEAS_T Meas1_CH= { .Rssi=25 , .Sinr={ 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16}, .Harq_delay =45,
-                                    .Bler=1234,  .rlc_sdu_buffer_occ=13,.rlc_sdu_loss_indicator=25000
-                                  };
-  static MAC_RLC_MEAS_T Meas2_CH= { .Rssi=15 , .Sinr={ 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16}, .Harq_delay =35,
-                                    .Bler=4,  .rlc_sdu_buffer_occ=13,.rlc_sdu_loss_indicator=35000
-                                  };
-
-  static MAC_RLC_MEAS_T Meas1_MR= { .Rssi=35 , .Sinr={ 11,12,13,14, 15,16,17,18, 19,20,21,22, 23,24,25,26}, .Harq_delay =55,
-                                    .Bler=2134,  .rlc_sdu_buffer_occ=23,.rlc_sdu_loss_indicator=15000
-                                  };
-
-  static MAC_RLC_MEAS_T Meas2_MR= { .Rssi=45 , .Sinr={ 11,12,13,14, 15,16,17,18, 19,20,21,22, 23,24,25,26}, .Harq_delay =25,
-                                    .Bler=3000,  .rlc_sdu_buffer_occ=11,.rlc_sdu_loss_indicator=300
-                                  };
-  printf("\nSCENARIO 6: ...\n\n" ) ;
-  // ========================= ISOLATED NODE to CLUSTERHEAD
-  prg_phy_synch_to_MR( s_rrc, 0.1 );
-
-  // ========================= Ouverture d'un RB
-  prg_opening_RB( s_cmm, 2.0, &L2_id_ch,&L2_id_mr,QOS_DTCH_USER1 );
-
-
-  prg_rrc_rb_meas_ind( s_rrc, 2.5, 4 , &L2_id_mr,PERIODIC,&Meas1_MR )  ;
-  prg_rrc_rb_meas_ind( s_rrc, 2.5, 4 , &L2_id_ch,PERIODIC,&Meas1_CH )  ;
-
-  prg_rrc_rb_meas_ind( s_rrc, 2.7, 4 , &L2_id_ch,PERIODIC,&Meas2_CH )  ;
-  prg_rrc_rb_meas_ind( s_rrc, 2.7, 4 , &L2_id_mr,PERIODIC,&Meas2_MR )  ;
-
-}
-
-/**
- * \brief Cette fonction simule la phase de sensing du point de vue du FC,
- *        - l'attachement de 3 sensors,
- *        - le comancement du processus de sensing,
- *        - la remontee de mesures des sensors.
- */
-static void scenario7(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  static Sens_ch_t Sensing_meas[3]= {
-    { 100.1, 200, 1, 13.5, 0, NULL },
-    { 200.1, 300, 2,  7.4, 1, NULL },
-    { 300.1, 400, 3,  8.5, 1, NULL }
-
-  };
-
-  static Sens_ch_t Sensing_meas2[3]= {
-    { 100.1, 200, 1, 23.5, 0, NULL },
-    { 200.1, 300, 2, 27.4, 0, NULL },
-    { 300.1, 400, 3, 28.5, 0, NULL }
-
-  };
-
-  unsigned int occ_channels [2]= {1, 3};
-  printf("\nSCENARIO 7: ...\n\n" ) ;
-
-  // ========================= ISOLATED NODE to CLUSTERHEAD :
-  prg_phy_synch_to_MR( s_rrc, 0.1 );
-
-  // ========================= Attachement d'un MR
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr  ) ;
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr2  ) ;
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr3  ) ;
-
-  // ========================= Starting sensing operation
-
-  prg_cmm_init_sensing( s_cmm,  1, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq);
-  // ========================= Remontée de mesure par le RRC
-
-  prg_rrc_update_sens( s_rrc, 5.10, &L2_id_mr,3, Sensing_meas );
-  prg_rrc_update_sens( s_rrc, 5.20, &L2_id_mr2,3, Sensing_meas );
-  prg_rrc_update_sens( s_rrc, 5.30, &L2_id_mr3,3, Sensing_meas );
-  //prg_rrc_update_sens( s_rrc, 5.50, &L2_id_mr,2, Sensing_meas2 ); // answer to mon request
-
-  // ========================= Frequency query
-  //prg_rrc_ask_for_freq( s_rrc, 5.80, &L2_id_bts, 0);
-
-  //prg_rrc_update_SN_freq( s_rrc, 6, &L2_id_bts, 2, occ_channels);
-  // ========================= End sensing operation
-
-  prg_cmm_stop_sensing( s_cmm, 5.60);
-  //prg_rrc_end_scan_conf( s_rrc, 5.80, &L2_id_mr);
-  //prg_rrc_end_scan_conf( s_rrc, 5.90, &L2_id_mr2);
-  //prg_rrc_end_scan_conf( s_rrc, 6.0,  &L2_id_mr3);
-
-}
-
-
-/**
- * \brief Cette fonction simule la phase de sensing du point de vue du sensor,
- *        - l'attachement de 3 sensors,
- *        - le comancement du processus de sensing,
- *        - la remontee de mesures des sensors.
- */
-static void scenario8(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  static Sens_ch_t Sensing_meas[3]= {
-    { 100, 200, 1, 13.5, 0, NULL },
-    { 200, 300, 2,  7.4, 0, NULL },
-    { 300, 400, 3,  8.5, 0, NULL }
-
-  };
-  static Sens_ch_t Sensing_meas2[3]= {
-    { 100, 200, 1, 23.5, 0, NULL },
-    { 200, 300, 2, 27.4, 0, NULL },
-    { 300, 400, 3, 28.5, 0, NULL }
-
-  };
-
-  /*static SENSING_MEAS_T Sensing_meas2[3]={
-      { 16, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} },
-      { 25, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} },
-      { 30, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x44,0x00}} }
-  };
-  static SENSING_MEAS_T Sensing_meas3[3]={
-      { 14, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} },
-      { 17, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} },
-      { 29, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x33,0x00}} }
-  };*/
-
-  printf("\nSCENARIO 8: ...\n\n" ) ;
-
-  // ========================= Attachement d'un senseur
-
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,0.2, cnt_actdiff++, s_rrc,msg_rrc_phy_synch_to_CH_ind(0, 1, L2_id_ch ) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_PHY_SYNCH_TO_CH_IND,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-  // ========================= Connexion etablit du MR au CH
-  prg_rrc_cx_establish_ind( s_rrc, 1.0, &L2_id_ch, L3_info_ch,IPv4_ADDR, 10, 20 ) ;
-
-  // ========================= Starting sensing operation
-  unsigned int interv= 1;
-  float date = 1.5;
-  prg_rrc_init_scan_req( s_rrc, date, &L2_id_ch,Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq);
-  //prg_cmm_init_sensing( s_cmm, 5.0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq );
-  // ========================= Remontée de mesure par le RRC
-  /*for (int i=0; i<3;i++){
-      date+=interv;
-      prg_rrc_update_sens( s_rrc, date, &L2_id_mr,3, Sensing_meas );
-  }*/
-  // ========================= Monitoring
-  /*unsigned int ch_to_scan[3]={1,2};
-  unsigned int NB_chan= 2;
-  date+=interv;
-  prg_rrc_init_mon_req( s_rrc, date, &L2_id_ch, ch_to_scan, NB_chan, interv );
-  date+=interv;
-  prg_rrc_update_sens( s_rrc, date, &L2_id_mr,NB_chan, Sensing_meas2 );*/
-
-  // ========================= End of sensing
-  date+=interv;
-  prg_rrc_end_scan_req( s_rrc, date, &L2_id_ch );
-
-
-}
-
-
-/**
- * \brief BTS actions in SENDORA first scenario,
- *
- */
-static void scenario9(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  static Sens_ch_t Sensing_meas[3]= {
-    { 100.1, 200, 1, 13.5, 0, NULL },
-    { 200.1, 300, 2,  7.4, 0, NULL },
-    { 300.1, 400, 3,  8.5, 0, NULL }
-
-  };
-
-  /*static CHANNEL_T Free_frequencies[3]={
-      { 100, 200, 1, 1 },
-      { 200, 300, 2, 2 },
-      { 300, 400, 3, 3 }
-
-  };*/
-
-
-  printf("\nSCENARIO 9: ...\n\n" ) ;
-  // ========================= ISOLATED NODE to CLUSTERHEAD (FC) :
-  prg_phy_synch_to_MR( s_rrc, 0.1 );
-
-  //  ========================= Attachement d'un senseur
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr  ) ;
-
-  // ========================= Attachement de la BTS
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_bts  ) ;
-
-  // ========================= Starting frequency query
-  /*if (SCEN_1)
-      prg_cmm_ask_freq ( s_cmm, 2.5 );
-  if (SCEN_2_CENTR)
-      prg_cmm_need_to_tx( s_cmm, 2.5, 1);
-  prg_rrc_open_freq ( s_rrc, 4.0, &L2_id_fc, 3, Free_frequencies );
-  */
-}
-
-/**
- * \brief CH actions in SENDORA second scenario centralized
- */
-static void scenario10(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  static Sens_ch_t Sensing_meas[3]= {
-    { 100.1, 200, 1, 13.5, 0, NULL },
-    { 200.1, 300, 2,  7.4, 1, NULL },
-    { 300.1, 400, 3,  8.5, 1, NULL }
-
-  };
-
-  static Sens_ch_t Sensing_meas2[3]= {
-    { 100.1, 200, 1, 23.5, 0, NULL },
-    { 200.1, 300, 2, 27.4, 0, NULL },
-    { 300.1, 400, 3, 28.5, 0, NULL }
-
-  };
-
-  unsigned int occ_channels [2]= {1, 3};
-  printf("\nSCENARIO 7: ...\n\n" ) ;
-  // ========================= ISOLATED NODE to CLUSTERHEAD :
-  prg_phy_synch_to_MR( s_rrc, 0.1 );
-
-  // ========================= Attachement d'un MR
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr  ) ;
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr2  ) ;
-  //prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr3  ) ;
-
-  // ========================= Starting sensing operation
-  //prg_rrc_clust_scan_req(s_rrc, 5.0, &L2_id_ch, 0.5, 1);
-
-  // ========================= Remontée de mesure par le RRC
-
-  prg_rrc_update_sens( s_rrc, 7.10, &L2_id_mr,3, Sensing_meas );
-  prg_rrc_update_sens( s_rrc, 7.20, &L2_id_mr2,3, Sensing_meas );
-  //prg_rrc_update_sens( s_rrc, 5.30, &L2_id_mr3,3, Sensing_meas );
-
-  // ========================= Monitoring
-  unsigned int ch_to_scan[3]= {1,2};
-  unsigned int NB_chan= 2;
-  unsigned int interv = 0.5;
-  unsigned int date = 8.0;
-  //date+=interv;
-  //prg_rrc_clust_mon_req( s_rrc, date, &L2_id_ch, ch_to_scan, NB_chan, interv );
-  date+=(interv*4);
-  prg_rrc_update_sens( s_rrc, date, &L2_id_mr,NB_chan, Sensing_meas2 );
-  date+=interv;
-  prg_rrc_update_sens( s_rrc, date, &L2_id_mr2,NB_chan, Sensing_meas2 );
-
-
-  // ========================= End sensing operation
-  prg_rrc_end_scan_req( s_rrc, 8.0, &L2_id_ch );
-  //prg_cmm_stop_sensing( s_cmm, 5.60);
-  //prg_rrc_end_scan_conf( s_rrc, 9.80, &L2_id_mr);
-  //prg_rrc_end_scan_conf( s_rrc, 9.90, &L2_id_mr2);
-  //prg_rrc_end_scan_conf( s_rrc, 6.0,  &L2_id_mr3);
-
-}
-
-
-/**
- * \brief This function simulate the connection of two SUs from the first SU point of view
- *
- */
-static void scenario11(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  static Sens_ch_t Sensing_meas[4]= {
-    { 100.1, 200, 1,  3.5, 1, NULL },
-    { 200.1, 300, 2,  7.4, 1, NULL },
-    { 300.1, 400, 3,  8.5, 0, NULL },
-    { 400.1, 500, 4,  2.5, 1, NULL }
-
-  };
-  static Sens_ch_t Sensing_meas2[3]= {
-    { 100.1, 200, 1, 23.5, 0, NULL },
-    { 200.1, 300, 2, 27.4, 0, NULL },
-    { 300.1, 400, 3, 28.5, 0, NULL }
-
-  };
-  /*static CHANNEL_T Free_frequencies[3]={
-      { 100.1, 200, 1, 0 },
-      { 200.1, 300, 2, 0 },
-      { 400.1, 500, 4, 0 }
-
-  };*/
-
-  printf("\nSCENARIO 11: ...\n\n" ) ;
-
-  // ========================= Starting sensing operation
-  unsigned int interv= 1;
-  float date = 1.5;
-  unsigned int Session_id = 7;
-  prg_rrc_init_scan_req( s_rrc, date, &L2_id_ch,Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq);
-
-  //prg_cmm_init_sensing( s_cmm, 5.0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq );
-  // ========================= Remontée de mesure par le RRC
-  for (int i=0; i<3; i++) {
-    date+=interv;
-    prg_rrc_update_sens( s_rrc, date, &L2_id_mr,4, Sensing_meas );
-  }
-
-  // ========================= Transaction
-  /* date+=interv;
-   prg_cmm_init_trans_req( s_cmm, date, &L2_id_mr2, Session_id, 1);
-   date+=interv;
-   prg_rrc_init_conn_conf ( s_rrc, date, &L2_id_mr2, Session_id );
-   date+=interv;
-   prg_rrc_freq_all_prop_conf ( s_rrc, date, &L2_id_mr2, Session_id, 3, Free_frequencies);
-  */
-  // ========================= End of sensing
-  date+=interv;
-  prg_rrc_end_scan_req( s_rrc, date, &L2_id_ch );
-
-
-}
-
-/**
- * \brief This function simulate the connection of two SUs from the second SU point of view
- *
- */
-static void scenario12(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  static Sens_ch_t Sensing_meas[4]= {
-    { 100.1, 200, 1,  3.5, 1, NULL },
-    { 200.1, 300, 2,  7.4, 0, NULL },
-    { 300.1, 400, 3,  8.5, 0, NULL },
-    { 400.1, 500, 4,  2.5, 1, NULL }
-
-  };
-
-  /*static CHANNEL_T Free_frequencies[3]={
-       { 100.1, 200, 1, 0 },
-       { 200.1, 300, 2, 0 },
-       { 400.1, 500, 4, 0 }
-
-   };*/
-
-  printf("\nSCENARIO 12: ...\n\n" ) ;
-
-  // ========================= Starting sensing operation
-  unsigned int interv= 1;
-  float date = 1.5;
-  unsigned int Session_id = 7;
-  prg_rrc_init_scan_req( s_rrc, date, &L2_id_ch,Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq);
-
-  //prg_cmm_init_sensing( s_cmm, 5.0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq );
-  // ========================= Remontée de mesure par le RRC
-  for (int i=0; i<3; i++) {
-    date+=interv;
-    prg_rrc_update_sens( s_rrc, date, &L2_id_mr,4, Sensing_meas );
-  }
-
-  // ========================= Transaction
-  /*date+=interv;
-  prg_rrc_init_conn_req( s_rrc, date, &L2_id_mr2, Session_id, 1);
-  date+=interv;
-  prg_rrc_freq_all_prop ( s_rrc, date, &L2_id_mr2, Session_id, 3, Free_frequencies);
-  date+=interv;
-  prg_rrc_rep_freq_ack ( s_rrc, date,  &L2_id_ch, &L2_id_mr2, &L2_id_mr,
-          Session_id, Free_frequencies[2]   );
-  */
-  // ========================= End of sensing
-  date+=interv;
-  prg_rrc_end_scan_req( s_rrc, date, &L2_id_ch );
-
-
-}
-
-/**
- * \brief This function simulate the connection of two SUs from the CH point of view
- *
- */
-static void scenario13(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm)
-{
-  static Sens_ch_t Sensing_meas[4]= {
-    { 100.1, 200, 1,  3.5, 0, NULL },
-    { 200.1, 300, 2,  7.4, 1, NULL },
-    { 300.1, 400, 3,  8.5, 0, NULL },
-    { 400.1, 500, 4,  2.5, 1, NULL }
-
-  };
-
-  /*static CHANNEL_T Free_frequencies[3]={
-      { 100.1, 200, 1, 0 },
-      { 200.1, 300, 2, 0 },
-      { 400.1, 500, 4, 0 }
-
-  };*/
-
-  printf("\nSCENARIO 13: ...\n\n" ) ;
-
-  // ========================= ISOLATED NODE to CLUSTERHEAD :
-  prg_phy_synch_to_MR( s_rrc, 0.1 );
-
-  // ========================= Attachement d'un MR
-  prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr  ) ;
-  //prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr2  ) ;
-  //prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr3  ) ;
-  // ========================= Starting sensing operation
-  unsigned int interv= 1;
-  float date = 1.5;
-  unsigned int Session_id = 7;
-  prg_rrc_init_scan_req( s_rrc, date, &L2_id_ch,Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq);
-
-  //prg_cmm_init_sensing( s_cmm, 5.0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq );
-  // ========================= Remontée de mesure par le RRC
-  for (int i=0; i<3; i++) {
-    date+=interv;
-    prg_rrc_update_sens( s_rrc, date, &L2_id_mr,4, Sensing_meas );
-  }
-
-  // ========================= Transaction
-  /* date+=interv;
-   prg_rrc_rep_freq_all ( s_rrc, date, &L2_id_mr, &L2_id_mr2,
-           Session_id, 3, Free_frequencies   );
-   */
-  // ========================= End of sensing
-  //date+=interv;
-  //prg_rrc_end_scan_req( s_rrc, date, &L2_id_ch );
-
-
-}
-
-/**
- * \brief Sensor node simulation:
- *      - the node is connected to FC
- *      - the node receives the init scan request order
- *      - the node receive the end scan order
- */
-static void scenario14(sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm, sock_rrm_t *s_sns)
-{
-  static Sens_ch_t Sensing_meas[3]= {
-    { 100, 200, 1, 13.5, 0, NULL },
-    { 200, 300, 2,  7.4, 0, NULL },
-    { 300, 400, 3,  8.5, 0, NULL }
-
-  };
-  static Sens_ch_t Sensing_meas2[3]= {
-    { 100, 200, 1, 23.5, 0, NULL },
-    { 200, 300, 2, 27.4, 0, NULL },
-    { 300, 400, 3, 28.5, 0, NULL }
-
-  };
-
-  /*static SENSING_MEAS_T Sensing_meas2[3]={
-      { 16, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} },
-      { 25, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} },
-      { 30, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x44,0x00}} }
-  };
-  static SENSING_MEAS_T Sensing_meas3[3]={
-      { 14, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} },
-      { 17, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} },
-      { 29, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x33,0x00}} }
-  };*/
-
-  printf("\nSCENARIO 14: ...\n\n" ) ;
-
-  // ========================= Attachement d'un senseur
-
-  rrc_transaction++;
-  pthread_mutex_lock( &actdiff_exclu  ) ;
-  add_actdiff(&list_actdiff,0.2, cnt_actdiff++, s_rrc,msg_rrc_phy_synch_to_CH_ind(0, 1, L2_id_ch ) ) ;
-  pthread_mutex_unlock( &actdiff_exclu ) ;
-
-  pthread_mutex_lock( &rrc_transact_exclu ) ;
-  add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_PHY_SYNCH_TO_CH_IND,0,NO_PARENT);
-  pthread_mutex_unlock( &rrc_transact_exclu ) ;
-
-  // ========================= Connexion etablit du MR au CH
-  prg_rrc_cx_establish_ind( s_rrc, 1.0, &L2_id_ch, L3_info_ch,IPv4_ADDR, 10, 20 ) ;
-
-  // ========================= Starting sensing operation
-  unsigned int interv= 1;
-  float date = 1.5;
-  prg_rrc_init_scan_req( s_rrc, date, &L2_id_ch,Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq);
-  //prg_cmm_init_sensing( s_cmm, 5.0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq );
-  // ========================= Remontée de mesure par le RRC
-  /*for (int i=0; i<3;i++){
-      date+=interv;
-      prg_rrc_update_sens( s_rrc, date, &L2_id_mr,3, Sensing_meas );
-  }*/
-  // ========================= Monitoring
-  /*unsigned int ch_to_scan[3]={1,2};
-  unsigned int NB_chan= 2;
-  date+=interv;
-  prg_rrc_init_mon_req( s_rrc, date, &L2_id_ch, ch_to_scan, NB_chan, interv );
-  date+=interv;
-  prg_rrc_update_sens( s_rrc, date, &L2_id_mr,NB_chan, Sensing_meas2 );*/
-
-  // ========================= End of sensing
-  date+=interv;
-  printf( "prima sns socket -> %d\n" , s_sns->s ) ;//dbg
-  prg_rrc_end_scan_req( s_rrc, date, &L2_id_ch );
-  printf( "dopo sns socket -> %d\n" , s_sns->s ) ;//dbg
-
-}
-
-
-
-void scenario(int num , sock_rrm_t *s_rrc,  sock_rrm_t *s_cmm,  sock_rrm_t *s_sns )
-{
-  switch ( num ) {
-  case 0 :
-    scenario0(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 1 :
-    scenario1(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 2 :
-    scenario2(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 3 :
-    scenario3(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 4 :
-    scenario4(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 5 :
-    scenario5(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 6 :
-    scenario6(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 7 :
-    scenario7(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 8 :
-    scenario8(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 9 :
-    scenario9(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 10 :
-    scenario10(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 11 :
-    scenario11(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 12 :
-    scenario12(s_rrc,  s_cmm ) ;
-    break ;
-
-  case 13 :
-    scenario13(s_rrc,  s_cmm ) ;
-    break ;
-
-    //mod_lor_10_04_15 -> from here scenarios with sensing unit included
-  case 14 :
-    scenario14(s_rrc,  s_cmm, s_sns ) ;
-    break ;
-
-  default:
-    fprintf( stderr,"Erreur : '%d' => Numero de test inconnu\n" , num ) ;
-  }
-}
diff --git a/openair3/MESH/RRM/GRAPH/Makefile b/openair3/MESH/RRM/GRAPH/Makefile
deleted file mode 100755
index 069b1c714aa6ee7de04d6d2f5c00f4b658570252..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/GRAPH/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-CCC = gcc
-
-
-OPENAIR3_DIR = ../../../openair3
-OPENAIR2_DIR = ../../../openair2
-
-OPENAIR3_MESH_RRM_GRAPH = $(OPENAIR3_DIR)/MESH/RRM/GRAPH
-OPENAIR3_MESH_RRM = $(OPENAIR3_DIR)/MESH/RRM
-OPENAIR3_MESH = $(OPENAIR3_DIR)/MESH
- 
-GRAPH_OBJS = graph_sock.o
-
-OBJ += $(GRAPH_OBJS)
-
-CFLAGS += -DOPENAIR2_IN -DUSER_MODE
-
-all: graph
-$(OBJ) : %.o : %.c  
-	$(CC) -c $(CFLAGS) -I$(OPENAIR2_DIR) -I$(OPENAIR3_MESH) -I$(OPENAIR3_MESH_RRM) -I$(OPENAIR3_MESH_RRM_GRAPH) -o $@ $< 
-
-graph : $(OBJ) graph_int.c 
-	$(CC) graph_int.c -o graph -I$(OPENAIR2_DIR) -I$(OPENAIR3_MESH) -I$(OPENAIR3_MESH_RRM) -I$(OPENAIR3_MESH_RRM_GRAPH) $(CFLAGS) $(OBJ) 
-clean : 
-	rm -rf *.o 
-
-
-
-
-
-
-
diff --git a/openair3/MESH/RRM/GRAPH/graph b/openair3/MESH/RRM/GRAPH/graph
deleted file mode 100755
index 08b1c62f6d573ff9800c5104e965bc22bbb2d948..0000000000000000000000000000000000000000
Binary files a/openair3/MESH/RRM/GRAPH/graph and /dev/null differ
diff --git a/openair3/MESH/RRM/GRAPH/graph_enum.h b/openair3/MESH/RRM/GRAPH/graph_enum.h
deleted file mode 100644
index 1a61b4842a780b6d635609862aafd301c7f96bdc..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/GRAPH/graph_enum.h
+++ /dev/null
@@ -1,196 +0,0 @@
-
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       graph_enum.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI.
-
-
-
-\author     IACOBELLI Lorenzo
-
-\date       20/04/10
-
-\par     Historique:
-
-
-*******************************************************************************
-*/
-
-#ifndef __GRAPH_ENUM_H
-#define __GRAPH_ENUM_H
-
-//mod_lor_10_05_12++
-
-/*! \brief SENDORA scenario active: flags to set at the beginning of the simulation
-*/
-#define WSN            1  ///if wsn = 0 -> secondary network, else sensor network 
-#define SCEN_1         1
-#define SCEN_2_CENTR   0
-#define SCEN_2_DISTR   0
-#define COLL_CLUST     0  //mod_lor_10_11_04
-
-//mod_lor_10_05_12--*/
-
-#define BTS_ID -1  //put -1 in case we are not in SCEN_1
-#define FC_ID -1
-#define CH_COLL_ID -1
-#define NB_SENS_MAX 4
-#define FIRST_SENSOR_ID 0
-#define FIRST_SECOND_CLUSTER_USER_ID 5 //add_lor_11_01_06
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-/*!
-*******************************************************************************
-\brief  Enumeration des messages entre RRM/RRCI et le RRC
-*/
-typedef enum {
-  SNS_UPDATE_SENS             , ///< Message SENSING->RRM : update of the sensing information measured by the nodes
-  RRM_SCAN_ORD                , ///< Message RRM->SENSING : order to scann indicated channels
-  RRM_END_SCAN_ORD            , ///< Message RRM->SENSING : end of a scanning process in sensors
-  SNS_END_SCAN_CONF           , ///< Message SENSING->RRC : end of a scanning process in sensors
-  NB_MSG_SNS_RRM                ///< Nombre de message RRM-SENSING
-}
-MSG_SENSING_RRM_T ;
-
-
-/*!
-*******************************************************************************
-\brief  Enumeration des messages entre RRM/RRCI et le RRC
-*/
-typedef enum {
-  RRM_RB_ESTABLISH_REQ = 0    , ///< Message RRM->RRC : requete d'etablissement d'un RB
-  RRC_RB_ESTABLISH_RESP       , ///< Message RRC->RRM : reponse d'etablissement d'un RB
-  RRC_RB_ESTABLISH_CFM        , ///< Message RRC->RRM : confirmation d'etablissement d'un RB
-  RRM_RB_MODIFY_REQ           , ///< Message RRM->RRC : requete de modification d'un RB
-  RRC_RB_MODIFY_RESP          , ///< Message RRC->RRM : reponse de modification d'un RB
-  RRC_RB_MODIFY_CFM           , ///< Message RRC->RRM : confirmation de modification d'un RB
-  RRM_RB_RELEASE_REQ          , ///< Message RRM->RRC : requete de liberation d'un RB
-  RRC_RB_RELEASE_RESP         , ///< Message RRC->RRM : reponse de liberation d'un RB
-  RRC_MR_ATTACH_IND           , ///< Message RRC->RRM : indication d'attachement d'un MR
-  RRM_SENSING_MEAS_REQ        , ///< Message RRM->RRC : requete de configuration de mesure sensing
-  RRC_SENSING_MEAS_RESP       , ///< Message RRC->RRM : reponse de configuration de mesure sensing
-  RRC_CX_ESTABLISH_IND        , ///< Message RRC->RRM : indication de connexion etablie
-  RRC_PHY_SYNCH_TO_MR_IND     , ///< Message RRC->RRM : indication de synchronisation physique a un MR
-  RRC_PHY_SYNCH_TO_CH_IND     , ///< Message RRC->RRM : indication de synchronisation physique a un CH
-  RRCI_CX_ESTABLISH_RESP      , ///< Message RRCI->RRC : reponse de connexion etablie
-  RRC_SENSING_MEAS_IND        , ///< Message RRC->RRM : indication de nouvel mesure de sensing
-  RRM_SENSING_MEAS_RESP       , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure de sensing
-  RRC_RB_MEAS_IND             , ///< Message RRC->RRM : indication de nouvel mesure sur un RB
-  RRM_RB_MEAS_RESP            , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure sur un RB
-  RRM_INIT_CH_REQ             , ///< Message RRM->RRC : init d'un CH
-  RRCI_INIT_MR_REQ            , ///< Message RRM->RRC : init d'un MR
-  RRM_INIT_MON_REQ            , ///< Message RRM->RRC : initiation of a scanning monitoring
-  RRM_INIT_SCAN_REQ           , ///< Message RRM->RRC : initiation of a scanning process
-  RRC_INIT_SCAN_REQ           , ///< Message RRC->RRM : initiation of a scanning process
-  //UPDATE_SENS_RESULTS_3       , ///< Message IP       : update to send to CH/FC //mod_lor_10_01_25
-  RRM_END_SCAN_REQ            , ///< Message RRM->RRC : end of a scanning process
-  RRC_END_SCAN_REQ            , ///< Message RRC->RRM : end of a scanning process
-  RRC_END_SCAN_CONF           , ///< Message RRC->RRM : end of a scanning process ack
-  RRC_INIT_MON_REQ            , ///< Message IP       : initiation of a scanning monitoring
-  RRM_UP_FREQ_ASS             , ///< Message RRM->RRC : BTS assigns channels to SUs
-  RRM_END_SCAN_CONF           , ///< Message RRM->RRC : end of a scanning process
-  RRC_UP_FREQ_ASS             , ///< Message RRC->RRM ://mod_lor_10_06_04
-  RRM_UP_FREQ_ASS_SEC         , ///< Message RRM->RRC : CH assigns channels to SUs (scen2) //add_lor_10_11_05
-  RRC_UP_FREQ_ASS_SEC         , ///< Message RRC->RRM : frequencies assigned by CH (scen2)  //add_lor_10_11_05
-  NB_MSG_RRC_RRM                ///< Nombre de message RRM-RRC
-
-} MSG_RRC_RRM_T ;
-
-/*!
-*******************************************************************************
-\brief  Enumeration des messages entre le RRM/RRCI et le CMM
-*/
-typedef enum {
-  CMM_CX_SETUP_REQ = 0    , ///< Message CMM->RRM : requete de configuration d'une connexion
-  RRM_CX_SETUP_CNF        , ///< Message RRM->CMM : confirmation de configuration d'une connexion
-  CMM_CX_MODIFY_REQ       , ///< Message CMM->RRM : requete de modification d'une connexion
-  RRM_CX_MODIFY_CNF       , ///< Message RRM->CMM : confirmation de modification d'une connexion
-  CMM_CX_RELEASE_REQ      , ///< Message CMM->RRM : requete de liberation d'une connexion
-  RRM_CX_RELEASE_CNF      , ///< Message RRM->CMM : confirmation de liberation d'une connexion
-  CMM_CX_RELEASE_ALL_REQ  , ///< Message CMM->RRM : requete de liberation de toutes les connexions
-  RRM_CX_RELEASE_ALL_CNF  , ///< Message RRM->CMM : confirmation de liberation de toutes les connexions
-  RRCI_ATTACH_REQ         , ///< Message RRCI->CMM : requete de d'attachement d'un MR
-  RRM_ATTACH_IND          , ///< Message RRM->CMM : indicateur d'attachement d'un MR
-  CMM_ATTACH_CNF          , ///< Message CMM->RRM : confirmation d'attachement d'un MR
-  RRM_MR_ATTACH_IND       , ///< Message RRM->CMM : indicateur d'attachement d'un MR
-  ROUTER_IS_CH_IND        , ///< Message RRM->CMM : indicateur que le noeud est un cluster head
-  RRCI_CH_SYNCH_IND       , ///< Message RRCI->CMM : indicateur que le noeud est synchronise sur un CH
-  CMM_INIT_MR_REQ         , ///< Message CMM->RRM : requete d'initialisation de l'attachement d'un MR
-  RRM_MR_SYNCH_IND        , ///< Message RRM->CMM : indicateur que le noeud est synchronise sur un MR
-  RRM_NO_SYNCH_IND        , ///< Message RRM->CMM : indicateur que le noeud n'est pas synchronise sur un CH ou MR
-  CMM_INIT_CH_REQ         , ///< Message CMM->RRM : requete d'initialisation d'un CH
-  CMM_INIT_SENSING        , ///< Message CMM->RRM : requete d'initialisation du sensing
-  CMM_STOP_SENSING        , ///< Message CMM->RRM : requete de stop du sensing
-  CMM_ASK_FREQ            , ///< Message CMM->RRM : in BTS, message to start an open freq. query
-  CMM_NEED_TO_TX          , ///< Message CMM->RRM : in SU, second scenario centr, message to start an open freq. query
-  CMM_INIT_COLL_SENSING   , ///< Message CMM->RRM : requete d'initialisation du sensing collaborative //add_lor_10_11_08
-  CMM_USER_DISC           , ///< Message CMM->RRM : user disconnected -> delete all active com //add_lor_10_11_08
-  CMM_LINK_DISC           , ///< Message CMM->RRM : stop comm -> delete an active link //add_lor_10_11_08
-  NB_MSG_CMM_RRM            ///< Nombre de message de l'interface
-} MSG_CMM_RRM_T ;
-//mod_lor_10_04_27++
-typedef enum {
-  UPDATE_SENS_RESULTS_3  = 0  , ///< Message IP       : update to send to CH/FC //mod_lor_10_01_25
-  OPEN_FREQ_QUERY_4           , ///< Message IP       : BTS to ask free frequencies to FC
-  UPDATE_OPEN_FREQ_7          , ///< Message IP       : list of frequencies usable by the secondary network
-  UPDATE_SN_OCC_FREQ_5        , ///< Message IP       : BTS sends used freq. to FC
-  INIT_COLL_SENS_REQ          , ///< Message IP       : CH1 sends request to start collaboration to CH2
-  STOP_COLL_SENS              , ///< Message IP       : CH1 sends order to stop collaboration to CH2
-  UP_CLUST_SENS_RESULTS       , ///< Message IP       : update to send to CH from CH_COLL
-  STOP_COLL_SENS_CONF         , ///< Message IP       : CH2 sends confirmationof stop collaboration to CH1
-  ASK_FREQ_TO_CH_3            , ///< Message IP       : user that wants to transmits ask channels to CH
-  USER_DISCONNECT_9           , ///< Message IP       : user wants to disconnect
-  CLOSE_LINK                  , ///< Message IP       : user wants to stop a link
-  NB_MSG_IP                   ///< Nombre de message IP
-} MSG_IP_T ;
-//mod_lor_10_04_27--
-
-typedef enum {
-  SNS=0,
-  RRC,
-  CMM,
-  IP,  //mod_lor_10_04_27
-  NB_INTERF
-} INTERF_T;
-
-
-
-
-#endif /* GRAPH_ENUM_H */
diff --git a/openair3/MESH/RRM/GRAPH/graph_int.c b/openair3/MESH/RRM/GRAPH/graph_int.c
deleted file mode 100755
index d70308c86b99b1d219630b8da1c36c93384b71a5..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/GRAPH/graph_int.c
+++ /dev/null
@@ -1,887 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       graph_int.c
-
-\brief      Emulation des interfaces du RRM (Radio Ressource Manager )
-
-            Cette application d'envoyer des stimuli sur les interfaces RRM:
-                - RRC -> RRM
-                - CMM -> RRM
-
-\author     IACOBELLI Lorenzo
-
-\date       20/04/10
-
-
-\par     Historique:
-            L.IACOBELLI 2009-10-19
-                + new messages
-            L.IACOBELLI 2010-04-15
-                + add sensing unit emulation
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-#include <time.h>
-
-#include "graph_sock.h"
-//#include "rrm_sock.h"
-#include "graph_int.h"
-#include "graph_enum.h"
-
-
-
-
-#define msg_fct printf
-#define msg printf
-
-
-sock_rrm_t S_graph;
-static int flag_not_exit = 1 ;
-static int SN_active = 0;
-//mod_lor_10_04_21++
-typedef struct {
-  unsigned int        NB_chan              ; //!< Number of channels
-  unsigned int        NB_val               ; //!< Number of values
-  unsigned int        channels[3*NB_SENS_MAX]; //!< Vector of channels
-  unsigned int        values[3*NB_SENS_MAX]    ; //!< Vector of values
-
-} gen_sens_info_t ;
-//mod_lor_10_04_21--
-
-int rrm_xface_init(int rrm_inst)
-{
-
-  int sock ;
-  printf("[CRRM_XFACE] init de l'interface ");
-  sleep(3);
-
-  if(open_socket(&S_graph, RRM_SOCK_PATH, RRM_SOCK_PATH,rrm_inst)==-1)
-    return (-1);
-
-  if (S_graph.s  == -1) {
-    printf("ciao");
-    return (-1);
-  }
-
-
-  printf("Graphical Interface Connected... CRRM of node %d on socket %d\n",rrm_inst, S_graph.s);
-  return 0 ;
-
-}
-
-
-main(int argc,char **argv)
-{
-  int c = 0;
-  int rrm_inst=-1;
-
-  while ((c = getopt(argc,argv,"i:")) != -1)
-    switch (c) {
-    case 'i':
-      rrm_inst=atoi(optarg);
-      break;
-
-    default:
-      exit(0);
-    }
-
-  //mod_lor_10_04_21++
-  //int colorbg;
-  int colorfg;
-  int colorBTS_msg = 30;
-  int colorfree=2;
-  int colorbusy=9;
-  int comments=88;//mod_lor_10_04_22
-  int i,j;
-
-  if (rrm_inst == FC_ID) {
-    //colorbg = 223;
-    colorfg = 21;
-    //dbg_color++
-    /*for (i=0; i<256; i++){
-        printf("\e[38;5;%dm",i);
-        printf("%d ",i);
-
-    }//dbg_color--*/
-  } else if (rrm_inst == BTS_ID ||((rrm_inst == CH_COLL_ID || rrm_inst >= FIRST_SECOND_CLUSTER_USER_ID )&& SCEN_2_CENTR)) { //mod_lor_10_05_12 AAA
-    //colorbg = 103;
-    colorfg = 11;
-  }
-
-  else {
-    //colorbg = 223;
-    colorfg = 21;
-  }
-
-  printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_21
-  printf("MAIN Graphical Interface Connected\n");
-
-  rrm_xface_init(rrm_inst);
-  msg_head_t *Header ;
-  char *Data;
-  unsigned short Data_to_read;
-
-  while (1) {
-    Header = (msg_head_t *) recv_msg(&S_graph) ;
-
-    if (Header == NULL) {
-      break;
-
-    }
-
-    //mod_lor_10_04_21++
-    Data_to_read=Header->size;
-
-    if (Data_to_read > 0 ) {
-      Data = (char *) (Header +1) ;
-    }
-
-    //mod_lor_10_04_21--
-    INTERF_T msg_interf;
-    int msg_type = Header->msg_type;
-
-    if (Header->msg_type<NB_MSG_SNS_RRM)
-      msg_interf=SNS;
-    else if ((msg_type-=NB_MSG_SNS_RRM)< NB_MSG_RRC_RRM)
-      msg_interf=RRC;
-    else if ((msg_type-=NB_MSG_RRC_RRM)< NB_MSG_CMM_RRM)
-      msg_interf=CMM;
-    else if ((msg_type-=NB_MSG_CMM_RRM)< NB_MSG_IP)
-      msg_interf=IP;
-    else {
-      printf("Error! Unknown message %d!!!\n",Header->msg_type);
-      break;
-    }
-
-    // msg("Got MSG of Type %d on Inst %d\n",Header->msg_type,Header->inst);
-    switch ( msg_interf ) {
-    case SNS: {
-      switch ( msg_type ) {
-      case SNS_UPDATE_SENS : { //mod_lor_10_06_02
-        msg_fct( "[SENSING]>[CRRM]:UPDATE_SENSING_RESULTS number %d \n",(Header->Trans_id - 4096)) ;
-        gen_sens_info_t  *p = (gen_sens_info_t  *)Data ;
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Sensing information received from sensing unit about frequencies from\n");
-        //msg_fct( "Results about frequencies from ");
-        printf("\e[38;5;%dm",colorfree);
-        msg_fct( "%d ",(p->channels[0]/1000));
-        printf("\e[38;5;%dm",comments);
-        msg_fct( "MHz and ");
-        printf("\e[38;5;%dm",colorfree);
-        msg_fct( "%d ",(p->channels[1]/1000));
-        printf("\e[38;5;%dm",comments);
-        msg_fct( "MHz\nBandwidth of analyzed subbands: ");
-        printf("\e[38;5;%dm",colorfree);
-        msg_fct( "%d ",p->values[0]);
-        printf("\e[38;5;%dm",comments);
-        msg_fct( "KHz\n");
-        msg_fct( "Updating of local sensing database with recived data ...\n");
-
-        //mod_lor_10_04_21++
-
-        /*for (i=0;i<p->NB_chan;i++){ //com_lor_10_11_09
-            if(p->values[i]==1){
-                printf("\e[38;5;%dm",colorfree);   //mod_lor_10_04_21
-                msg_fct( "      Channel %d: no primary user detected\n",p->channels[i]);
-                //printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_21
-            }
-            else{
-                printf("\e[38;5;%dm",colorbusy);   //mod_lor_10_04_21
-                msg_fct( "      Channel %d: primary user detected\n",p->channels[i]);
-                //printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_21
-            }
-        }*/
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22*/
-
-        if (SCEN_1)//mod_lor_10_05_12++
-          msg_fct( "Trasmission of the new information to the Fusion Center\n");
-        else
-          msg_fct( "Trasmission of the new information to the Cluster Head\n");//mod_lor_10_05_12--
-
-        msg_fct( "Waiting for next sensing update ...\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_21
-        //mod_lor_10_04_21--
-
-      }
-      break ;
-
-      case SNS_END_SCAN_CONF : {
-
-        msg_fct( "[SENSING]>[CRRM]:END_SENSING_CONFIRMATION\n");
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-
-        if (SCEN_1)//mod_lor_10_05_12++
-          msg_fct( "Sending confirmation of stopped sensing to Fusion Center ...\n");
-        else
-          msg_fct( "Sending confirmation of stopped sensing to Cluster Head ...\n");//mod_lor_10_05_12--
-
-        printf("\e[38;5;%dm",colorfg);
-      }
-      break ;
-
-      default :
-        msg("[SNS]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ;
-      }
-
-      break;
-    }
-
-    case RRC: {
-      switch ( msg_type ) {
-      case RRC_RB_ESTABLISH_RESP: {
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_ESTABLISH_RESP \n",Header->inst);
-
-      }
-      break ;
-
-      case RRC_RB_ESTABLISH_CFM: {
-
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_ESTABLISH_CFM \n",Header->inst);
-        /*if (Header->inst == BTS_ID && SCEN_1){//mod_lor_10_05_12
-            printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-            msg_fct( "******************************************************************\n");
-            msg_fct( "Link between Fusion Center and BTS opened\n");
-            msg_fct( "******************************************************************\n");
-            printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_22
-        }*/
-
-      }
-      break ;
-
-      case RRC_RB_MODIFY_RESP: {
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_MODIFY_RESP \n",Header->inst);
-
-      }
-      break ;
-
-      case RRC_RB_MODIFY_CFM: {
-
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_MODIFY_CFM\n",Header->inst);
-
-      }
-      break ;
-
-      case RRC_RB_RELEASE_RESP: {
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_RELEASE_RESP \n",Header->inst);
-
-      }
-      break ;
-
-      case RRC_MR_ATTACH_IND : {
-
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_MR_ATTACH_IND \n",Header->inst);
-
-      }
-      break ;
-
-      case RRC_SENSING_MEAS_RESP: {
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_SENSING_MEAS_RESP \n",Header->inst);
-      }
-      break ;
-
-      case RRC_CX_ESTABLISH_IND: {
-
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_CX_ESTABLISH_IND \n",Header->inst);
-
-      }
-      break ;
-
-      case RRC_PHY_SYNCH_TO_MR_IND : {
-
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_PHY_SYNCH_TO_MR_IND.... \n",Header->inst);
-
-      }
-      break ;
-
-      case RRC_PHY_SYNCH_TO_CH_IND : {
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_PHY_SYNCH_TO_CH_IND.... \n",Header->inst);
-
-
-      }
-      break ;
-
-      case RRC_SENSING_MEAS_IND : {
-
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_SENSING_MEAS_IND \n",Header->inst);
-
-      }
-      break ;
-
-      case RRC_RB_MEAS_IND : {
-
-        msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_MEAS_IND \n",Header->inst);
-      }
-      break ;
-
-
-      case RRC_INIT_SCAN_REQ : {
-        msg_fct( "[CRRC]>[CRRM]:START_SENSING_REQUEST\n");
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-
-        if (SCEN_1)//mod_lor_10_05_12++
-          msg_fct( "Order to start sensing activity received from Fusion Center\n");
-        else
-          msg_fct( "Order to start sensing activity received from Cluster Head\n");//mod_lor_10_05_12--
-
-        msg_fct( "Activation of sensing unit ...\n");
-        msg_fct( "Waiting for sensing results ...\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_22
-
-
-      }
-      break ;
-
-      case RRC_END_SCAN_CONF : {
-
-        msg_fct( "[CRRC]>[CRRM]:END_SENSINS_ACTIVITY_CONFIRMATION\n");
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-
-        if (SCEN_1)//mod_lor_10_05_12++
-          msg_fct( "Sensor %d confirms the end of sensing activity\n",(Header->inst -FIRST_SENSOR_ID+ 1));
-        else
-          msg_fct( "Secondary User %d confirms the end of sensing activity\n",(Header->inst -FIRST_SENSOR_ID+ 1));//mod_lor_10_05_12--
-
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_22
-      }
-      break ;
-
-      case RRC_END_SCAN_REQ : {
-
-        msg_fct( "[CRRC]>[CRRM]:END_SENSINS_ACTIVITY_REQUEST\n");
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-
-        if (SCEN_1)//mod_lor_10_05_12++
-          msg_fct( "Order to stop sensing activity received from Fusion Center\n");
-        else
-          msg_fct( "Order to stop sensing activity received from Cluster Head\n");//mod_lor_10_05_12--
-
-        msg_fct( "Command to stop sensing activity transmitted to sensing unit\n");
-        msg_fct( "Waiting for confirmation from sensing unit ...\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_22
-
-      }
-      break ;
-
-      case RRC_INIT_MON_REQ : {
-        msg_fct( "[CRRC]>[CRRM]:RRC_INIT_MON_REQ \n",Header->inst);
-      }
-      break ;
-
-      case RRC_UP_FREQ_ASS : {
-        gen_sens_info_t  *p = (gen_sens_info_t  *)Data ;
-        msg_fct( "[CRRC]>[CRRM]:UPDATE_FREQUENCIES_ASSIGNED\n",Header->inst);
-
-        if (p->NB_chan!=0) {
-          printf("\e[38;5;%dm",comments);
-          msg_fct( "Channel to use: from ");
-          printf("\e[38;5;%dm",colorfree);
-          msg_fct( "%d ",(p->channels[0]));
-          printf("\e[38;5;%dm",comments);
-          msg_fct( "KHz to ");
-          printf("\e[38;5;%dm",colorfree);
-          msg_fct( "%d ",(p->channels[1]));
-          printf("\e[38;5;%dm",comments);
-          msg_fct( "KHz\n");
-          printf("\e[38;5;%dm",colorfg);
-        } else {
-          printf("\e[38;5;%dm",colorbusy);
-          msg_fct( "No channels available\n");
-          printf("\e[38;5;%dm",colorfg);
-        }
-      }
-      break;
-
-      case RRC_UP_FREQ_ASS_SEC : { //add_lor_10_11_09
-        gen_sens_info_t  *p = (gen_sens_info_t  *)Data ;
-        msg_fct( "[CRRC]>[CRRM]:UPDATE_FREQUENCIES_ASSIGNED_SEC \n",Header->inst);
-
-        for (i=0; i<p->NB_val; i++) {
-          if (p->values[i]) {
-            printf("\e[38;5;%dm",comments);
-            msg_fct( "Transmitting on channel from ");
-            printf("\e[38;5;%dm",colorfree);
-            msg_fct( "%d ",(p->channels[i*2]));
-            printf("\e[38;5;%dm",comments);
-            msg_fct( "KHz to ");
-            printf("\e[38;5;%dm",colorfree);
-            msg_fct( "%d ",(p->channels[(i*2)+1]));
-            printf("\e[38;5;%dm",comments);
-            msg_fct( "KHz\n");
-            printf("\e[38;5;%dm",colorfg);
-          } else {
-            printf("\e[38;5;%dm",comments);
-            msg_fct( "Receiving on channel from ");
-            printf("\e[38;5;%dm",colorfree);
-            msg_fct( "%d ",(p->channels[i*2]));
-            printf("\e[38;5;%dm",comments);
-            msg_fct( "KHz to ");
-            printf("\e[38;5;%dm",colorfree);
-            msg_fct( "%d ",(p->channels[(i*2)+1]));
-            printf("\e[38;5;%dm",comments);
-            msg_fct( "KHz\n");
-            printf("\e[38;5;%dm",colorfg);
-          }
-        }
-      }
-      break ;
-
-      default :
-        msg("[CRRC]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ;
-      }
-
-      break;
-    }
-
-    case IP: {
-      switch ( msg_type ) {
-
-      case UPDATE_SENS_RESULTS_3 : { //mod_lor_10_06_02
-        gen_sens_info_t  *p = (gen_sens_info_t  *)Data ;
-
-        if (SCEN_1) { //mod_lor_10_05_12++
-          msg_fct( "[SENSOR %d msg]:UPDATE_SENSING_MEASUREMENT\n",(Header->inst-FIRST_SENSOR_ID+1));
-          printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-          msg_fct( "Sensing information received from sensor %d (local update number: %d)\n",(Header->inst-FIRST_SENSOR_ID+1),(Header->Trans_id - 4096));
-        } else {
-          msg_fct( "[S.U. %d msg]:UPDATE_SENSING_MEASUREMENT\n",(Header->inst-FIRST_SENSOR_ID+1));
-          printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-          msg_fct( "Sensing information received from Secondary User %d (local update number: %d)\n",(Header->inst-FIRST_SENSOR_ID+1),(Header->Trans_id - 4096));
-        }//mod_lor_10_05_12--
-
-        msg_fct( "Sensing results about frequencies from ");
-        printf("\e[38;5;%dm",colorfree);
-        msg_fct( "%d ",(p->channels[0]/1000));
-        printf("\e[38;5;%dm",comments);
-        msg_fct( "MHz and ");
-        printf("\e[38;5;%dm",colorfree);
-        msg_fct( "%d ",(p->channels[1]/1000));
-        printf("\e[38;5;%dm",comments);
-        msg_fct( "MHz\nUpdating of sensing database using recived data ...\n");
-
-        /*if(SN_active &&p->values[1]!=3){ //comm_lor_10_11_09
-            msg_fct( "Checking if frequencies in use by Secondary Network are still free ...\n");
-            if(p->values[1]==1){
-                printf("\e[38;5;%dm",colorbusy);
-                printf("Primary detected on frequencies in use by Secondary Network\n");
-                printf("\e[38;5;%dm",comments);
-                msg_fct( "Sending update of open frequencies to Secondary Network\n");
-            }
-            else if (p->values[1]==0){
-                printf("\e[38;5;%dm",colorfree);
-                printf("No primary communication detected on frequencies in use by Secondary Network\n");
-
-            }
-        }
-        else if (p->values[1]==1){
-            printf("\e[38;5;%dm",comments);
-            msg_fct( "Sending update of open frequencies to Secondary Network\n");
-        }*/
-        //mod_lor_10_04_21++
-        /*
-        unsigned int up_to_send = 0;
-        for (i=(p->NB_chan-1);i>=0;i--){
-            if(p->values[i]==1){
-                printf("\e[38;5;%dm",colorfree);   //mod_lor_10_04_21
-                msg_fct( "      Channel %d: no primary user detected\n",p->channels[i]);
-            }else{
-                printf("\e[38;5;%dm",colorbusy);   //mod_lor_10_04_21
-                msg_fct( "      Channel %d: primary user detected\n",p->channels[i]);
-                if(p->values[i]==3){
-                    up_to_send = 1;
-                    msg_fct( "        -> Channel used by SN\n");
-                    msg_fct( "        -> Need to send update of open frequencies\n");
-                }
-            }
-        }
-        if (up_to_send){
-            printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-            msg_fct( "Sending update of open frequencies to Secondary Network\n");
-        }*/
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_21
-        //mod_lor_10_04_21--
-
-
-      }
-      break ;
-
-      case OPEN_FREQ_QUERY_4 : {
-        printf("\e[38;5;%dm",colorBTS_msg);  //mod_lor_10_04_23
-        msg_fct( "[BTS msg]:OPEN_FREQUENCIES_QUERY \n");
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_23
-        msg_fct( "Received a request from the secondary network BTS to know the available frequencies to use\n");
-        msg_fct( "Sending to BTS information about available frequencies\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_23
-
-      }
-      break ;
-
-      case ASK_FREQ_TO_CH_3 : { //add_lor_10_11_03
-        gen_sens_info_t  *p = (gen_sens_info_t  *)Data ;
-
-        if (p->NB_val==0) {
-          msg_fct( "[SU %d msg]:ASK_FREQUENCIES \n", Header->inst);
-          printf("\e[38;5;%dm",comments);   //mod_lor_10_04_23
-          msg_fct( "Received a request from secondary user #%d to have a channel to communicate with Secondary User #%d\n",Header->inst,p->channels[0]);
-          msg_fct( "Looking for available channels...\n");
-          printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_23
-        } else {
-          printf("\e[38;5;%dm",comments);   //mod_lor_10_04_23
-          msg_fct( "None channel is available...\n");
-          msg_fct( "Saving channel request...\n");
-          printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_23
-        }
-
-      }
-      break ;
-
-      case UPDATE_OPEN_FREQ_7 : { //mod_lor_10_06_02
-        gen_sens_info_t  *p = (gen_sens_info_t  *)Data ;
-        msg_fct( "[FC msg]:UPDATE_OPEN_FREQUENCIES\n",Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_23
-        msg_fct( "Received information about available frequencies from Fusion Center\n");
-
-        if (p->NB_chan==0) {
-          printf("\e[38;5;%dm",colorbusy);
-          msg_fct( "No available channels for Secondary Network \n");
-        } else {
-          msg_fct( "Updating of channel database ...\n");
-
-          for (i=(p->NB_chan-1); i>=0; i--) {
-            printf("\e[38;5;%dm",colorfree);   //mod_lor_10_04_21
-            msg_fct( "      Channel from %d KHz to %d KHz is available\n",p->channels[i-1], p->channels[i]);
-            i=i-2;
-          }
-
-          printf("\e[38;5;%dm",comments);   //mod_lor_10_04_23
-          msg_fct( "Selection of frequencies for Secondary network ...\n");
-
-          //mod_lor_10_05_18++
-          for (i=(p->NB_val-1); i>=0; i--) {
-            for (j=(p->NB_chan-3); j>=0; j=j-3) {
-              if (p->channels[j]==p->values[i]) {
-                printf("\e[38;5;%dm",colorfree);
-                msg_fct( "      Channel from %d KHz to %d KHz selected for SN\n",p->channels[j+1],p->channels[j+2]);
-                break;
-              }
-            }
-          }
-        }
-
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_23
-        //mod_lor_10_05_18--
-        msg_fct( "Sending update of frequencies used by Secondary Network to Fusion Center ...\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_23
-
-
-      }
-      break ;
-
-      case UPDATE_SN_OCC_FREQ_5 : { //mod_lor_10_06_02
-        gen_sens_info_t  *p = (gen_sens_info_t  *)Data ;
-
-        if (p->NB_chan>0)
-          SN_active = 1; //mod_lor_10_06_02
-
-        printf("\e[38;5;%dm",colorBTS_msg);  //mod_lor_10_04_23
-        msg_fct( "[BTS msg]:UPDATE_SN_OCCUPIED_FREQUENCIES\n", Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Update received from BTS about frequencies used by Secondary Network\n");
-        msg_fct( "Updating CHANNEL DATABASE :\n");
-
-        if (p->NB_chan == 0) {
-          msg_fct( "SN did not select any channel\n");
-          SN_active = 0;
-        }
-
-        //printf("\e[38;5;%dm",colorBTS_msg);
-        for (i=0; i<p->NB_chan; i++) {
-          printf("\e[38;5;%dm",comments);
-          msg_fct( "      Channel from " );
-          printf("\e[38;5;%dm",colorfree);
-          msg_fct( "%d ",p->channels[i] );
-          printf("\e[38;5;%dm",comments);
-          msg_fct( "MHz to");
-          printf("\e[38;5;%dm",colorfree);
-          msg_fct( " %d ",p->channels[++i] );
-          printf("\e[38;5;%dm",comments);
-          msg_fct( " used by Secondary Network\n" );
-        }
-
-        if (p->values[0]) {
-          if (p->NB_chan != 0) {
-            printf("\e[38;5;%dm",colorbusy);
-            msg_fct( "  -> Channels in use by SN are not available anymore!\n");
-            printf("\e[38;5;%dm",comments);
-          }
-
-          msg_fct( "Sending update of open frequencies to BTS ...\n");
-        }
-
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_23
-
-      }
-      break ;
-
-      //mod_lor_10_05_10++
-      case INIT_COLL_SENS_REQ : {
-        msg_fct( "******************************************************************\n");
-        msg_fct( "[CH 1 msg]:INIT_COLL_SENS_REQ from %d\n", Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Request from another cluster to collaborate in sensing operations\n");
-        msg_fct( "Sending sensing parameters to sensors connected ...\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_23
-
-      }
-      break ;
-
-      case STOP_COLL_SENS : {
-        msg_fct( "[CH 1 msg]:STOP_COLL_SENS from %d\n", Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Request to stop the collaboration in sensing operations\n");
-        msg_fct( "Sending stop sensing order to sensors connected ...\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_23
-
-      }
-      break ;
-
-      case STOP_COLL_SENS_CONF : {
-        printf("\e[38;5;%dm",colorBTS_msg);  //mod_lor_10_04_23
-        msg_fct( "[CH coll msg]:STOP_COLL_SENS_CONF from %d\n", Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Collaborative Cluster Head confirms the end of sensing activity\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_23
-
-      }
-      break ;
-
-      case UP_CLUST_SENS_RESULTS : {
-        gen_sens_info_t  *p = (gen_sens_info_t  *)Data ;
-        printf("\e[38;5;%dm",colorBTS_msg);  //mod_lor_10_04_23
-        msg_fct( "[CH coll msg]:UP_CLUST_SENS_RESULTS from %d\n", Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Update received from collaborative Cluster about frequencies from\n");
-        printf("\e[38;5;%dm",colorfree);
-        msg_fct( "%d ",(p->channels[0]/1000));
-        printf("\e[38;5;%dm",comments);
-        msg_fct( "MHz and ");
-        printf("\e[38;5;%dm",colorfree);
-        msg_fct( "%d ",(p->channels[1]/1000));
-        printf("\e[38;5;%dm",comments);
-        msg_fct( "MHz\nBandwidth of analyzed subbands: ");
-        printf("\e[38;5;%dm",colorfree);
-        msg_fct( "%d ",p->values[0]);
-        printf("\e[38;5;%dm",comments);
-        msg_fct( "KHz\n");
-        msg_fct( "Updating of sensing database using recived data...\n");
-        printf("\e[38;5;%dm",colorfg);
-      }
-      break ;
-
-      //mod_lor_10_05_10--
-      case USER_DISCONNECT_9 : { //add_lor_10_11_09
-        msg_fct( "[SU %d msg]:USER_DISCONNECTION\n", Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Secondary User %d wants to interrupt all its current communications.\n", Header->inst);
-        msg_fct( "Sending update to all Secondary Users\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_23
-
-      }
-      break ;
-
-      case CLOSE_LINK : { //add_lor_10_11_09
-        gen_sens_info_t  *p = (gen_sens_info_t  *)Data ;
-        int i;
-        msg_fct( "[SU %d msg]:CLOSE_LINK\n", Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Secondary User %d wants to close communication channel from user %d to user %d\n", Header->inst, p->channels[0],p->values[0]);
-        msg_fct( "Sending update to all Secondary Users\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_23
-      }
-      break ;
-
-      default :
-        msg("[IP]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ;
-      }
-
-      break;
-    }
-
-    case CMM: {
-      switch ( msg_type ) {
-      case CMM_CX_SETUP_REQ: {
-
-        msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_SETUP_REQ\n",Header->inst);
-
-      }
-      break ;
-
-      case CMM_CX_MODIFY_REQ: {
-
-        msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_MODIFY_REQ\n",Header->inst);
-
-      }
-      break ;
-
-      case CMM_CX_RELEASE_REQ : {
-
-        msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_RELEASE_REQ\n",Header->inst);
-
-      }
-      break ;
-
-      case CMM_CX_RELEASE_ALL_REQ : {
-
-        msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_RELEASE_ALL_REQ\n",Header->inst);
-
-      }
-      break ;
-
-      case CMM_ATTACH_CNF : {
-        msg_fct( "[CMM]>[CRRM]:%d:CMM_ATTACH_CNF\n",Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "******************************************************************\n");
-
-        //mod_lor_10_05_12++
-        if (SCEN_1) { //mod_lor_11_02_15++ : reorganization sendora scen 1
-          if (BTS_ID>=0 && FC_ID>=0)
-            msg_fct( "The sensor is now connected to the fusion center\n"); //AAA to fix
-          else if (BTS_ID>=0)
-            msg_fct( "Secondary User is now connected to the BTS\n");
-          else if (FC_ID>=0)
-            msg_fct( "The sensor is now connected to the fusion center\n");
-        }//mod_lor_11_02_15--
-        else if(SCEN_2_DISTR)
-          msg_fct( "Secondary User is now connected to Cluster Head\n");
-        else if(Header->inst < FIRST_SECOND_CLUSTER_USER_ID)
-          msg_fct( "Secondary User is now connected to Cluster Head #1\n");
-        else
-          msg_fct( "Secondary User is now connected to Cluster Head #2\n");//mod_lor_10_05_12--
-
-        msg_fct( "******************************************************************\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_22
-      }
-      break ;
-
-      case CMM_INIT_MR_REQ : {
-        msg_fct( "[CMM]>[CRRM]:%d:CMM_INIT_MR_REQ \n",Header->inst);
-
-      }
-      break ;
-
-      case CMM_INIT_CH_REQ : {
-        msg_fct( "[CMM]>[CRRM]:%d:CMM_INIT_CH_REQ \n",Header->inst);
-
-
-      }
-      break ;
-
-      case CMM_INIT_SENSING : {
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "******************************************************************\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_22
-        msg_fct( "[CMM]>[CRRM]:START_SENSING\n");
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Order to activate sensing received \n");
-
-        if (SCEN_1)//mod_lor_10_05_12++
-          msg_fct( "Sending sensing parameters to sensors connected ...\n");
-        else
-          msg_fct( "Sending sensing parameters to Secondary Users connected ...\n");//mod_lor_10_05_12--
-
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_22
-      }
-      break ;
-
-      case CMM_STOP_SENSING : {
-        msg_fct( "[CMM]>[CRRM]:STOP_SENSING\n",Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Order to stop sensing operations received \n");
-
-        if (SCEN_1)//mod_lor_10_05_12++
-          msg_fct( "Sending order to stop sensing activity to sensors connected ...\n");
-        else {
-          if (SCEN_2_CENTR)
-            msg_fct( "Sending order to stop collaborative sensing to collaborative CH ...\n");
-
-          msg_fct( "Sending order to stop sensing actions to secondary users connected ...\n");
-        }//mod_lor_10_05_12--
-
-        sleep(1);
-        msg_fct( "Waiting for stop sensing confirmations ...\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_22
-
-      }
-      break ;
-
-      case CMM_ASK_FREQ : {
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "******************************************************************\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_22
-        msg_fct( "[CMM]>[CRRM]:ASK_FOR_AVAILABLE_FREQUENCIES\n",Header->inst);
-        printf("\e[38;5;%dm",comments);   //mod_lor_10_04_22
-        msg_fct( "Need of frequencies for secondary users \n");
-        msg_fct( "Sending request of available channels to Fusion Center ...\n");
-        sleep(1);
-        msg_fct( "Waiting for available channels information ...\n");
-        printf("\e[38;5;%dm",colorfg);   //mod_lor_10_04_22
-
-      }
-      break ;
-
-
-      default :
-        msg("[CMM]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ;
-      }
-
-      break;
-    }
-
-    default :
-      msg("[Graph_xface]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ;
-
-    }
-  }
-
-  close_socket(&S_graph) ;
-}
diff --git a/openair3/MESH/RRM/GRAPH/graph_int.h b/openair3/MESH/RRM/GRAPH/graph_int.h
deleted file mode 100755
index 5879ef91b8844455aef21c4dcca8b78fb3dd3b7d..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/GRAPH/graph_int.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       graph_int.h
-
-\brief      Fichier d'entête
-
-            Il contient les declarations de type, des defines relatif aux
-            fonctions d'emulation  des interfaces du RRM (Radio Resource
-            Management ).
-
-\author     IACOBELLI Lorenzo
-
-\date       20/04/10
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-
-
-#ifndef GRAPH_INT_H
-#define GRAPH_INT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* GRAPH_INT_H */
diff --git a/openair3/MESH/RRM/GRAPH/graph_sock.c b/openair3/MESH/RRM/GRAPH/graph_sock.c
deleted file mode 100644
index 6de4210204270b9edd0f0dcb66eb49eaabc20a89..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/GRAPH/graph_sock.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-/*!
-*******************************************************************************
-
-\file     sensing_rrm_interface.c
-
-\brief    Sensing unit sockets
-
-\author   IACOBELLI Lorenzo, KNOPP Raymond
-
-\date     01/04/2010
-
-
-\par     Historique:
-
-
-*******************************************************************************
-*/
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include "graph_sock.h"
-
-//! \brief  Taille maximale de la charge utile
-#define SIZE_MAX_PAYLOAD  2048
-//! \brief PID de l'espace utilisateur (Netlink mode)
-//#define PID_USERSPACE   0xAA
-
-
-#define msg printf
-#define RRM_FREE free
-
-#ifndef SENSING_RRM_FIFOS_XFACE
-/*!
-*******************************************************************************
-\brief  This function opens a unix socket for the rrm communication
-\return  The return value is a socket handle
-*/
-int open_socket(
-  sock_rrm_t *s   , ///< socket descriptor
-  char *path_local,   ///< local socket path if unix socket
-  char *path_dest ,   ///< host  Socket path if unix socket
-  int rrm_inst        ///< instance of the rrm entity
-)
-{
-  /* Unix socket */
-  int   socket_fd ;
-  int   len ;
-
-  if ((socket_fd = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
-    perror("unix socket");
-    return -1 ;
-  }
-
-  memset(&(s->un_local_addr), 0, sizeof(struct  sockaddr_un));
-  s->un_local_addr.sun_family = AF_UNIX;
-  sprintf(s->un_local_addr.sun_path,"%s%d", path_local, rrm_inst );
-  unlink(s->un_local_addr.sun_path);
-  msg("local %s\n",s->un_local_addr.sun_path);
-  len = strlen((s->un_local_addr).sun_path) + sizeof((s->un_local_addr).sun_family);
-
-  if (bind(socket_fd, (struct sockaddr *)&(s->un_local_addr), len) == -1) {
-    perror("bind");
-    return -1 ;
-  }
-
-  memset(&(s->un_dest_addr), 0, sizeof(struct   sockaddr_un));
-  s->un_dest_addr.sun_family = AF_UNIX;
-  sprintf(s->un_dest_addr.sun_path,"%s%d", path_dest, rrm_inst );
-  msg("Dest %s\n",s->un_dest_addr.sun_path);
-
-
-  s->s = socket_fd ;
-  return socket_fd ;
-}
-/*!
-*******************************************************************************
-\brief  This function closes a RRM socket
-\return none
-*/
-void close_socket(
-  sock_rrm_t *sock  ///< the socket handle
-)
-{
-  shutdown(sock->s, SHUT_RDWR);
-  close(sock->s);
-}
-
-/*!
-*******************************************************************************
-\brief  This function send a buffer message to the unix socket
-\return if OK then "0" is returned else "-1"
-*/
-char BUFF[2048];
-int send_msg_sock(
-  sock_rrm_t *s   ,///< socket descriptor
-  msg_t *smsg       ///< the message to send
-)
-{
-  /* Unix socket */
-  int         ret   = 0 ;
-  //  char        *buf    = NULL;
-  struct  msghdr    msghd ;
-  struct  iovec     iov;
-  int         taille  = sizeof(msg_head_t)  ;
-
-  if ( smsg == NULL )
-    return -1 ;
-
-  if ( smsg->data != NULL )
-    taille += smsg->head.size ;
-
-  //buf = RRM_MALLOC(char, taille);
-  //if (buf ==NULL)
-  //return -1 ;
-
-  memcpy( BUFF , &(smsg->head) , sizeof(msg_head_t) ) ;
-  memcpy( BUFF+sizeof(msg_head_t), smsg->data, smsg->head.size ) ;
-
-  iov.iov_base    = (void *)BUFF;
-  iov.iov_len     = taille ;
-
-  msghd.msg_name        = (void *)&(s->un_dest_addr);
-  msghd.msg_namelen     = sizeof(s->un_dest_addr);
-  msghd.msg_iov         = &iov;
-  msghd.msg_iovlen      = 1;
-  msghd.msg_control     = NULL ;
-  msghd.msg_controllen  =   0 ;
-
-  if ( sendmsg(s->s, &msghd, 0) < 0 ) {
-    ret = -1;
-    msg("socket %d, dest %s\n",s->s,s->un_dest_addr.sun_path);
-    perror("sendmsg:unix socket");
-  }
-
-  //RRM_FREE(buf) ;
-  //RRM_FREE(msg->data) ;
-  //RRM_FREE(msg) ;
-
-  return ret ;
-}
-
-/*!
-*******************************************************************************
-\brief  This function read a buffer from a unix socket
-\return the function returns a message pointer. If the pointeur is NULL, a error
-is happened.
-*/
-char *recv_msg(
-  sock_rrm_t *s  ///< socket descriptor
-)
-{
-  /* Unix socket */
-  char        *buf = NULL;
-  char        *smsg = NULL;
-  struct  msghdr    msghd ;
-  struct  iovec     iov;
-  int         size_msg ;
-  msg_head_t      *head  ;
-  int         ret ;
-
-  int taille =  SIZE_MAX_PAYLOAD ;
-
-  buf         = (char *)calloc(taille,sizeof(char));
-
-  if ( buf == NULL ) {
-    fprintf(stderr,"Buf null\n");
-    return NULL ;
-  }
-
-  iov.iov_base      = (void *)buf;
-  iov.iov_len       = taille ;
-  msghd.msg_name      = (void *)&(s->un_dest_addr);
-  msghd.msg_namelen   = sizeof(s->un_dest_addr);
-  msghd.msg_iov       = &iov;
-  msghd.msg_iovlen    = 1;
-  msghd.msg_control   = NULL ;
-  msghd.msg_controllen= 0 ;
-
-  ret = recvmsg(s->s, &msghd , 0 ) ;
-
-  if ( ret <= 0  ) {
-    // non-blocking socket
-    // perror("PB recvmsg_un");
-    fprintf(stderr,"PB recvmsg_un\n");
-    RRM_FREE(buf);
-    return NULL ;
-  }
-
-  if (msghd.msg_flags != 0 ) {
-    fprintf(stderr,"error recvmsg_un: 0x%02x\n", msghd.msg_flags) ;
-    RRM_FREE(buf);
-    return NULL ;
-  }
-
-  head    = (msg_head_t *) buf  ;
-  size_msg  = sizeof(msg_head_t) + head->size ;
-
-  smsg    = (char *)calloc(size_msg,sizeof(char)) ;
-
-  if ( smsg != NULL )
-    memcpy( smsg , buf , size_msg ) ;
-
-  RRM_FREE( buf ) ;
-
-  return smsg ;
-}
-
-#else  //XFACE
-
-int send_msg_fifo(int *s, msg_t *fmsg)
-{
-  int   ret   = 0, ret1;
-  int  taille = sizeof(msg_head_t)  ;
-  msg("write on fifos %d, msg %p\n",*s,fmsg);
-
-  if ( fmsg == NULL )
-    return -1 ;
-
-  // envoi le header
-
-
-  ret1 = rtf_put (*s,(char*) &(fmsg->head) , taille);
-
-  if(ret1 <0) {
-    msg("rtf_put H ERR %d\n",ret1);
-    rtf_reset(*s);
-    return ret1;
-  }
-
-  ret=ret1;
-
-  // envoi les datas si elles sont definis
-  if ( fmsg->data != NULL ) {
-    ret1 += rtf_put (*s,(char*) fmsg->data, fmsg->head.size);
-
-    if(ret1 <0) {
-      msg("rtf_put D ERR %d\n",ret1);
-      rtf_reset(*s);
-      return ret1;
-    }
-  }
-
-  ret+=ret1;
-  return ret;
-}
-
-#endif //XFACE
-
-int send_msg(void *s, msg_t *smsg)
-{
-#ifdef USER_MODE
-  send_msg_sock((sock_rrm_t *)s, smsg);
-#else
-  send_msg_fifo((int *)s,smsg);
-#endif
-
-}
diff --git a/openair3/MESH/RRM/GRAPH/graph_sock.h b/openair3/MESH/RRM/GRAPH/graph_sock.h
deleted file mode 100644
index 00c7b705eadd835c085dd2741fe51d0c6a29e1d7..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/GRAPH/graph_sock.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file     sensing_rrm_interface.h
-
-\brief    Fichier d'entete contenant les declarations des types, des defines ,
-      et des fonctions relatives aux fonctions de communication.
-
-\author   IACOBELLI Lorenzo, KNOPP Raymond
-
-\date     01/04/2010
-
-
-\par     Historique:
-      $Author$  $Date$  $Revision$
-      $Id$
-      $Log$
-
-*******************************************************************************
-*/
-
-#ifndef __SENSING_RRM_INTERFACE_H__
-#define __SENSING_RRM_INTERFACE_H__
-
-
-//#ifdef SENSING_RRM_XFACE
-
-/*!
-*******************************************************************************
-\brief   Entete des messages de RRM/CMM/RRC/SENSING
-*/
-typedef struct {
-  unsigned short start    ; ///< Identification du debut de message
-  unsigned char  inst     ; ///< Identification de l'instance RRM
-  unsigned char  msg_type ; ///< Identification du type message
-  unsigned int   size     ; ///< taille du message
-  unsigned int   Trans_id ; ///< Identification de la transaction
-} msg_head_t ;
-
-/*!
-*******************************************************************************
-\brief   Definition de la structure d'un message a envoyer sur un socket:
-          - RRM->RRC
-          - RRC->RRM
-          - RRCI->RRC
-          - RRC->RRCI
-          - CMM->RRM
-          - RRM->CMM
-*/
-typedef struct {
-  msg_head_t  head  ; ///< entete du message
-  char    *data ; ///< message
-} msg_t ;
-
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-#define RRM_SOCK_PATH "/tmp/rrm_socket"
-#define TO_RRM_SOCK_PATH "/tmp/to_rrm_socket"
-
-//! \brief Identification of the RRM/CMM/RRC message begin
-#define START_MSG      0xA533
-//! \brief Identification of the PUSU message begin
-#define START_MSG_PUSU 0xCC
-
-
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-
-/*!
-*******************************************************************************
-\brief  Definition de la structure definissant le socket pour envoyer les messages
-*/
-typedef struct {
-  int s                   ; ///< identification du socket
-  struct  sockaddr_un un_local_addr     ; ///< Adresse local si unix socket
-  struct  sockaddr_un un_dest_addr    ; ///< Adresse destinataire si unix socket
-} sock_rrm_t ;
-
-
-/* *** Fonctions relatives aux interfaces CMM ou SENSING *** */
-
-int open_socket( sock_rrm_t *s  ,char *path_local, char *path_dest , int rrm_inst ) ;
-void close_socket(sock_rrm_t *sock ) ;
-int send_msg_sock(sock_rrm_t *s   ,msg_t *msg ) ;
-char *recv_msg( sock_rrm_t *s ) ;
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
diff --git a/openair3/MESH/RRM/Makefile b/openair3/MESH/RRM/Makefile
deleted file mode 100644
index fb095f2f0bba030fbc9aba0b7dba962cf0b96b08..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/Makefile
+++ /dev/null
@@ -1,142 +0,0 @@
-include $(OPENAIR_DIR)/common/utils/Makefile.inc
-OSTYPE		= $(shell uname -o )
-
-#AAA: if rrc emulated remove comment from next line
-#EMUL_RRC        = 1
-#AAA: if sns emulated remove comment from next line
-#EMUL_SNS        = 1  
-RRC_KERNEL_MODE = 0 
-
-
-#VPATH		=.:./deps:./obj
-# en ABSOLU pour utiliser les tags avec nedit de n'importe ou
-CHEMIN		= $(shell pwd)
-OPENAIR1_DIR= $(CHEMIN)/../../../openair1
-OPENAIR2_DIR= $(CHEMIN)/../../../openair2
-OPENAIR2_RRC= $(OPENAIR2_DIR)/RRC/MESH/ 
-OPENAIR1_SENSING= $(OPENAIR1_DIR)/USERSPACE_TOOLS/SENDORA
-OPENAIR3_RRM= $(CHEMIN)
-INTERFACE   = $(CHEMIN)/..
-EMUL        = $(CHEMIN)/EMUL
-VPATH		= $(CHEMIN):$(EMUL):$(CHEMIN)/deps:$(CHEMIN)/obj
-
-INCLUDE     = -I.  -I$(OPENAIR2_RRC) -I$(OPENAIR3_RRM) -I$(INTERFACE) -I$(OPENAIR2_DIR) -I$(OPENAIR1_SENSING)
-CFLAGS		+= -std=gnu99 $(INCLUDE) -DDEBUG -DNOTRACE -DOPENAIR2_IN
-LDFLAGS		= -lm -lforms -lX11 -L/usr/X11R6/lib -lXpm -lpthread 
-
-ifeq ($(OSTYPE),Cygwin)
-
-LDFLAGS		+= -lpthread 
-CFLAGS		+= -DCYGWIN
-
-else
-
-LDFLAGS		+= -lpthread -lrt
-CFLAGS		+= -DLINUX
-
-endif 
-
-# ifdef RRC_KERNEL_MODE
-ifeq ($(RRC_KERNEL_MODE),1)
-CFLAGS		+= -DRRC_KERNEL_MODE
-endif
-
-TARGET	    = emul_int rrm
-
-#put rrm_graph.c instead of rrm.c to connect the graphic interface block to the rrm
-SRC	    = rrm_graph.c    
-SRC	   += rrm_sock.c
-SRC	   += rrm_util.c
-SRC	   += rrm_2_rrc_msg.c
-SRC	   += cmm_msg.c
-SRC	   += pusu_msg.c
-SRC	   += transact.c
-SRC	   += rrm_constant.c
-SRC	   += ch_init.c
-SRC	   += mr_attach.c
-SRC	   += rb_mngt.c
-SRC	   += neighbor_db.c
-SRC	   += rb_db.c
-SRC	   += sens_db.c
-SRC	   += channels_db.c
-SRC	   += msg_mngt.c
-SRC	   += sens_op.c
-SRC	   += freq_ass_op.c
-SRC    += rrm_2_sensing_msg.c 
-SRC    += ip_msg.c 
-SRC    += sensing_form.c 
-SRC    += SN_freq_form.c 
-SRC    += sens_scen_2_form.c 
-SRC    += all_freq_to_users_form.c
-SRC    += sens_CH1_scen_2.c
-SRC    += sens_sensor.c  
-
-SRC_EMUL    = emul_interface.c
-SRC_EMUL   += rrm_sock.c
-SRC_EMUL   += rrm_util.c
-SRC_EMUL   += cmm_msg.c
-SRC_EMUL   += pusu_msg.c
-SRC_EMUL   += transact.c
-SRC_EMUL   += actdiff.c
-
-#ifeq ($(EMUL_RRC),0) 
-ifndef EMUL_RRC
-CFLAGS     += -DPHY_EMUL
-else
-CFLAGS	   += -DRRC_EMUL
-SRC_EMUL   += rrc_2_rrm_msg.c
-SRC_EMUL   += scenario.c
-endif
-
-ifdef EMUL_SNS
-CFLAGS	   += -DSNS_EMUL
-SRC_EMUL   += sensing_2_rrm_msg.c
-endif
-
-OBJ		= $(SRC:%.c=./obj/%.o)
-OBJ_EMUL	= $(SRC_EMUL:%.c=./obj/%.o)
-
-DEP		= $(SRC:%.c=./deps/%.d) $(SRC_EMUL:%.c=./deps/%.d) 
-
-all : Makefile deps $(TARGET)
-
-emul_int: $(OBJ_EMUL)
-	@echo '=============================='
-	@echo "Linkage $@  ($(OSTYPE))"
-	@echo '------------------------------'
-	$(CC) -o $@ $^ $(LDFLAGS)
-
-rrm: $(OBJ)
-	@echo '=============================='
-	@echo "Linkage $@  ($(OSTYPE))"
-	@echo '------------------------------'
-	$(CC) -o $@ $^ $(LDFLAGS)
-
-deps/%.d : %.c
-	@echo '------------------------------'
-	@echo Dependance $@
-	@echo '------------------------------'
-	$(CC) $(CFLAGS)  -M -MM  $< | sed -e "1s/^/obj\//" -e "s/: /: Makefile /" > $@
-
-obj/%.o:%.c
-	@echo '------------------------------'
-	@echo Compilation $@
-	@echo '------------------------------'
-	@echo Dependance $^
-	@echo Dependance plus recente $?
-	$(CC) $(CFLAGS) -c -o $@ $<
-
-
--include  deps/*.d
-
-.PHONY: clean  cleanexe deps
-
-deps: $(DEP)
-
-clean:
-	rm -f  $(TARGET) $(OBJ) *.o  obj/*.o tags deps/*.d *.stackdump
-
-cleanexe:
-	rm -f *.exe
-
-
diff --git a/openair3/MESH/RRM/SN_freq_form.c b/openair3/MESH/RRM/SN_freq_form.c
deleted file mode 100644
index cdb17ee38649d3b8c2a608f70c55592459abb66d..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/SN_freq_form.c
+++ /dev/null
@@ -1,53 +0,0 @@
-
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-/* Form definition file generated with fdesign. */
-
-#include "forms.h"
-#include <stdlib.h>
-#include "SN_freq_form.h"
-
-FD_Secondary_Network_frequencies *create_form_Secondary_Network_frequencies(void)
-{
-  FL_OBJECT *obj;
-  FD_Secondary_Network_frequencies *fdui = (FD_Secondary_Network_frequencies *) fl_calloc(1, sizeof(*fdui));
-
-  fdui->Secondary_Network_frequencies = fl_bgn_form(FL_NO_BOX, 620, 200);
-  obj = fl_add_box(FL_UP_BOX,0,0,620,200,"");
-  fdui->Selected_frequencies = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,50,500,100,"Selected_frequencies");
-  fl_set_object_color(obj,FL_BLACK,FL_GREEN);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fl_end_form();
-
-  fdui->Secondary_Network_frequencies->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
diff --git a/openair3/MESH/RRM/SN_freq_form.fd b/openair3/MESH/RRM/SN_freq_form.fd
deleted file mode 100644
index 23972fa842d40833cb20989df9c8e5316d375ef3..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/SN_freq_form.fd
+++ /dev/null
@@ -1,52 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: Secondary_Network_frequencies
-Width: 590
-Height: 230
-Number of Objects: 2
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 590 230
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: NORMAL_XYPLOT
-box: 60 40 490 120
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_GREEN
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_TINY_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: Selected_frequencies
-callback: 
-argument: 
-
-==============================
-create_the_forms
diff --git a/openair3/MESH/RRM/SN_freq_form.h b/openair3/MESH/RRM/SN_freq_form.h
deleted file mode 100644
index 63be2293947459228146ed7eae9ee04403c5240f..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/SN_freq_form.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/** Header file generated with fdesign on Tue Jun  1 09:25:58 2010.**/
-
-#ifndef FD_Secondary_Network_frequencies_h_
-#define FD_Secondary_Network_frequencies_h_
-
-/** Callbacks, globals and object handlers **/
-
-
-/**** Forms and Objects ****/
-typedef struct {
-  FL_FORM *Secondary_Network_frequencies;
-  void *vdata;
-  char *cdata;
-  long  ldata;
-  FL_OBJECT *Selected_frequencies;
-} FD_Secondary_Network_frequencies;
-
-extern FD_Secondary_Network_frequencies * create_form_Secondary_Network_frequencies(void);
-
-#endif /* FD_Secondary_Network_frequencies_h_ */
diff --git a/openair3/MESH/RRM/VCD/Config_wave.xxx b/openair3/MESH/RRM/VCD/Config_wave.xxx
deleted file mode 100755
index 2c5b83ca445d9313714c2cb564ccdfa647e72150..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/VCD/Config_wave.xxx
+++ /dev/null
@@ -1,10 +0,0 @@
-*-18,000000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-@28
-instance
-transaction
-CMM-->RRM
-RRM-->CCM
-RRM-->RRC
-RRC-->RRM
-RRM-->PUSU
-PUSU-->RRM
diff --git a/openair3/MESH/RRM/VCD/gtkwave.ini b/openair3/MESH/RRM/VCD/gtkwave.ini
deleted file mode 100755
index fb705819de8d6deba8cd1b5510957e7d21c3456c..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/VCD/gtkwave.ini
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# sample .gtkwaverc file that works fine with verilog xl
-#
-hier_max_level 1
-dynamic_resizing 1
-use_maxtime_display 0
-
-enable_vcd_autosave 0
-use_roundcaps 1
-
-use_nonprop_fonts yes
-enable_horiz_grid yes
-use_big_fonts no
-constant_marker_update yes
-show_grid yes
-show_base_symbols no
-use_roundcaps yes
-
-atomic_vectors yes
-vcd_explicit_zero_subscripts no
-
-
-#
-# color additions
-#
-color_back   000000
-color_grid   808070
-color_high   00ff00
-color_low    00ffff
-color_trans  00ffff
-color_mid    a0c040
-
-color_value  00ffff
-color_vbox   00ff00
-color_vtrans 00ff00
-
-color_x      ff0000
-color_xfill  800000
-
-color_umark  ff8080
-color_mark   ffff80
-
-color_time   ff8000
-color_timeb  000040
-
-
diff --git a/openair3/MESH/RRM/VCD/mkvcd b/openair3/MESH/RRM/VCD/mkvcd
deleted file mode 100755
index b1e1650191d685d879814693d37868b58a5575c3..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/VCD/mkvcd
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-my $t_old ;
-my $t ;
-my $tt ;
-my $inst ;
-my $interf;
-my $funct;
-my $nfunc;
-my $transid; 
-my $transaction_mode = 1;
-
-my %wire = ( "CMM->RRM"  => "w00" ,"RRM->CMM"  => "w01",
-			 "RRC->RRM"  => "w02" ,"RRM->RRC"  => "w03",
-			 "PUSU->RRM" => "w06" ,"RRM->PUSU" => "w07"
-			  );
-			 
-my %old_value = ( 	"CMM->RRM"  => "x" ,"RRM->CMM"  => "x",
-			 		"PUSU->RRM" => "x" ,"RRM->PUSU" => "x",
-			      	"RRC->RRM"  => "x" ,"RRM->RRC"  => "x" );
-
-my %value = ( 		"CMM->RRM"  => "..." ,"RRM->CMM"  => "...",
-			 		"PUSU->RRM" => "..." ,"RRM->PUSU" => "...",
-			      	"RRC->RRM"  => "..." ,"RRM->RRC"  => "..." );
-
-open( FDOUT, ">wave.vcd" );
-
-printf( FDOUT "\$comment 
-Affichage des echanges du RRM avec le RRC et le CMM             
-utiliser GTKwave pour visualiser ce fichier   
-->	http://linux-workshop.com/bybell/ver/wave/gtkwave9x.html         
-\$end
-\$timescale
-	1us            
-\$end
-
-\$version
- 	timing simulation 
-\$end
-
-\$var real  1 w00 CMM-->RRM	    \$end
-\$var real  1 w01 RRM-->CCM	    \$end
-\$var real  1 w02 RRC-->RRM 	\$end
-\$var real  1 w03 RRM-->RRC     \$end
-\$var real  1 w04 transaction   \$end
-\$var real  1 w05 instance      \$end
-\$var real  1 w06 PUSU-->RRM 	\$end
-\$var real  1 w07 RRM-->PUSU    \$end
-
-\$enddefinitions \$end
-" );
-
-
-#open( FDIN, "<toto.res" ) ;
-open( FDIN, "cat cmm2rrm.txt rrc2rrm.txt pusu2rrm.txt rrm2cmm.txt rrm2rrc.txt rrm2pusu.txt | sort -n |" ) ;
-while( <FDIN>)
-{
-	chomp ;
-	( $t, $interf, $inst, $funct, $nfunc, $transid ) = split ;
-	
-	$t_old = $t-0.1 if ($t_old ==0 ) ;
-	
-	foreach my $k ( keys %old_value )
-	{
-		$value{$k} = "..." ;
-	}
-	
-	$value{"$interf"}=$funct;
-	
-	if ( $transaction_mode == 1)
-	{
-		printf( FDOUT "#%d\n",   $tt *1e6 ) ;
-	}
-	else
-	{
-		printf( FDOUT "#%d\n",   ( ($t -$t_old) *1e6) ) ;
-	}
-	
-	printf( FDOUT "r%d w04\n", $transid ) ;
-	printf( FDOUT "r%d w05\n", $inst ) ;
-
-	foreach my $k ( keys %old_value )
-	{
-		if ( $value{$k} ne $old_value{$k}) 
-		{
-			printf( FDOUT "s%s %s\n",   $value{$k}, $wire{$k} ) ;
-		}
-		
-		$old_value{$k} = $value{$k} ;
-	}
-	
-	$tt+=0.1;
-	
-}
-
-foreach my $k ( keys %old_value )
-{
-	$value{$k} = "..." ;
-}
-
-
-if ( $transaction_mode == 1)
-{
-	printf( FDOUT "#%d\ns... w04\n",   ($tt+0.1 )*1e6  ) ;
-}
-else
-{
-	printf( FDOUT "#%d\ns... w04\n",   int( ($t+0.1 -$t_old) *1e6  )) ;
-}
-
-foreach my $k ( keys %old_value )
-{
-	if ( $value{$k} ne $old_value{$k}) 
-	{
-		printf( FDOUT "s%s %s\n",   $value{$k}, $wire{$k} ) ;
-	}
-}
-
-if ( $transaction_mode == 1)
-{
-	printf( FDOUT "#%d\ns... w04\n",   ($tt+0.2 )*1e6  ) ;
-}
-else
-{
-	printf( FDOUT "#%d\ns... w04\n",   int( ($t+0.2 -$t_old) *1e6  )) ;
-}
-	
-close(FDIN);
-close(FDOUT);
diff --git a/openair3/MESH/RRM/all_freq_to_users_form.c b/openair3/MESH/RRM/all_freq_to_users_form.c
deleted file mode 100644
index 8bc4b372284d46349607ea5e29f4271bd4d98e28..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/all_freq_to_users_form.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/* Form definition file generated with fdesign. */
-
-#include "forms.h"
-#include <stdlib.h>
-#include "all_freq_to_users_form.h"
-
-FD_all_freq_to_users *create_form_all_freq_to_users(void)
-{
-  FL_OBJECT *obj;
-  FD_all_freq_to_users *fdui = (FD_all_freq_to_users *) fl_calloc(1, sizeof(*fdui));
-
-  //mod_lor_10_12_07++
-  /*fdui->all_freq_to_users = fl_bgn_form(FL_NO_BOX, 460, 300);
-  obj = fl_add_box(FL_UP_BOX,0,0,460,300,"");
-  fdui->User_2_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,160,420,100,"User_2_channels");
-    fl_set_object_color(obj,FL_BLACK,FL_CHARTREUSE);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fdui->User_1_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,20,420,100,"User_1_channels");
-    fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-
-  fl_end_form();*/
-  //mod_lor_10_12_07--: remove upper part and put part below when on 2 PCs
-
-
-  fdui->all_freq_to_users = fl_bgn_form(FL_NO_BOX, 460, 420);
-  obj = fl_add_box(FL_UP_BOX,0,0,460,420,"");
-  fdui->User_1_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,20,420,100,"User_1_channels");
-  fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fdui->User_2_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,155,420,100,"User_2_channels");
-  fl_set_object_color(obj,FL_BLACK,FL_CHARTREUSE);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fdui->User_3_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,290,420,100,"User_3_channels");
-  fl_set_object_color(obj,FL_BLACK,FL_CYAN);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  /*fdui->User_4_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,440,420,100,"User_4_channels");
-    fl_set_object_color(obj,FL_BLACK,FL_SLATEBLUE);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);*/
-  fl_end_form();
-
-  fdui->all_freq_to_users->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
diff --git a/openair3/MESH/RRM/all_freq_to_users_form.fd b/openair3/MESH/RRM/all_freq_to_users_form.fd
deleted file mode 100644
index 04350a6467fd1ba5479343b6c9281b6abe631ef7..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/all_freq_to_users_form.fd
+++ /dev/null
@@ -1,106 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: all_freq_to_users
-Width: 580
-Height: 590
-Number of Objects: 5
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 580 590
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 40 20 490 100
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_PALEGREEN
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_1_channels
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_1_channels
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 40 160 490 100
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_CHARTREUSE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_2_channels
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_2_channels
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 40 300 490 100
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_CYAN
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_3_channels
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_3_channels
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 40 440 490 100
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_SLATEBLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_4_channels
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_4_channels
-callback: 
-argument: 
-
-==============================
-create_the_forms
diff --git a/openair3/MESH/RRM/all_freq_to_users_form.h b/openair3/MESH/RRM/all_freq_to_users_form.h
deleted file mode 100644
index 8a2def5aa3f3ca0aefb251eb4348e098bbe34d4d..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/all_freq_to_users_form.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/** Header file generated with fdesign on Fri Nov  5 18:43:31 2010.**/
-
-#ifndef FD_all_freq_to_users_h_
-#define FD_all_freq_to_users_h_
-
-/** Callbacks, globals and object handlers **/
-
-
-/**** Forms and Objects ****/
-typedef struct {
-  FL_FORM *all_freq_to_users;
-  void *vdata;
-  char *cdata;
-  long  ldata;
-  FL_OBJECT *User_1_channels;
-  FL_OBJECT *User_2_channels;
-  FL_OBJECT *User_3_channels;
-  FL_OBJECT *User_4_channels;
-} FD_all_freq_to_users;
-
-extern FD_all_freq_to_users * create_form_all_freq_to_users(void);
-
-#endif /* FD_all_freq_to_users_h_ */
diff --git a/openair3/MESH/RRM/ch_init.c b/openair3/MESH/RRM/ch_init.c
deleted file mode 100644
index aa16c2da57133c9ee64a12d6b6b963930ac16bb6..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/ch_init.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       ch_init.c
-
-\brief      Fonctions permettant la gestion de la phase d'initialisation du
-            cluster head.
-
-\author     BURLOT Pascal
-
-\date       29/08/08
-
-
-\par     Historique:
-        P.BURLOT 2009-01-20
-            + separation de la file de message CMM/RRM a envoyer en 2 files
-              distinctes ( file_send_cmm_msg, file_send_rrc_msg)
-        L.IACOBELLI 2009-10-19
-            + include
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "L3_rrc_interface.h"
-#include "cmm_rrm_interface.h"
-#include "rrm_sock.h"
-#include "rrc_rrm_msg.h"
-#include "cmm_msg.h"
-#include "msg_mngt.h"
-#include "pusu_msg.h"
-#include "rb_db.h"
-#include "neighbor_db.h"
-#include "sens_db.h"
-#include "channels_db.h"
-#include "rrm_util.h"
-#include "transact.h"
-#include "rrm_constant.h"
-#include "rrm.h"
-#include "ch_init.h"
-
-
-
-//! Met un message dans la file des messages a envoyer
-#define PUT_CMM_MSG(m)  put_msg(  &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m )  //mod_lor_10_01_25
-#define PUT_PUSU_MSG(m) put_msg(  &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m)  //mod_lor_10_01_25
-#define PUT_RRC_MSG(m)  put_msg(  &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m )  //mod_lor_10_01_25
-
-/*!
-*******************************************************************************
-\brief  Request to initialize the Cluster Head with L3 Information
-*/
-void cmm_init_ch_req(
-  Instance_t inst      , //!< Identification de l'instance
-  L3_INFO_T  L3_info_t , //!< Type of L3 Information
-  void      *L3_info     //!< L3 addressing Information
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( rrm->state == CLUSTERHEAD_INIT0 ) {
-    L2_ID src_dst[2] ;
-    memcpy(&src_dst[0], &rrm->L2_id, sizeof(L2_ID)) ;
-    memcpy(&src_dst[1], &rrm->L2_id, sizeof(L2_ID)) ;
-
-    if ( L3_info != NULL ) {
-      rrm->L3_info_t = L3_info_t ;
-
-      if ( L3_info_t != NONE_L3 )
-        memcpy( rrm->L3_info, L3_info, L3_info_t );
-    }
-
-    //fprintf(stderr,"L3_ch_init    ");//dbg
-    //print_L3_id( IPv4_ADDR, rrm->L3_info   );
-    //fprintf(stderr,"\n");//dbg
-
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    rrm->rrc.trans_cnt++ ;
-
-    PUT_RRC_MSG(
-      msg_rrm_init_ch_req( inst,
-                           rrm->rrc.trans_cnt,
-                           &Lchan_desc[QOS_SRB0],
-                           &Lchan_desc[QOS_SRB1],
-                           rrm->L2_id
-                         )
-    ) ;
-
-    // On ne gere pas SRB0/1 car implicite
-    // add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_SRB0, &src_dst[0] ) ;
-    // add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_SRB1, &src_dst[0] ) ;
-
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-    pthread_mutex_lock( &( rrm->pusu.exclu ) ) ;
-    rrm->pusu.trans_cnt++ ;
-    add_item_transact( &(rrm->pusu.transaction), rrm->pusu.trans_cnt,INT_PUSU,RRM_PUBLISH_IND,0,NO_PARENT);
-    pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ;
-    PUT_PUSU_MSG(msg_rrm_publish_ind( inst, PUSU_RRM_SERVICE, rrm->pusu.trans_cnt  )) ;
-
-  }
-}
-
-/*!
-*******************************************************************************
-\brief Mesh router PHY-Synch Indication
-*/
-void rrc_phy_synch_to_MR_ind(
-  Instance_t inst      , //!< Identification de l'instance
-  L2_ID      L2_id       //!< L2 ID of MR
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( rrm->state == ISOLATEDNODE ) {
-    /* Memorisation du L2_id du noeud ( c'est le niveau RRC qui a l'info ) */
-    memcpy( &rrm->L2_id,  &L2_id, sizeof(L2_ID));
-
-    //--------------------------------------------
-    pthread_mutex_lock(   &( rrm->rrc.exclu )  ) ;
-
-    if ( rrm->rrc.pNeighborEntry  != NULL ) // Reset Neighborhood
-      del_all_neighbor( &(rrm->rrc.pNeighborEntry) );
-
-    pthread_mutex_unlock( &( rrm->rrc.exclu )  ) ;
-
-    //mod_lor_10_03_01++
-    //if (WSN){
-    if (WSN && rrm->id == FC_ID) {
-      rrm->role = FUSIONCENTER;
-      fprintf(stderr,"[CRRM] FUSIONCENTER\n");
-    } else if (rrm->id == BTS_ID && SCEN_1) {
-      rrm->role = BTS;
-      fprintf(stderr,"[CRRM] BTS\n");
-    }
-    //mod_lor_10_04_27++
-    else if (rrm->id == FC_ID && SCEN_2_CENTR) {
-      rrm->role = FUSIONCENTER;
-      fprintf(stderr,"[CRRM] CH1\n");
-    } else if (rrm->id == CH_COLL_ID &&SCEN_2_CENTR) {
-      rrm->role = CH_COLL;
-      fprintf(stderr,"[CRRM] CH2\n");
-    } else
-      fprintf(stderr,"Warning!!! No role assigned\n");
-
-    //mod_lor_10_04_27--
-    //mod_lor_10_03_01--
-
-    PUT_CMM_MSG( msg_router_is_CH_ind( inst,rrm->L2_id)) ;
-
-    rrm->state = CLUSTERHEAD_INIT0 ;
-    fprintf(stderr,"[CRRM] CLUSTERHEAD_INIT0\n");
-  } else
-    fprintf(stderr,"[CRRM] RRC_PHY_SYNCH_TO_MR_IND/TIMEOUT_IN  is not allowed (Only IN):etat=%d\n",rrm->state);
-}
-
-
diff --git a/openair3/MESH/RRM/ch_init.h b/openair3/MESH/RRM/ch_init.h
deleted file mode 100644
index 95e9095e8c93fdf1454777c2c646fb80efe8f182..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/ch_init.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file     ch_init.h
-
-\brief    Fichier d'entete contenant les declarations des types, des defines ,
-      et des fonctions relatives a la gestion de la phase d'initialisation
-      du cluster head.
-
-\author   BURLOT Pascal
-
-\date     29/08/08
-
-
-\par     Historique:
-      $Author$  $Date$  $Revision$
-      $Id$
-      $Log$
-
-*******************************************************************************
-*/
-
-#ifndef CH_INIT_H
-#define CH_INIT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// ---------------------------------------------------------------------------
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CH_INIT_H */
diff --git a/openair3/MESH/RRM/channels_db.c b/openair3/MESH/RRM/channels_db.c
deleted file mode 100755
index d8d7ca54d093357f954338ba6963d1f94239d79f..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/channels_db.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       channels_db.c
-
-\brief      Fonctions permettant la gestion de la base de donnée sur les canaux
-
-\author     IACOBELLI Lorenzo
-
-\date       16/10/09
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "rrm_util.h"
-#include "sens_db.h"
-#include "channels_db.h"
-
-
-//! Selection locale du mode de debug
-#define DBG_CHANNELS_DB 1
-
-#if DBG_CHANNELS_DB==0
-//! Macro inactive
-#define PRINT_CHANNELS_DB(...)
-#else
-//! Macro affichant  la liste des radio bearers
-#define PRINT_CHANNELS_DB(...) print_channels_db( __VA_ARGS__ )
-#endif
-
-/*!
-*******************************************************************************
-\brief  La fonction affiche a l'ecran la liste (pour du debug)
-
-\return  aucune valeur retournee
-*/
-void print_channels_db(
-  CHANNELS_DB_T *pEntry ///< pointeur sur le debut de liste
-)
-{
-  //unsigned int i; //dbg
-  CHANNELS_DB_T *pCurrentItem = pEntry;
-  int i;
-
-  //fprintf(stderr,"channels entry  @%p \n", pEntry);//dbg
-  //fprintf(stderr,"sens list=[\n");
-  while ( pCurrentItem != NULL) {
-    //fprintf(stderr,"curr channel %d is free? %d \n", pCurrentItem->channel.Ch_id,pCurrentItem->is_free);//dbg
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  fprintf(stderr," ]\n");
-}
-
-
-
-
-
-/*!
-*******************************************************************************
-\brief  Comparaison de deux ID de niveau 2
-
-\return si 0 alors les IDs sont identiques
-*/
-static int L2_ID_cmp(
-  L2_ID *L2_id1, ///< ID de niveau 2
-  L2_ID *L2_id2  ///< ID de niveau 2
-)
-{
-  return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ;
-}
-
-
-/*!
-*******************************************************************************
-\brief  La fonction ajoute un nouveau canal.
-
-\return  retourne la valeur du nouvel element
-*/
-CHANNELS_DB_T *add_chann_db(
-  CHANNELS_DB_T **ch_entry  , ///< pointeur sur l'entree de la liste de noeuds
-  CHANNEL_T channel         , ///< channel to insert in the list
-  unsigned int is_free      , ///< Information about the availability of the channel //mod_lor_10_05_28 ->char instead of int
-  double info_time            ///< Date of information update
-)
-{
-  //fprintf(stderr,"starting ch pointer  @%p \n", *ch_entry);//dbg
-  //fprintf(stderr,"\n NB_info=%d \n", NB_info); //dbg
-  CHANNELS_DB_T *pOldEntry = *ch_entry;
-  CHANNELS_DB_T *pNewItem = RRM_CALLOC( CHANNELS_DB_T , 1 ) ;
-
-  PNULL(pNewItem) ;
-
-  if ( pNewItem == NULL )
-    return NULL ;
-
-  memcpy( &(pNewItem->channel) ,&channel, sizeof(CHANNEL_T) ) ;
-  pNewItem->info_time =  info_time ;
-  pNewItem->is_free   =  is_free;
-  pNewItem->priority  =  0;
-  pNewItem->is_ass    =  0;
-  //fprintf(stderr,"starting ch pointer  @%p \n", pNewItem->info_hd);//dbg
-
-
-  *ch_entry          =  pNewItem ;
-  pNewItem->next     =  pOldEntry;
-  /*fprintf(stderr,"add_node\n\n");//dbg
-  fprintf(stderr,"node entry  @%p \n", (*node_entry)->info_hd);//dbg
-  fprintf(stderr,"node entry  @%p \n", pNewItem->info_hd);//dbg
-  fprintf(stderr,"passed par  @%p \n", ch_info_hd);//dbg*/
-
-  return pNewItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction detruit entierement les info sur les canaux memorizées à l'adresse indiqué
-
-\return  aucune valeur.
-*/
-void del_all_channels(
-  CHANNELS_DB_T **ch_entry  ///< pointeur sur l'entree de la liste
-)
-{
-  CHANNELS_DB_T *pCurrentItem = *ch_entry;
-  CHANNELS_DB_T *pNextItem    ;
-
-  if ( (pCurrentItem == NULL)  || (ch_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-    RRM_FREE( pCurrentItem ) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  *ch_entry = NULL ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction retire l'element identifie par le Ch_id de la liste des canaux
-
-\return  aucune valeur.
-*/
-void del_channel(
-  CHANNELS_DB_T **ch_entry  , ///< pointeur sur l'entree de la liste de noeuds
-  unsigned int Ch_id          ///< channel ID
-)
-{
-  CHANNELS_DB_T *pCurrentItem = *ch_entry;
-  CHANNELS_DB_T *pNextItem    ;
-  CHANNELS_DB_T **ppPrevItem  = ch_entry ;
-
-  if ( (pCurrentItem == NULL)  || (ch_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-
-    if ( pCurrentItem->channel.Ch_id == Ch_id ) {
-      *ppPrevItem = pNextItem;
-
-      RRM_FREE( pCurrentItem ) ;
-      fprintf( stdout,"channel %d deleted from database\n", Ch_id);
-
-      return ;
-    }
-
-    ppPrevItem   = &(pCurrentItem->next) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  if ( pCurrentItem == NULL )
-    fprintf(stderr, "ERROR: channel_id unknown\n") ;
-
-}
-
-
-
-/*!
-*******************************************************************************
-\brief  La fonction recherche le descripteur du canal identifie par le Ch_id
-        dans la liste des canaux
-
-\return  pointeur sur le descripteur de canal trouve sinon NULL .
-*/
-CHANNELS_DB_T *get_chann_db_info(
-  CHANNELS_DB_T *ch_entry  , ///< pointeur sur l'entree de la liste de noeuds
-  unsigned int Ch_id         ///< channel ID
-)
-{
-  CHANNELS_DB_T *pCurrentItem = ch_entry;
-
-  while ( pCurrentItem != NULL) {
-    if ( pCurrentItem->channel.Ch_id == Ch_id)
-      break  ;
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  return pCurrentItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction ajoute ou update un canal.
-
-\return  retourne la valeur du nouvel element
-*/
-CHANNELS_DB_T *up_chann_db(
-  CHANNELS_DB_T **ch_entry  , ///< pointeur sur l'entree de la liste de noeuds
-  CHANNEL_T channel         , ///< channel to insert in the list
-  unsigned int is_free      , ///< Information about the availability of the channel //mod_lor_10_05_28 ->char instead of int
-  double info_time            ///< Date of information update
-)
-{
-  if (ch_entry == NULL) {
-    fprintf(stderr,"ERROR! invalid database pointer \n");
-    return(NULL);
-  }
-
-  CHANNELS_DB_T *pNewItem = get_chann_db_info( *ch_entry, channel.Ch_id );
-
-  if ( pNewItem == NULL ) {
-    pNewItem = add_chann_db( ch_entry, channel, is_free, info_time);
-    return pNewItem;
-  }
-
-  pNewItem->info_time =  info_time ;
-  //mod_lor_10_05_17++
-  pNewItem->is_free=is_free;
-  /*if (is_free == pNewItem->is_free)
-      return pNewItem;
-  if (!(pNewItem->is_ass)){
-      pNewItem->is_free=is_free;
-      return pNewItem;
-  }*/
-  return pNewItem;
-  //else
-  //    fprintf(stderr,"Primary User detected on channel %d in use by secondary network\n", channel.Ch_id);//mod_lor_10_05_12
-  //mod_lor_10_05_17--
-  //PRINT_CHANNELS_DB(*ch_entry); //dbg
-  return NULL;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction mis à jour les canaux assignés.
-
-\return  retourne la valeur du nouvel element
-*/
-CHANNELS_DB_T *up_chann_ass(
-  CHANNELS_DB_T *ch_entry  , ///< pointeur sur l'entree de la liste de noeuds
-  unsigned int Ch_id       , ///< ID of the channel to update
-  unsigned int is_ass      , ///< Information about the use of the channel by the secondary network
-  L2_ID source_id          , ///< In case of channel assigned: address of the source node that is using it
-  L2_ID dest_id              ///< In case of channel assigned: address of the destination node that is using it
-)
-
-{
-  //fprintf(stderr,"up_channels 1 inizio\n");//dbg
-  CHANNELS_DB_T *pChannels = get_chann_db_info( ch_entry  , Ch_id );
-
-  if (pChannels == NULL) {
-    fprintf(stderr,"ERROR! Channel %d not in database!\n", Ch_id);
-    return (NULL);
-  }
-
-  //fprintf(stderr,"up_channels 2 trovato\n");//dbg
-  //fprintf(stderr,"up_channels 2b is_free: %d is_ass: %d\n",pChannels->is_free,pChannels->is_ass);//dbg
-  if (!(pChannels->is_free)) {
-    fprintf(stderr,"The channel %d is not free!\n", Ch_id);
-    return (NULL); //mod_lor_10_05_17
-  } else if (pChannels->is_ass == is_ass) {
-    //fprintf(stderr,"up_channels 3 is_ass\n");//dbg
-    if (is_ass && L2_ID_cmp (&(source_id), &(pChannels->source_id))!=0)
-      fprintf(stderr,"The channel %d is already assigned \n", Ch_id);
-
-    //fprintf(stderr,"No updating performed for channel %d \n", Ch_id);//dbg
-
-  } else {
-    pChannels->is_ass = is_ass;
-
-    //fprintf(stderr,"up_channels 4 is_ass\n");//dbg
-    if (is_ass) {
-      //fprintf(stderr,"up_channels 5 is_ass\n");//dbg
-      memcpy( pChannels->source_id.L2_id, source_id.L2_id, sizeof(L2_ID) )  ;
-      memcpy( pChannels->dest_id.L2_id, dest_id.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    //fprintf(stdout,"Channel %d assignement updated in %d\n", Ch_id, is_ass);//dbg
-  }
-
-  //fprintf(stderr,"up_channels 6 END\n");//dbg
-  return (pChannels);
-}
-
-//mod_lor_10_05_17++
-/*!
-*******************************************************************************
-\brief  The function select a new channel among the free ones. It selects the
-        first channel marked as free and not assigned in the channels database
-        and assigns it to the nodes whose L2_ids are passed as imput
-
-\return  the pointer to selected channel entry; NULL if not available channels are found
-*/
-CHANNELS_DB_T *select_new_channel(
-  CHANNELS_DB_T *ch_entry  , ///< pointeur sur l'entree de la liste de noeuds
-  L2_ID source_id          , ///< In case of channel assigned: address of the source node that is using it
-  L2_ID dest_id              ///< In case of channel assigned: address of the destination node that is using it
-)
-
-{
-
-  CHANNELS_DB_T *pChannels = ch_entry;
-
-  while ( pChannels != NULL) {
-    if ( pChannels->is_free && !(pChannels->is_ass) )
-      break  ;
-
-    pChannels = pChannels->next ;
-  }
-
-
-  if (pChannels == NULL) {
-    fprintf(stderr,"*SELECT NEW CHANNEL* -> No free channels available!\n");
-    return (NULL);
-  } else {
-    pChannels->is_ass = 1;
-    memcpy( pChannels->source_id.L2_id, source_id.L2_id, sizeof(L2_ID) )  ;
-    memcpy( pChannels->dest_id.L2_id, dest_id.L2_id, sizeof(L2_ID) )  ;
-  }
-
-  return (pChannels);
-}
-//mod_lor_10_05_17--
diff --git a/openair3/MESH/RRM/channels_db.h b/openair3/MESH/RRM/channels_db.h
deleted file mode 100755
index 0f8061683007710451873b34471c113f12d9b3ba..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/channels_db.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       channels_db.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-            et des fonctions relatives a la gestion de la base de donnée sur
-            les canaux.
-
-\author     IACOBELLI Lorenzo
-
-\date       16/10/09
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#ifndef CHANNELS_DB_H
-#define CHANNELS_DB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-// ---------------------------------------------------------------------------
-
-CHANNELS_DB_T *add_chann_db( CHANNELS_DB_T **ch_entry, CHANNEL_T channel, unsigned int is_free, double info_time);        //mod_lor_10_05_28 ->char instead of int
-void del_channel( CHANNELS_DB_T **ch_entry, unsigned int Ch_id);
-void del_all_channels( CHANNELS_DB_T **ch_entry ) ;
-CHANNELS_DB_T *get_chann_db_info( CHANNELS_DB_T *ch_entry  , unsigned int Ch_id );
-CHANNELS_DB_T *up_chann_db( CHANNELS_DB_T **ch_entry, CHANNEL_T channel, unsigned int is_free, double info_time); //mod_lor_10_05_28 ->char instead of int
-CHANNELS_DB_T *up_chann_ass( CHANNELS_DB_T *ch_entry, unsigned int Ch_id, unsigned int is_ass, L2_ID source_id, L2_ID dest_id);
-CHANNELS_DB_T *select_new_channel( CHANNELS_DB_T *ch_entry, L2_ID source_id, L2_ID dest_id); //mod_lor_10_05_17
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CHANNELS_DB_H */
diff --git a/openair3/MESH/RRM/cmm_msg.c b/openair3/MESH/RRM/cmm_msg.c
deleted file mode 100644
index d317520aae8a1380c5e872dfd54292133c0246db..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/cmm_msg.c
+++ /dev/null
@@ -1,793 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       cmm_msg.c
-
-\brief      Fonctions permettant le formattage des donnees pour l'envoi d'un
-            message sur le socket entre le CMM et le RRM
-
-\author     BURLOT Pascal
-
-\date       16/07/08
-
-
-\par     Historique:
-            L.IACOBELLI 2009-10-19
-                + new messages
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "L3_rrc_defs.h"
-#include "rrm_sock.h"
-#include "cmm_rrm_interface.h"
-#include "cmm_msg.h"
-#include "rrm_util.h"
-
-#ifdef TRACE
-//! Macro creant la chaine a partir du nom de la variable
-#define STRINGIZER(x) #x
-//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
-const char *Str_msg_cmm_rrm[NB_MSG_CMM_RRM] =  {
-  STRINGIZER(CMM_CX_SETUP_REQ       ),
-  STRINGIZER(RRM_CX_SETUP_CNF       ),
-  STRINGIZER(CMM_CX_MODIFY_REQ      ),
-  STRINGIZER(RRM_CX_MODIFY_CNF      ),
-  STRINGIZER(CMM_CX_RELEASE_REQ     ),
-  STRINGIZER(RRM_CX_RELEASE_CNF     ),
-  STRINGIZER(CMM_CX_RELEASE_ALL_REQ ),
-  STRINGIZER(RRM_CX_RELEASE_ALL_CNF ),
-  STRINGIZER(RRCI_ATTACH_REQ        ),
-  STRINGIZER(RRM_ATTACH_IND         ),
-  STRINGIZER(CMM_ATTACH_CNF         ),
-  STRINGIZER(RRM_MR_ATTACH_IND      ),
-  STRINGIZER(ROUTER_IS_CH_IND       ),
-  STRINGIZER(RRCI_CH_SYNCH_IND      ),
-  STRINGIZER(CMM_INIT_MR_REQ        ),
-  STRINGIZER(RRM_MR_SYNCH_IND       ),
-  STRINGIZER(RRM_NO_SYNCH_IND       ),
-  STRINGIZER(CMM_INIT_CH_REQ        ),
-  STRINGIZER(CMM_INIT_SENSING       ),
-  STRINGIZER(CMM_STOP_SENSING       ),
-  STRINGIZER(CMM_ASK_FREQ           ),
-  STRINGIZER(CMM_NEED_TO_TX         ),
-  STRINGIZER(CMM_INIT_COLL_SENSING  ),//add_lor_10_11_08
-  STRINGIZER(CMM_USER_DISC          ),//add_lor_10_11_08
-  STRINGIZER(CMM_LINK_DISC          )//,//add_lor_10_11_08
-  //STRINGIZER(CMM_INIT_TRANS_REQ     ),
-  //STRINGIZER(RRM_INIT_TRANS_CONF    )
-};
-#endif
-
-/*!
-*******************************************************************************
-\brief  This function initialize the message header
-\return any return value
-*/
-static void init_cmm_msg_head(
-  msg_head_t   *msg_head , //!< message header to initialize
-  Instance_t    inst     , //!< identification de l'instance
-  MSG_CMM_RRM_T msg_type , //!< type of message to initialize
-  unsigned int  size     , //!< size of message
-  Transaction_t Trans_id   //!< transaction id associated to this message
-)
-{
-  if ( msg_head != NULL ) {
-    msg_head->start    = START_MSG ;
-    msg_head->msg_type = 0xFF & msg_type ;
-    msg_head->inst     = inst  ;
-    msg_head->Trans_id = Trans_id  ;
-    msg_head->size     = size ;
-  }
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_cx_setup_req().
-\return message formate
-*/
-msg_t * msg_cmm_cx_setup_req(
-  Instance_t    inst      , //!< identification de l'instance
-  L2_ID         Src       , //!< L2 source MAC address
-  L2_ID         Dst       , //!< L2 destination MAC address
-  QOS_CLASS_T   QoS_class , //!< QOS class index
-  Transaction_t Trans_id    //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    cmm_cx_setup_req_t *p = RRM_CALLOC(cmm_cx_setup_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst,CMM_CX_SETUP_REQ, sizeof( cmm_cx_setup_req_t) ,Trans_id);
-
-      memcpy( p->Src.L2_id, Src.L2_id, sizeof(L2_ID) )  ;
-      memcpy( p->Dst.L2_id, Dst.L2_id, sizeof(L2_ID) )  ;
-      p->QoS_class    = QoS_class;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_cx_setup_cnf().
-\return message formate
-*/
-msg_t * msg_rrm_cx_setup_cnf(
-  Instance_t    inst      , //!< identification de l'instance
-  RB_ID         Rb_id     , //!< L2 Rb_id
-  Transaction_t Trans_id    //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrm_cx_setup_cnf_t *p = RRM_CALLOC(rrm_cx_setup_cnf_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst,RRM_CX_SETUP_CNF, sizeof( rrm_cx_setup_cnf_t) ,Trans_id);
-
-      p->Rb_id        = Rb_id ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_cx_modify_req().
-\return message formate
-*/
-msg_t * msg_cmm_cx_modify_req(
-  Instance_t    inst      , //!< identification de l'instance
-  RB_ID         Rb_id     , //!< L2 Rb_id
-  QOS_CLASS_T   QoS_class , //!< QOS class index
-  Transaction_t Trans_id    //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    cmm_cx_modify_req_t *p = RRM_CALLOC(cmm_cx_modify_req_t, 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst,CMM_CX_MODIFY_REQ, sizeof( cmm_cx_modify_req_t ) ,Trans_id);
-      p->Rb_id        = Rb_id  ;
-      p->QoS_class    = QoS_class  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_cx_modify_cnf().
-\return message formate
-*/
-msg_t * msg_rrm_cx_modify_cnf(
-  Instance_t    inst      , //!< identification de l'instance
-  Transaction_t Trans_id    //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    init_cmm_msg_head(&(msg->head),inst,RRM_CX_MODIFY_CNF, 0 ,Trans_id);
-    msg->data = NULL ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-         cmm_cx_release_req().
-\return message formate
-*/
-msg_t * msg_cmm_cx_release_req(
-  Instance_t    inst      , //!< identification de l'instance
-  RB_ID          Rb_id    , //!< L2 Rb_id
-  Transaction_t Trans_id    //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    cmm_cx_release_req_t *p = RRM_CALLOC(cmm_cx_release_req_t , 1) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst,CMM_CX_RELEASE_REQ, sizeof( cmm_cx_release_req_t ) ,Trans_id);
-      p->Rb_id        = Rb_id ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_cx_release_cnf().
-\return message formate
-*/
-msg_t * msg_rrm_cx_release_cnf(
-  Instance_t    inst      , //!< identification de l'instance
-  Transaction_t Trans_id    //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    init_cmm_msg_head(&(msg->head),inst,RRM_CX_RELEASE_CNF, 0 ,Trans_id);
-    msg->data = NULL ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_cx_release_all_req().
-\return message formate
-*/
-msg_t * msg_cmm_cx_release_all_req(
-  Instance_t    inst      , //!< identification de l'instance
-  L2_ID         L2_id     , //!< L2 Rb_id
-  Transaction_t Trans_id    //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    cmm_cx_release_all_req_t *p = RRM_CALLOC(cmm_cx_release_all_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst,CMM_CX_RELEASE_ALL_REQ, sizeof( cmm_cx_release_all_req_t) ,Trans_id);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_cx_release_all_cnf().
-\return message formate
-*/
-msg_t * msg_rrm_cx_release_all_cnf(
-  Instance_t    inst      , //!< identification de l'instance
-  Transaction_t Trans_id    //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    init_cmm_msg_head(&(msg->head),inst,RRM_CX_RELEASE_ALL_CNF, 0 ,Trans_id);
-    msg->data = NULL ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrci_attach_req().
-\return message formate
-*/
-msg_t * msg_rrci_attach_req(
-  Instance_t     inst      , //!< identification de l'instance
-  L2_ID          L2_id     , //!< Layer 2 (MAC) ID
-  L3_INFO_T      L3_info_t , //!< Type of L3 Information
-  unsigned char *L3_info   , //!< L3 addressing Information
-  RB_ID          DTCH_B_id , //!< RBID of broadcast IP service (MR only)
-  RB_ID          DTCH_id   , //!< RBID of default IP service (MR only)
-  Transaction_t  Trans_id    //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrci_attach_req_t *p = RRM_CALLOC(rrci_attach_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst,RRCI_ATTACH_REQ, sizeof( rrci_attach_req_t) ,Trans_id);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      p->L3_info_t    = L3_info_t ;
-
-      if ( L3_info_t != NONE_L3 )
-        memcpy( p->L3_info, L3_info, L3_info_t );
-
-      p->DTCH_B_id    = DTCH_B_id ;
-      p->DTCH_id      = DTCH_id ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_attach_ind().
-\return message formate
-*/
-msg_t * msg_rrm_attach_ind(
-  Instance_t     inst      , //!< identification de l'instance
-  L2_ID          L2_id     , //!< Layer 2 (MAC) ID
-  L3_INFO_T      L3_info_t , //!< Type of L3 Information
-  unsigned char *L3_info   , //!< L3 addressing Information
-  RB_ID DTCH_id              //!< RBID of default IP service (MR only)
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrm_attach_ind_t *p = RRM_CALLOC(rrm_attach_ind_t , 1) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst,RRM_ATTACH_IND, sizeof( rrm_attach_ind_t) ,0);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      p->L3_info_t    = L3_info_t ;
-
-      if ( L3_info_t != NONE_L3 )
-        memcpy( p->L3_info, L3_info, L3_info_t );
-
-      p->DTCH_id      = DTCH_id ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_attach_cnf().
-\return message formate
-*/
-msg_t * msg_cmm_attach_cnf(
-  Instance_t     inst      , //!< identification de l'instance
-  L2_ID          L2_id     , //!< Layer 2 (MAC) ID
-  L3_INFO_T      L3_info_t , //!< Type of L3 Information
-  unsigned char *L3_info   , //!< L3 addressing Information
-  Transaction_t  Trans_id    //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    cmm_attach_cnf_t *p = RRM_CALLOC(cmm_attach_cnf_t, 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst,CMM_ATTACH_CNF, sizeof( cmm_attach_cnf_t) ,Trans_id);
-
-      p->L3_info_t    = L3_info_t ;
-
-      if ( L3_info_t != NONE_L3 )
-        memcpy( p->L3_info, L3_info, L3_info_t );
-
-      memcpy( &p->L2_id, &L2_id, sizeof(L2_ID) );
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_MR_attach_ind().
-\return message formate
-*/
-msg_t * msg_rrm_MR_attach_ind(
-  Instance_t     inst      , //!< identification de l'instance
-  L2_ID          L2_id       //!< MR Layer 2 (MAC) ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrm_MR_attach_ind_t *p = RRM_CALLOC( rrm_MR_attach_ind_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst,RRM_MR_ATTACH_IND, sizeof( rrm_MR_attach_ind_t) ,0);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        router_is_CH_ind().
-\return message formate
-*/
-msg_t * msg_router_is_CH_ind(
-  Instance_t     inst      , //!< identification de l'instance
-  L2_ID          L2_id       //!< CH Layer 2 (MAC) ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    router_is_CH_ind_t *p = RRM_CALLOC(router_is_CH_ind_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst,ROUTER_IS_CH_IND, sizeof( router_is_CH_ind_t) ,0);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrci_CH_synch_ind().
-\return message formate
-*/
-msg_t * msg_rrci_CH_synch_ind(
-  Instance_t     inst        //!< identification de l'instance
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    init_cmm_msg_head(&(msg->head),inst,RRCI_CH_SYNCH_IND, 0 ,0);
-    msg->data = NULL ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_init_mr_req().
-\return message formate
-*/
-msg_t * msg_cmm_init_mr_req(
-  Instance_t     inst        //!< identification de l'instance
-)
-{
-  msg_t *msg = RRM_CALLOC( msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    init_cmm_msg_head(&(msg->head),inst,RRCI_CH_SYNCH_IND, 0 ,0);
-
-    msg->data = NULL ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_MR_synch_ind().
-\return message formate
-*/
-msg_t * msg_rrm_MR_synch_ind(
-  Instance_t     inst        //!< identification de l'instance
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    init_cmm_msg_head(&(msg->head),inst, RRM_MR_SYNCH_IND, 0 ,0);
-    msg->data = NULL ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rm_no_synch_ind().
-\return message formate
-*/
-msg_t * msg_rrm_no_synch_ind(
-  Instance_t     inst        //!< identification de l'instance
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
-
-  if ( msg != NULL ) {
-    init_cmm_msg_head(&(msg->head),inst,RRM_NO_SYNCH_IND, 0 ,0);
-    msg->data = NULL ;
-  }
-
-  return msg  ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_init_ch_req.
-\return message formate
-*/
-msg_t * msg_cmm_init_ch_req(
-  Instance_t     inst      , //!< identification de l'instance
-  L3_INFO_T      L3_info_t , //!< Type of L3 Information
-  void          *L3_info     //!< L3 addressing Information
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    cmm_init_ch_req_t *p = RRM_CALLOC(cmm_init_ch_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst, CMM_INIT_CH_REQ, sizeof( cmm_init_ch_req_t) ,0);
-
-      p->L3_info_t    = L3_info_t ;
-
-      if ( L3_info_t != NONE_L3 )
-        memcpy( p->L3_info, L3_info, L3_info_t );
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_init_sensing.
-\return message formate
-*/
-msg_t *msg_cmm_init_sensing( //mod_lor_10_03_12: change of parameters
-  Instance_t       inst,        //!< identification de l'instance
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    cmm_init_sensing_t *p = RRM_CALLOC(cmm_init_sensing_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst, CMM_INIT_SENSING, sizeof( cmm_init_sensing_t) ,0);
-      //mod_lor_10_03_12++
-      p->Start_fr     = Start_fr;
-      p->Stop_fr      = Stop_fr;
-      p->Meas_band    = Meas_band;
-      p->Meas_tpf     = Meas_tpf;
-      p->Nb_channels  = Nb_channels;
-      p->Overlap      = Overlap;
-      p->Sampl_freq   = Sampl_freq;
-      //mod_lor_10_03_12--
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_stop_sensing.
-\return message formate
-*/
-msg_t *msg_cmm_stop_sensing(
-  Instance_t inst        //!< identification de l'instance
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
-
-  if ( msg != NULL ) {
-    init_cmm_msg_head(&(msg->head),inst,CMM_STOP_SENSING, 0 ,0);
-    msg->data = NULL ;
-  }
-
-  return msg  ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_ask_freq.
-\return message formate
-*/
-msg_t *msg_cmm_ask_freq(
-  Instance_t inst        //!< identification de l'instance
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
-
-  if ( msg != NULL ) {
-    init_cmm_msg_head(&(msg->head),inst,CMM_ASK_FREQ, 0 ,0);
-    msg->data = NULL ;
-  }
-
-  return msg  ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_need_to_tx. //add: mod_lor_10_10_28
-\return message formate
-*/
-msg_t *msg_cmm_need_to_tx(
-  Instance_t inst        ,//!< identification de l'instance du noeud qui veut transmettre
-  Instance_t dest        ,//!< identification de l'instance du noeud destinataire
-  QOS_CLASS_T QoS_class   //!< Required quality of service (i.e. number of channels)
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
-
-  if ( msg != NULL ) {
-    cmm_need_to_tx_t *p = RRM_CALLOC(cmm_need_to_tx_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst, CMM_NEED_TO_TX, sizeof( cmm_need_to_tx_t) ,0);
-      p->dest           = dest;
-      p->QoS_class      = QoS_class;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg  ;
-}
-
-/*! //add_lor_10_11_08
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_init_coll_sensing.
-\return message formate
-*/
-msg_t *msg_cmm_init_coll_sensing(
-  Instance_t       inst,        //!< identification de l'instance
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    cmm_init_coll_sensing_t *p = RRM_CALLOC(cmm_init_coll_sensing_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst, CMM_INIT_COLL_SENSING, sizeof( cmm_init_coll_sensing_t) ,0);
-      p->Start_fr     = Start_fr;
-      p->Stop_fr      = Stop_fr;
-      p->Meas_band    = Meas_band;
-      p->Meas_tpf     = Meas_tpf;
-      p->Nb_channels  = Nb_channels;
-      p->Overlap      = Overlap;
-      p->Sampl_freq   = Sampl_freq;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!//add_lor_10_11_09
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_user_disc. msg received by a secondary user that wants to disconnect
-\return message formate
-*/
-msg_t *msg_cmm_user_disc(
-  Instance_t inst        //!< identification de l'instance
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
-
-  if ( msg != NULL ) {
-    init_cmm_msg_head(&(msg->head),inst,CMM_USER_DISC, 0 ,0);
-    msg->data = NULL ;
-  }
-
-  return msg  ;
-}
-
-/*!//add_lor_10_11_09
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_linkr_disc. msg received by a secondary user that wants to stop a link
-\return message formate
-*/
-msg_t *msg_cmm_link_disc(
-  Instance_t inst       ,//!< identification de l'instance
-  Instance_t dest        //!< identification du destinataire
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
-
-  if ( msg != NULL ) {
-    cmm_link_disk_t *p = RRM_CALLOC(cmm_link_disk_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_cmm_msg_head(&(msg->head),inst, CMM_LINK_DISC, sizeof( cmm_link_disk_t) ,0);
-      p->dest = dest;
-    }
-
-    msg->data = (char *) p ;
-
-  }
-
-  return msg  ;
-}
diff --git a/openair3/MESH/RRM/cmm_msg.h b/openair3/MESH/RRM/cmm_msg.h
deleted file mode 100644
index 5adc2ffee73a2fb4a35c5acf97aacd8943b2fe11..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/cmm_msg.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-/*!
-*******************************************************************************
-
-\file       cmm_msg.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-            et des fonctions relatives aux messages CMM-RRM ou CMM-RRCI.
-
-            Les fonctions servent à créer le buffer de message, remplir l'entete
-            et copier les parametres de fonction. Chaque fonction retourne le
-            message qui pourra être envoye sur le socket entre le CMM et le
-            RRM ou RRCI .
-
-\author     BURLOT Pascal
-
-\date       16/07/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-
-#ifndef CMM_MSG_H
-#define CMM_MSG_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*!
-*******************************************************************************
-\brief  Enumeration des messages entre le RRM/RRCI et le CMM
-*/
-typedef enum {
-  CMM_CX_SETUP_REQ = 0    , ///< Message CMM->RRM : requete de configuration d'une connexion
-  RRM_CX_SETUP_CNF        , ///< Message RRM->CMM : confirmation de configuration d'une connexion
-  CMM_CX_MODIFY_REQ       , ///< Message CMM->RRM : requete de modification d'une connexion
-  RRM_CX_MODIFY_CNF       , ///< Message RRM->CMM : confirmation de modification d'une connexion
-  CMM_CX_RELEASE_REQ      , ///< Message CMM->RRM : requete de liberation d'une connexion
-  RRM_CX_RELEASE_CNF      , ///< Message RRM->CMM : confirmation de liberation d'une connexion
-  CMM_CX_RELEASE_ALL_REQ  , ///< Message CMM->RRM : requete de liberation de toutes les connexions
-  RRM_CX_RELEASE_ALL_CNF  , ///< Message RRM->CMM : confirmation de liberation de toutes les connexions
-  RRCI_ATTACH_REQ         , ///< Message RRCI->CMM : requete de d'attachement d'un MR
-  RRM_ATTACH_IND          , ///< Message RRM->CMM : indicateur d'attachement d'un MR
-  CMM_ATTACH_CNF          , ///< Message CMM->RRM : confirmation d'attachement d'un MR
-  RRM_MR_ATTACH_IND       , ///< Message RRM->CMM : indicateur d'attachement d'un MR
-  ROUTER_IS_CH_IND        , ///< Message RRM->CMM : indicateur que le noeud est un cluster head
-  RRCI_CH_SYNCH_IND       , ///< Message RRCI->CMM : indicateur que le noeud est synchronise sur un CH
-  CMM_INIT_MR_REQ         , ///< Message CMM->RRM : requete d'initialisation de l'attachement d'un MR
-  RRM_MR_SYNCH_IND        , ///< Message RRM->CMM : indicateur que le noeud est synchronise sur un MR
-  RRM_NO_SYNCH_IND        , ///< Message RRM->CMM : indicateur que le noeud n'est pas synchronise sur un CH ou MR
-  CMM_INIT_CH_REQ         , ///< Message CMM->RRM : requete d'initialisation d'un CH
-  CMM_INIT_SENSING        , ///< Message CMM->RRM : requete d'initialisation du sensing
-  CMM_STOP_SENSING        , ///< Message CMM->RRM : requete de stop du sensing
-  CMM_ASK_FREQ            , ///< Message CMM->RRM : in BTS, message to start an open freq. query
-  CMM_NEED_TO_TX          , ///< Message CMM->RRM : in SU, second scenario centr, message to start an open freq. query
-  CMM_INIT_COLL_SENSING   , ///< Message CMM->RRM : requete d'initialisation du sensing collaborative //add_lor_10_11_08
-  CMM_USER_DISC           , ///< Message CMM->RRM : user disconnected -> delete all active com //add_lor_10_11_08
-  CMM_LINK_DISC           , ///< Message CMM->RRM : stop comm -> delete an active link //add_lor_10_11_08
-  //CMM_INIT_TRANS_REQ      , ///< Message CMM->RRM : in SU, second scenario distr, message to start a connection with another SU
-  //RRM_INIT_TRANS_CONF     , ///< Message RRM->CMM : confirmation de l'ouverture de la transition
-  NB_MSG_CMM_RRM            ///< Nombre de message de l'interface
-}
-MSG_CMM_RRM_T ;
-
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction cmm_cx_setup_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct   {
-  L2_ID           Src                     ; //!< L2 source MAC address
-  L2_ID           Dst                     ; //!< L2 destination MAC address
-  QOS_CLASS_T     QoS_class               ; //!< QOS class index
-} cmm_cx_setup_req_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres des fonctions rrm_cx_setup_cnf() et cmm_cx_release_req()
-        dans une structure permettant le passage des parametres via un socket
-*/
-typedef struct   {
-  RB_ID           Rb_id                   ; //!< L2 Rb_id
-} rrm_cx_setup_cnf_t ,
-cmm_cx_release_req_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction cmm_cx_modify_req()
-        dans une structure permettant le passage des parametres via un socket
-*/
-typedef struct   {
-  RB_ID           Rb_id                   ; //!< L2 Rb_id
-  QOS_CLASS_T     QoS_class               ; //!< QOS class index
-} cmm_cx_modify_req_t;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction cmm_cx_release_all_req()
-        dans une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID           L2_id                   ; //!< L2 Rb_id
-} cmm_cx_release_all_req_t;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrci_attach_req()
-        dans une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID           L2_id                   ; //!< Layer 2 (MAC) ID
-  L3_INFO_T       L3_info_t               ; //!< Type of L3 Information
-  unsigned char   L3_info[MAX_L3_INFO]    ; //!< L3 addressing Information
-  RB_ID           DTCH_B_id               ; //!< RBID of broadcast IP service (MR only)
-  RB_ID           DTCH_id                 ; //!< RBID of default IP service (MR only)
-} rrci_attach_req_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_attach_ind()
-        dans une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID           L2_id                   ;  //!< Layer 2 (MAC) ID
-  L3_INFO_T       L3_info_t               ;  //!< Type of L3 Information
-  unsigned char   L3_info[MAX_L3_INFO]    ;  //!< L3 addressing Information
-  RB_ID           DTCH_id                 ;  //!< RBID of default IP service (MR only)
-} rrm_attach_ind_t;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres des fonctions rrm_MR_attach_ind() et router_is_CH_ind()
-        dans une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID           L2_id                   ; //!< MR Layer 2 (MAC) ID
-} rrm_MR_attach_ind_t ,
-router_is_CH_ind_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction cmm_init_ch_req()
-        dans une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L3_INFO_T       L3_info_t               ; //!< Type of L3 Information
-  unsigned char   L3_info[MAX_L3_INFO]    ; //!< L3 addressing Information
-} cmm_init_ch_req_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction cmm_attach_cnf()
-        dans une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID           L2_id;
-  L3_INFO_T       L3_info_t               ; //!< Type of L3 Information
-  unsigned char   L3_info[MAX_L3_INFO]    ; //!< L3 addressing Information
-} cmm_attach_cnf_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction cmm_attach_cnf()
-        dans une structure permettant le passage des parametres via un socket
-*/
-//mod_lor_10_03_12++
-typedef struct {
-  unsigned int     Start_fr;
-  unsigned int     Stop_fr;
-  unsigned int     Meas_band;
-  unsigned int     Meas_tpf;
-  unsigned int     Nb_channels;
-  unsigned int     Overlap;
-  unsigned int     Sampl_freq;
-} cmm_init_sensing_t, cmm_init_coll_sensing_t ;
-//mod_lor_10_03_12++
-
-/*!//add_lor_10_11_03
-*******************************************************************************
-\brief  Definition des parametres de la fonction cmm_cx_setup_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct   {
-  Instance_t      dest                    ; //!< Destination of the message
-  QOS_CLASS_T     QoS_class               ; //!< QOS class index
-} cmm_need_to_tx_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction cmm_init_trans_req()
-        dans une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID           L2_id                   ; //!< Layer 2 (MAC) ID of SU2
-  unsigned int    Session_id              ; //!< Session id
-  QOS_CLASS_T     QoS_class               ; //!< QOS class index
-} cmm_init_trans_req_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_init_trans_conf()
-        dans une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  unsigned int    Session_id              ; //!< Session id
-  CHANNEL_T       all_channel             ; //!< QOS class index
-} rrm_init_trans_conf_t ;
-
-/*!//add_lor_10_11_09
-*******************************************************************************
-\brief  Definition des parametres de la fonction cmm_cx_setup_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct   {
-  Instance_t      dest                    ; //!< Destination of the message
-} cmm_link_disk_t ;
-
-
-
-
-#ifdef TRACE
-extern const char *Str_msg_cmm_rrm[NB_MSG_CMM_RRM] ;
-#endif
-
-/* Rappel : les paramètres sont identiques aux fonctions
- *          (sans le prefixe msg_ ) du fichier: cmm_rrm_interface.h
- */
-msg_t *msg_cmm_cx_setup_req( Instance_t inst, L2_ID Src, L2_ID Dst, QOS_CLASS_T QoS_class,  Transaction_t Trans_id );
-msg_t *msg_rrm_cx_setup_cnf( Instance_t inst, RB_ID Rb_id, Transaction_t Trans_id );
-msg_t *msg_cmm_cx_modify_req( Instance_t inst, RB_ID Rb_id , QOS_CLASS_T QoS_class, Transaction_t Trans_id  );
-msg_t *msg_rrm_cx_modify_cnf( Instance_t inst, Transaction_t Trans_id  );
-msg_t *msg_cmm_cx_release_req( Instance_t inst, RB_ID Rb_id , Transaction_t Trans_id );
-msg_t *msg_rrm_cx_release_cnf( Instance_t inst, Transaction_t Trans_id );
-msg_t *msg_cmm_cx_release_all_req( Instance_t inst, L2_ID L2_id , Transaction_t Trans_id );
-msg_t *msg_rrm_cx_release_all_cnf( Instance_t inst, Transaction_t Trans_id );
-msg_t *msg_rrci_attach_req( Instance_t inst, L2_ID L2_id,  L3_INFO_T L3_info_t, unsigned char *L3_info,
-                            RB_ID DTCH_B_id, RB_ID DTCH_id, Transaction_t Trans_id );
-msg_t *msg_rrm_attach_ind( Instance_t inst, L2_ID L2_id, L3_INFO_T L3_info_t, unsigned char *L3_info, RB_ID DTCH_id  );
-msg_t *msg_cmm_attach_cnf( Instance_t inst, L2_ID L2_id, L3_INFO_T L3_info_t, unsigned char *L3_info,Transaction_t Trans_id );
-msg_t *msg_rrm_MR_attach_ind( Instance_t inst, L2_ID L2_id );
-msg_t *msg_router_is_CH_ind( Instance_t inst, L2_ID L2_id );
-msg_t *msg_rrci_CH_synch_ind( Instance_t inst);
-msg_t *msg_cmm_init_mr_req( Instance_t inst);
-msg_t *msg_rrm_MR_synch_ind(Instance_t inst);
-msg_t *msg_rrm_no_synch_ind( Instance_t inst);
-msg_t *msg_cmm_init_ch_req( Instance_t inst, L3_INFO_T L3_info_t, void *L3_info  );
-msg_t *msg_cmm_init_sensing( Instance_t inst, unsigned int  Start_fr, unsigned int  Stop_fr,unsigned int Meas_band,
-                             unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq ); //mod_lor_10_03_12
-msg_t *msg_cmm_stop_sensing( Instance_t inst);
-msg_t *msg_cmm_ask_freq( Instance_t inst);
-msg_t *msg_cmm_need_to_tx( Instance_t inst, Instance_t dest,QOS_CLASS_T QoS_class);
-msg_t *msg_cmm_init_trans_req( Instance_t inst, L2_ID L2_id , unsigned int Session_id, QOS_CLASS_T QoS_class, Transaction_t Trans_id );
-msg_t *msg_rrm_init_trans_conf( Instance_t inst, unsigned int Session_id, CHANNEL_T all_channel, Transaction_t Trans_id );
-msg_t *msg_cmm_ask_freq( Instance_t inst);
-msg_t *msg_cmm_init_sensing( Instance_t inst, unsigned int  Start_fr, unsigned int  Stop_fr,unsigned int Meas_band,
-                             unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq ); //add_lor_10_11_08
-msg_t *msg_cmm_user_disc( Instance_t inst); //add_lor_10_11_08
-msg_t *msg_cmm_link_disc( Instance_t inst, Instance_t dest); //add_lor_10_11_09
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CMM_MSG_H */
diff --git a/openair3/MESH/RRM/debug.h b/openair3/MESH/RRM/debug.h
deleted file mode 100644
index b895c090f91e85a7d4838c5f85e7e3cb707ee42e..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/debug.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       debug.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-            et des fonctions relatives au debug .
-
-\author     BURLOT Pascal
-
-\date       29/08/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-/*
- *
- *   Si le flag DEBUG est defini, la macro ASSERT() ne fait rien et la
- *   macro CALL() se contente d'appeler la fonction sans tester le code d'erreur.
- */
-
-#ifdef DEBUG
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-///< Check si le retour de fonction est egale à -1  alors abort()
-#define CALL(f) \
-                                                                    \
-  if (((int)(f)) == -1)                                             \
-  {                                                                 \
-    int err = errno;                                                \
-    char *strerr = strerror(err);                                   \
-                                                                    \
-    fprintf(stderr,                                                 \
-            "CALL(%s): Error at line %u, file %s: %s (errno=%d)\n", \
-            #f, __LINE__, __FILE__,                                 \
-            strerr == NULL ? "Bad error number" : strerr,           \
-            err);                                                   \
-    abort();                                                        \
-  }
-
-///< Check si le pointeur est NULL alors abort()
-#define PNULL(pp) \
-                                                                    \
-  if ( (pp) == NULL)                                                \
-  {                                                                 \
-    fprintf(stderr,                                                 \
-            "PNULL(%s): Error at line %u, file %s: null pointer \n",\
-            #pp, __LINE__, __FILE__ );                              \
-    abort();                                                        \
-  }
-
-#define FOPEN(pp,arg)                                               \
-  pp=fopen arg ;                                                    \
-  if ( (pp) == NULL)                                                \
-  {                                                                 \
-    int err = errno;                                                \
-    char *strerr = strerror(err);                                   \
-                                                                    \
-    fprintf(stderr,                                                 \
-            "%s=fopen%s: \n\tError at line %u, file %s: %s (errno=%d)\n",\
-            #pp, #arg, __LINE__, __FILE__ ,                         \
-            strerr == NULL ? "Bad error number" : strerr,           \
-            err);                                                   \
-    abort();                                                        \
-  }
-
-#define DBG_FPRINT(msg)    fprintf msg
-#define DBG_PRINT(msg)     printf msg
-
-#define ASSERT(cc)                                 \
-                                                   \
-  if (!(cc))                                       \
-  {                                                \
-    fprintf(stderr,                                \
-            "ASSERT(%s): at line %u, file %s\n",   \
-            #cc, __LINE__, __FILE__);              \
-    abort();                                       \
-  }
-
-#define WARNING(cc)                                \
-                                                   \
-  if ((cc))                                       \
-  {                                                \
-    fprintf(stderr,                                \
-            "WARNING(%s): at line %u, file %s\n",  \
-            #cc, __LINE__, __FILE__);              \
-  }
-#else
-
-#define CALL(f) (f)
-#define ASSERT(cc)
-#define WARNING(cc)
-#define PNULL(pp)
-#define DBG_FPRINT(msg)
-#define DBG_PRINT(msg)
-#define FOPEN(pp,arg)   pp=fopen arg
-
-#endif
diff --git a/openair3/MESH/RRM/freq_ass_op.c b/openair3/MESH/RRM/freq_ass_op.c
deleted file mode 100755
index 0dc90873018e79bccdaacd42bcf0493100e6722c..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/freq_ass_op.c
+++ /dev/null
@@ -1,969 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       freq_ass_op.c
-
-\brief      Fonctions permettant la gestion des frequences
-
-\author     IACOBELLI Lorenzo
-
-\date       21/10/09
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-      $Id$
-      $Log$
-
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "L3_rrc_interface.h"
-#include "cmm_rrm_interface.h"
-#include "rrm_sock.h"
-#include "rrc_rrm_msg.h"
-#include "sensing_rrm_msg.h"
-#include "ip_msg.h" //mod_lor_10_04_27
-#include "cmm_msg.h"
-#include "msg_mngt.h"
-#include "pusu_msg.h"
-#include "rb_db.h"
-#include "neighbor_db.h"
-#include "sens_db.h"
-#include "channels_db.h"
-#include "rrm_util.h"
-#include "transact.h"
-#include "rrm_constant.h"
-#include "rrm.h"
-#include "freq_ass_op.h"
-
-
-
-
-//! Met un message dans la file des messages a envoyer
-#define PUT_CMM_MSG(m)  put_msg(  &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m ) //mod_lor_10_01_25
-#define PUT_PUSU_MSG(m) put_msg(  &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m) //mod_lor_10_01_25
-#define PUT_RRC_MSG(m)  put_msg(  &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m ) //mod_lor_10_01_25
-#define PUT_IP_MSG(m)   put_msg(  &(rrm->file_send_ip_msg) , 1, rrm->ip.s,m  ) //mod_lor_10_01_25
-
-
-/*!
-*******************************************************************************
-\brief  Comparaison de deux ID de niveau 2
-
-\return si 0 alors les IDs sont identiques
-*/
-static int L2_ID_cmp(
-  L2_ID *L2_id1, ///< ID de niveau 2
-  L2_ID *L2_id2  ///< ID de niveau 2
-)
-{
-  return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ;
-}
-//mod_lor_10_03_19++
-/*!
-*******************************************************************************
-\brief  Function that decides if a channel is free:
-        applyed rule: strict majority
-\return 1 if channel is free, 0 otherwise
-*/
-//mod_eure_lor
-void take_decision(
-  Sens_node_t *SensDB     , //!< pointer to the sensing database
-  unsigned int Ch_id      , //!< channel ID
-  unsigned int *is_free  //mod_lor_10_05_28 ->char instead of int
-
-)
-{
-  Sens_node_t *pSensNode = SensDB;
-  Sens_ch_t *pSensChann;
-  //char is_free = 0;
-  int i;
-
-  while (pSensNode!= NULL) {
-    if((pSensChann = get_chann_info(  pSensNode->info_hd , Ch_id)) != NULL)    {
-      for (i = 0; i<NUM_SB; i++) {
-        if (pSensChann->is_free[i]==1)
-          is_free[i]++;
-        else  if (pSensChann->is_free[i]==0)
-          is_free[i]--;
-      }
-    }
-
-    pSensNode = pSensNode->next;
-  }
-
-  //mod_lor_10_05_07++
-  for (i = 0; i<NUM_SB; i++) {
-    if (is_free[i]>0)
-      is_free[i]=1;
-    else
-      is_free[i]=0;
-  }
-
-  //return pSensChann;
-  /*if (is_free>0)
-      return 1;
-  else
-      return 0;*/
-  //return is_free;
-  //mod_lor_10_05_07--
-
-}
-//mod_lor_10_03_19--
-//mod_lor_10_05_26++
-/*!
-*******************************************************************************
-\brief  Function that decides if a channel is free:
-        applyed rule: strict majority
-\return 0 if operation ended correctly, 1 if info on sensing channel does not exist
-*/
-
-unsigned int take_decision_sens(
-  Sens_node_t *SensDB     , //!< pointer to the sensing database
-  Sens_ch_t *finalSensChann, //!< info that will be returned after decision
-  unsigned int Ch_id       //!< channel ID
-
-)
-{
-  Sens_node_t *pSensNode = SensDB;
-  Sens_ch_t *pSensChann;
-  int i, flag=0;
-
-  for (i = 0; i<NUM_SB; i++) // initialization of is_free vector
-    finalSensChann->is_free[i]=10; //TO DO: to change when is_free becomes char instead of unsigned int
-
-  while (pSensNode!= NULL ) {
-
-    if((pSensChann = get_chann_info(  pSensNode->info_hd , Ch_id)) != NULL) {
-      flag++;
-
-      for (i = 0; i<NUM_SB; i++) {
-        //printf (" ch %d is_free %d\t", i, pSensChann->is_free[i]);//dbg
-        if (pSensChann->is_free[i]==1)
-          finalSensChann->is_free[i]++;
-        else  if (pSensChann->is_free[i]==0)
-          finalSensChann->is_free[i]--;
-      }
-    }
-
-    pSensNode = pSensNode->next;
-  }
-
-  if (flag==0)  // case in which information on the channel requested is not in the database
-    return 1;
-
-  for (i = 0; i<NUM_SB; i++) {
-    if (finalSensChann->is_free[i]>10)
-      finalSensChann->is_free[i]=1;
-    else
-      finalSensChann->is_free[i]=0;
-
-    //printf ("ch %d is_free %d \n", i, finalSensChann->is_free[i]);
-  }
-
-  finalSensChann->Start_f = pSensChann->Start_f;
-  finalSensChann->Final_f = pSensChann->Final_f;
-  finalSensChann->Ch_id   = pSensChann->Ch_id;
-  return 0;
-
-}
-/*!
-*******************************************************************************
-\brief  Function that identify free block of SB_NEEDED_FOR_SN subbands analysing the
-* sensing information present in the sensing database; it saves the available channels
-* in the channels database
-
-\return
-*/
-unsigned int find_available_channels(
-  Sens_node_t *Sens_db,
-  CHANNELS_DB_T **channels_db
-)
-{
-  int sens_ch_id=1, sb, sb_f;
-  unsigned int curr_fr;
-  CHANNEL_T channel;
-  Sens_ch_t curr_sens_ch;
-
-  del_all_channels( channels_db ); //to remove all old entries
-  //printf("channels eliminated\n");//dbg
-  channel.Ch_id = 0;
-  channel.QoS   = 0;
-
-  sb_f = 0;
-
-  // printf("beginning of find_available_channels\n\n\n");//dbg
-  while(take_decision_sens( Sens_db,&curr_sens_ch,sens_ch_id)==0) {
-    //printf("\nsens_ch_id in while :%d found channel id %d\n\n\n", sens_ch_id, curr_sens_ch.Ch_id);//dbg
-    curr_fr = curr_sens_ch.Start_f;
-
-    for (sb=0; sb<NUM_SB; sb++) { //loop over all the subbands of a sensing channel
-      //printf("        sb %d is_free %d", sb, curr_sens_ch.is_free[sb]);//dbg
-      if (curr_sens_ch.is_free[sb]==0) {
-        sb_f = 0;
-        curr_fr+=SB_BANDWIDTH;
-      } else {
-        sb_f++;
-
-        if (sb_f == BG+1)  {
-          //printf("\nFirst free sb : %d start_freq_select %d\n",sb,curr_fr);//dbg
-          channel.Start_f = curr_fr;
-        }
-
-        if (sb_f == SB_NEEDED_FOR_SN+BG)
-          channel.Final_f = curr_fr+SB_BANDWIDTH;
-
-        if (sb_f == (SB_NEEDED_FOR_SN+(2*BG))) {
-          //curr_fr += SB_BANDWIDTH;
-          //printf("last free sb : %d end_freq_select %d\n",sb,channel.Final_f);//dbg
-          channel.Ch_id++;
-          add_chann_db(channels_db,channel,1,0);
-          sb_f = BG; //to avoid to compute two times the BG
-          //printf("added channel %d start %d end %d\n", channel.Ch_id, channel.Start_f, channel.Final_f);//dbg
-        }
-
-        curr_fr+=SB_BANDWIDTH;
-      }
-    }
-
-    sens_ch_id++;
-
-  }
-
-  return (channel.Ch_id); //the last Ch_id memorized in channels database corresponds to the total number of free channels found
-}
-
-
-//mod_lor_10_05_26--
-//mod_lor_10_05_28++
-
-/*!
-*******************************************************************************
-\brief  Function to check if the channels used by SN are still free
-
-\return
-*/
-unsigned int evalaute_sens_info(
-  Sens_node_t *Sens_db,
-  unsigned int Start_f,
-  unsigned int Final_f
-)
-{
-  unsigned int i=0, sb, curr_freq;
-  int is_free[MIN_NB_SB_CH];
-  Sens_node_t *ac_node = Sens_db;
-  Sens_ch_t *ac_chann;
-
-  for (i=0; i<MIN_NB_SB_CH; i++)
-    is_free[i]=0;
-
-  while (ac_node != NULL) {
-    ac_chann = ac_node->info_hd;
-
-    while (ac_chann!= NULL ) {
-      // printf("actual ch_id %d actual start_f %d final_f %d\n",ac_chann->Ch_id, ac_chann->Start_f,ac_chann->Final_f);//dbg
-      if (ac_chann->Start_f < Final_f && ac_chann->Final_f > Start_f) {
-        sb = 0;
-        curr_freq = ac_chann->Start_f;
-
-        while (sb < NUM_SB && curr_freq<Start_f) {
-          sb++;
-          curr_freq+=SB_BANDWIDTH;
-        }
-
-        //printf ("sb after first loop %d curr_fr %d\n", sb, curr_freq);//dbg
-        while (sb < NUM_SB && curr_freq<Final_f) {
-          //  printf ("curr_fr %d\n", curr_freq);//dbg
-          i = (curr_freq - Start_f)/SB_BANDWIDTH;
-
-          //  printf("index for is_free vector %d, freq %d, sb %d\n",i, curr_freq, sb);//dbg
-          if (i >= MIN_NB_SB_CH) {
-            printf("ERROR!\n");
-            return 2;
-          }
-
-          if (ac_chann->is_free[sb]==1)
-            is_free[i]++;
-
-          if (ac_chann->is_free[sb]==0)
-            is_free[i]--;
-
-          sb++;
-          curr_freq+=SB_BANDWIDTH;
-        }
-
-
-      }
-
-      ac_chann=ac_chann->next;
-    }
-
-    ac_node = ac_node->next;
-  }
-
-  for (i=0; i<MIN_NB_SB_CH; i++)
-    if (is_free[i]<=0)
-      return 1;
-
-  return 0;
-
-}
-/*!
-*******************************************************************************
-\brief  Function to check if the channels used by SN are still free
-
-\return
-*/
-unsigned int check_SN_channels(
-  Sens_node_t *Sens_db,
-  CHANNELS_DB_T *channels_db,
-  unsigned int *used_channels,
-  unsigned int nb_used_ch
-
-)
-{
-  int i, need_to_update=0;
-  CHANNELS_DB_T *channel_2_check;
-
-  for (i=0; i<nb_used_ch; i++) {
-    channel_2_check = get_chann_db_info( channels_db  , used_channels[i] );
-
-    //printf("check channel: %d, start_fr: %d, final_f: %d\n",used_channels[i], channel_2_check->channel.Start_f, channel_2_check->channel.Final_f);//dbg
-    if( evalaute_sens_info(Sens_db, channel_2_check->channel.Start_f, channel_2_check->channel.Final_f))
-      need_to_update = 1;
-
-    //printf("need_to_update: %d\n",need_to_update);//dbg
-  }
-
-  return need_to_update;
-
-}
-//mod_lor_10_05_28--
-
-
-/*!
-*******************************************************************************
- \brief CMM frequency query request.  This message has also the scope to
- * initialize the RRM in BTS state.
-*/
-void cmm_ask_freq(
-  Instance_t inst            //!< identification de l'instance
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-  rrm->ip.trans_cnt++ ;
-  PUT_IP_MSG(msg_open_freq_query_4( inst, rrm->L2_id_FC, 0, rrm->ip.trans_cnt));
-  pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-
-
-}
-
-/*!//mod_lor_10_10_28
-*******************************************************************************
- \brief CMM of secondary user ask activate a transmission requirement.
- * In the message it pass its L2_id to be identified by its Cluster Head
-*/
-void cmm_need_to_tx(
-  Instance_t inst             ,//!< identification de l'instance
-  Instance_t dest             ,//!< identification de l'instance du noeud destinataire
-  QOS_CLASS_T QoS_class        //!< Required quality of service (i.e. number of channels)
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  rrm_t *rrm_dest = &rrm_inst[dest];
-  pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-  rrm->ip.trans_cnt++ ;
-  PUT_IP_MSG(msg_ask_freq_to_CH_3( inst, rrm->L2_id, rrm_dest->L2_id, QoS_class, rrm->ip.trans_cnt));
-  pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-}
-
-/*!
-*******************************************************************************
- \brief BTS ask for frequency
-*/
-unsigned int open_freq_query( //mod_lor_10_06_02
-  Instance_t    inst            , //!< identification de l'instance
-  L2_ID         L2_id           , //!< L2_id of the BTS/SU
-  QOS_CLASS_T   QoS             , //!< quality of service required (0 means all available QoS)
-  Transaction_t Trans_id          //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  unsigned int NB_chan=0, ind = 0;
-  CHANNELS_DB_T *pChannels;
-  CHANNELS_DB_T channels_hd[NB_SENS_MAX];
-  //mod_lor_10_05_26++
-  /*pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
-  CHANNELS_DB_T *pChannelsEntry=rrm->rrc.pChannelsEntry;
-  CHANNELS_DB_T *pChannels = pChannelsEntry;
-
-  //fprintf(stdout,"cp3 : NB_free_chan %d\n", NB_free_ch); //dbg
-  //mod_lor_10_05_17++: send vector with all frequencies (not only free ones)
-  CHANNELS_DB_T channels_hd[NB_SENS_MAX];
-  pChannels = pChannelsEntry;
-  while (pChannels!=NULL){//mod_lor_10_03_08
-      memcpy(&(channels_hd[NB_chan]) , pChannels, sizeof(CHANNELS_DB_T));
-      pChannels = pChannels->next;
-      NB_chan++;
-  }
-  //mod_lor_10_05_17--
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
-
-  //fprintf(stdout,"NB_free_chan %d\n", NB_free_ch); //dbg
-  //for (int i = 0; i<NB_free_ch; i++)//dbg
-     // fprintf(stdout,"channel %d meas %f\n", free_channels_hd[i].Ch_id, free_channels_hd[i].meas); //dbg
-
-  //printf("channels in open_freq_query_funct\n");//dbg
-  //for (int i=0; i<NB_chan;i++)//dbg
-  //    printf("  %d  ",channels_hd[i].channel.Ch_id);//dbg
-  //printf("\n");//dbg         */
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  NB_chan = find_available_channels(rrm->rrc.pSensEntry,&(rrm->rrc.pChannelsEntry));
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-  pChannels = rrm->rrc.pChannelsEntry;
-
-  while (pChannels!=NULL) { //mod_lor_10_03_08
-    memcpy(&(channels_hd[ind]) , pChannels, sizeof(CHANNELS_DB_T));
-    //printf ("copied channel: %d start %d end %d\n",channels_hd[ind].channel.Ch_id,channels_hd[ind].channel.Start_f,channels_hd[ind].channel.Final_f);//dbg
-    pChannels = pChannels->next;
-    ind++;
-  }
-
-  if (ind!=NB_chan)
-    printf("Error!!! Found free channels: %d, copyed channels: %d\n",NB_chan, ind);
-
-  //mod_lor_10_05_26--
-  if (Trans_id!=1 || NB_chan!=0) {  //mod_lor_10_06_02
-
-    pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-    rrm->ip.trans_cnt++ ;
-    PUT_IP_MSG(msg_update_open_freq_7( inst, L2_id, NB_chan, channels_hd, rrm->ip.trans_cnt));
-    rrm->ip.waiting_SN_update=1;
-    pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-  }
-
-  return (NB_chan);//mod_lor_10_06_02
-}
-
-/*!
-*******************************************************************************
- \brief RRC open frequency.
- *
-*/
-unsigned int update_open_freq(   //mod_lor_10_05_18
-  Instance_t inst             , //!< identification de l'instance
-  L2_ID L2_id                 , //!< L2_id of the FC/CH
-  unsigned int NB_chan        , //!< Number of channels
-  unsigned int *occ_channels  , //!< vector on wich the selected frequencies will be saved //mod_lor_10_05_18
-  CHANNELS_DB_T *channels     , //!< List of channels
-  Transaction_t Trans_id        //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  unsigned int NB_occ_chan = 0 ;
-  //unsigned int occ_channels[NB_chan];
-  CHANNELS_DB_T *chann_checked;
-  CHANNEL_T ass_channels[NB_chan];
-  //printf("In update_open_freq: NB_chan: %d\n",NB_chan);
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
-  del_all_channels( &(rrm->rrc.pChannelsEntry) ) ; //mod_lor_10_06_01
-
-  for (int i=0; i<NB_chan; i++) {
-    //mod_lor_10_05_17++
-    // fprintf(stderr, "update channel : %d that is %d\n",channels[i].channel.Ch_id, channels[i].is_free);//dbg
-    chann_checked = up_chann_db( &(rrm->rrc.pChannelsEntry), channels[i].channel, channels[i].is_free, 0);
-
-    if(chann_checked == NULL) //info_time still to evaluate
-      fprintf(stderr, "error in updating free channels in BTS \n");
-
-    /* else if (chann_checked->is_ass && !(chann_checked->is_free)){
-         fprintf(stderr, "  -> Channel %d in use not free anymore! \n",channels[i].channel.Ch_id);
-         chann_checked->is_ass = 0;
-     }else if (chann_checked->is_ass && chann_checked->is_free){
-         ass_channels[NB_occ_chan]=chann_checked->channel;
-         occ_channels[NB_occ_chan]=chann_checked->channel.Ch_id ;
-         NB_occ_chan++;
-     }*/
-  }
-
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
-
-  while (NB_occ_chan<CH_NEEDED_FOR_SN) {
-    chann_checked=select_new_channel( rrm->rrc.pChannelsEntry, rrm->L2_id, rrm->L2_id);
-
-    if (chann_checked == NULL) {
-      //fprintf(stderr, "Channel is null \n"); //dbg
-      break;
-    }
-
-    ass_channels[NB_occ_chan]=chann_checked->channel;
-    occ_channels[NB_occ_chan]=chann_checked->channel.Ch_id ;
-    NB_occ_chan++;
-  }
-
-
-
-  /*fprintf(stderr, "Channels for SN selected by BTS: \n"); //dbg
-  for (int i=0; i<NB_occ_chan;i++)//dbg
-      fprintf(stderr, "   %d   ", occ_channels[i]);//dbg
-  fprintf(stderr, "\n");//dbg*/
-
-  //mod_lor_10_05_17--
-
-
-  pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-  rrm->ip.trans_cnt++ ;
-  PUT_IP_MSG(msg_update_SN_occ_freq_5( inst, rrm->L2_id, NB_occ_chan, occ_channels, rrm->ip.trans_cnt));
-  pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-
-  //AAA: BTS sends a vector containing the channels that have to be used by secondary users
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  //printf("In update_open_freq: NB_chan passed: %d\n",NB_occ_chan);
-  PUT_RRC_MSG(msg_rrm_up_freq_ass( inst, rrm->L2_id,  NB_occ_chan, ass_channels));
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-  return (NB_occ_chan);//mod_lor_10_05_18
-}
-
-/*!
-\brief RRC update secondary network frequencies in use  (SENDORA first scenario)
- */
-unsigned int update_SN_occ_freq( //mod_lor_10_05_18
-  Instance_t inst             , //!< instance ID
-  L2_ID L2_id                 , //!< Layer 2 (MAC) ID of BTS
-  unsigned int NB_chan        , //!< number of channels used by secondary network
-  unsigned int *occ_channels  , //!< channels used by secondary network
-  Transaction_t Trans_id        //!< Transaction ID
-)
-
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  pthread_mutex_lock( &( rrm->ip.exclu ) ) ;  //mod_lor_10_05_18
-  rrm->ip.waiting_SN_update=0;                //mod_lor_10_05_18
-  pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;//mod_lor_10_05_18
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
-  CHANNELS_DB_T *pChannelsEntry=rrm->rrc.pChannelsEntry;
-  CHANNELS_DB_T *pChannels;
-  unsigned int need_to_update = 0;
-
-  //Sens_node_t *nodes_db = rrm->rrc.pSensEntry;
-  //fprintf(stderr,"update_SN_occ_freq  %d \n", inst);//dbg
-  //for (pChannels = rrm->rrc.pChannelsEntry; pChannels!=NULL; pChannels=pChannels->next)//dbg
-  //    fprintf(stderr,"channel   %d  in db\n", pChannels->channel.Ch_id);//dbg
-  for (int i=0; i<NB_chan ; i++) { //&& !need_to_update
-    //mod_lor_10_05_28++
-    //fprintf(stderr,"occ_channels  %d  val %d\n", i,occ_channels[i]);//dbg
-    need_to_update = check_SN_channels(rrm->rrc.pSensEntry,rrm->rrc.pChannelsEntry,occ_channels,NB_chan);
-
-    if (need_to_update==0) {
-      pChannels = up_chann_ass( pChannelsEntry  , occ_channels[i], 1, L2_id, L2_id );
-
-      if (pChannels==NULL)
-        printf ("ERROR! Channel not updated\n");
-    }
-
-    //mod_lor_10_05_28--
-
-  }
-
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
-
-  return (need_to_update); //mod_lor_10_05_17
-
-}
-
-/*!//add_lor_10_10_28
-*******************************************************************************
- \brief User ask for frequency
- * it checks available channels to attribute channels to users. It sends an
- * update message to users with attributed channels
-*/
-unsigned int ask_freq_to_CH(
-  Instance_t    inst                   , //!< identification de l'instance
-  L2_ID         L2_id[NB_SENS_MAX]     , //!< L2_id of the SU
-  L2_ID         L2_id_dest[NB_SENS_MAX], //!< L2_id of the SU dest
-  unsigned int  N_users                , //!< quality of service required (i.e. number of channels required)
-  Transaction_t Trans_id                 //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  unsigned int NB_chan=0, ind = 0, act_us=0;
-  CHANNELS_DB_T *pChannels;
-  CHANNEL_T ass_channels[NB_SENS_MAX];
-  L2_ID source_L2_id[NB_SENS_MAX];
-  L2_ID dest_L2_id[NB_SENS_MAX];
-
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-
-  ///Identify the number of available channels
-  if (rrm->rrc.pChannelsEntry==NULL)  {
-    NB_chan = find_available_channels(rrm->rrc.pSensEntry,&(rrm->rrc.pChannelsEntry));
-    printf ("found channels: %d \n", NB_chan);//dbg
-  }
-
-  ///Analysing the list of identified channels
-  pChannels = rrm->rrc.pChannelsEntry;
-
-  while (pChannels!=NULL) {
-    if (pChannels->is_free && !pChannels->is_ass && act_us<N_users) {
-      memcpy(&(ass_channels[ind]) , &(pChannels->channel), sizeof(CHANNEL_T));
-      pChannels = up_chann_ass( rrm->rrc.pChannelsEntry  , ass_channels[ind].Ch_id, 1, L2_id[act_us], L2_id_dest[act_us] );
-      //printf ("copied channel: %d start %d end %d\n",ass_channels[ind].Ch_id,ass_channels[ind].Start_f,ass_channels[ind].Final_f);//dbg
-      memcpy(source_L2_id[ind].L2_id , L2_id[act_us].L2_id, sizeof(L2_ID));
-      memcpy(dest_L2_id[ind].L2_id , L2_id_dest[act_us].L2_id, sizeof(L2_ID));
-      ind++;
-      act_us++;
-    } else if (pChannels->is_free && pChannels->is_ass) {
-      memcpy(&(ass_channels[ind]) , &(pChannels->channel), sizeof(CHANNEL_T));
-      memcpy(source_L2_id[ind].L2_id , pChannels->source_id.L2_id, sizeof(L2_ID));
-      memcpy(dest_L2_id[ind].L2_id , pChannels->dest_id.L2_id, sizeof(L2_ID));
-      ind++;
-    }
-
-    pChannels = pChannels->next;
-  }
-
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-
-  //printf ( "ind: %d\n",ind);//dbg
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  rrm->rrc.trans_cnt++ ;
-  //PUT_RRC_MSG(msg_rrm_up_freq_ass( inst, source_L2_id[0], 1, ass_channels));//dbg
-  PUT_RRC_MSG(msg_rrm_up_freq_ass_sec( inst, source_L2_id, dest_L2_id, ind, ass_channels));
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-  //else
-  //  printf ("Error! not enough free channels");
-  if (act_us==N_users)
-    return (0);
-  else {
-    printf ("Not enough free channels. Link not allocated\n");
-    return (N_users-act_us);
-  }
-
-}
-
-
-/*!//add_lor_10_11_03
-*******************************************************************************
-\brief  Function that prepare information in CH_coll to send to fusion center:
-        is_free depends on the number of information and it is a number between
-        0 and 10 that indicates the probability of busy channel
-\return 0 if operation ended correctly, 1 if info on sensing channel does not exist
-*/
-
-unsigned int take_ch_coll_decision(
-  Sens_node_t *SensDB     , //!< pointer to the sensing database
-  Sens_ch_t *finalSensChann, //!< info that will be returned after decision
-  unsigned int Ch_id       //!< channel ID
-
-)
-{
-  Sens_node_t *pSensNode = SensDB;
-  Sens_ch_t *pSensChann;
-  int i, flag=0;
-
-  for (i = 0; i<NUM_SB; i++) // initialization of is_free vector
-    finalSensChann->is_free[i]=0;
-
-  while (pSensNode!= NULL ) {
-
-    if((pSensChann = get_chann_info(  pSensNode->info_hd , Ch_id)) != NULL) {
-      flag++;
-
-      for (i = 0; i<NUM_SB; i++) {
-        //printf (" ch %d is_free %d", i, pSensChann->is_free[i]);
-        if (pSensChann->is_free[i]==1)
-          finalSensChann->is_free[i]+=10;
-      }
-    }
-
-    pSensNode = pSensNode->next;
-  }
-
-  if (flag==0)  // case in which information on the channel requested is not in the database
-    return 1;
-
-  for (i = 0; i<NUM_SB; i++) {
-    finalSensChann->is_free[i]=finalSensChann->is_free[i]/flag;
-
-    ///AAA: to change when using weights for collaborating sensing
-    if (finalSensChann->is_free[i]>5)
-      finalSensChann->is_free[i]=1;
-    else
-      finalSensChann->is_free[i]=0;
-
-    // printf ("ch %d is_free %d \n", i, finalSensChann->is_free[i]);
-  }
-
-  finalSensChann->Start_f = pSensChann->Start_f;
-  finalSensChann->Final_f = pSensChann->Final_f;
-  finalSensChann->Ch_id   = pSensChann->Ch_id;
-  return 0;
-
-}
-
-
-/*!add_lor_10_11_09
-*******************************************************************************
- \brief CMM user disconnect. Request to disconnect the user.
- * Sending message to CH in order to stop all communications related to this user
- * (also stop sensing activity of the user)
-*/
-void cmm_user_disc(
-  Instance_t inst            //!< identification de l'instance
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-  rrm->ip.trans_cnt++ ;
-  PUT_IP_MSG(msg_user_disconnect_9( inst, rrm->L2_id, rrm->ip.trans_cnt));
-  pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-
-
-}
-
-/*!add_lor_10_11_09
-*******************************************************************************
- \brief CMM user disconnect. Request to disconnect the user.
- * Sending message to CH in order to stop all communications related to this user
- * (also stop sensing activity of the user)
-*/
-void cmm_link_disc(
-  Instance_t inst           ,//!< identification de l'instance
-  Instance_t dest            //!< identification du destinataire
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  rrm_t *rrm_dest = &rrm_inst[dest] ;
-
-  pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-  rrm->ip.trans_cnt++ ;
-  PUT_IP_MSG(msg_close_link( inst, rrm->L2_id, rrm_dest->L2_id, rrm->ip.trans_cnt));
-  pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-
-
-}
-
-/*!add_lor_10_11_09
-*******************************************************************************
- \brief disconnect user. Ch removes all communications of the user
-*/
-void disconnect_user(
-  Instance_t    inst     , //!< identification de l'instance
-  L2_ID         L2_id      //!< L2_id of the SU
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  CHANNELS_DB_T *pChannels;
-  L2_ID User_active_L2_id[MAX_USER_NB];
-  L2_ID User_dest_L2_id[MAX_USER_NB];
-  int i, new_free = 0;
-  int chan_up = 0;
-  int all_result;
-
-  ///remove waiting communications
-  pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-  printf ("T1 tot waiting before: %d\n",rrm->ip.users_waiting_update);//dbg
-
-  for(i = 0; i < rrm->ip.users_waiting_update; i++) {
-    if (  L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][0]))==0 || L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][1]) )==0 ) {
-      if (i < rrm->ip.users_waiting_update-1) {///check if there are still waiting communications to consider
-        memcpy(rrm->ip.L2_id_wait_users[i][0].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID));
-        memcpy(rrm->ip.L2_id_wait_users[i][1].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID));
-        i--;
-      }
-
-      rrm->ip.users_waiting_update--;
-      printf ("N1 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
-    }
-  }
-
-  printf ("T2 tot waiting after: %d\n",rrm->ip.users_waiting_update);//dbg
-
-  ///remove active communications
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  pChannels = rrm->rrc.pChannelsEntry;
-
-  while (pChannels!=NULL) {
-    if (pChannels->is_ass && ( L2_ID_cmp(&L2_id, &(pChannels->source_id))==0 || L2_ID_cmp(&L2_id, &(pChannels->dest_id) )==0 )) {
-      pChannels->is_ass = 0;
-      new_free++;
-      //printf ("T3 removed channel: %d\n",pChannels->channel.Ch_id);//dbg
-    }
-
-    pChannels=pChannels->next;
-  }
-
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-  printf("[CH %d]: Communications of user ",rrm->id);
-
-  for ( i=0; i<8; i++)
-    printf("%02X", L2_id.L2_id[i]);
-
-  printf( " removed\n");
-
-  ///sending update
-  while (rrm->ip.users_waiting_update > 0 && new_free>0) {
-    memcpy(User_active_L2_id[chan_up].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID));
-    memcpy(User_dest_L2_id[chan_up].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID));
-    chan_up++;
-    new_free--;
-    rrm->ip.users_waiting_update--;
-    printf ("N2 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
-  }
-
-  //  printf ("New_free: %d\n",new_free);//dbg
-  all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,chan_up, 0 );  ///Update of channels
-
-  if (all_result != 0)
-    printf ("Error in reassigning free channels new_free: %d all_result: %d\n",new_free, all_result);//dbg
-
-  pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-}
-
-/*!add_lor_10_11_09
-*******************************************************************************
- \brief close link. Ch removes an active (or waiting link)
-*/
-int close_active_link(
-  Instance_t    inst       , //!< identification de l'instance
-  L2_ID         L2_id      , //!< L2_id of the SU
-  L2_ID         L2_id_dest   //!< L2_id of the SU dest
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  CHANNELS_DB_T *pChannels;
-  int i, new_free = 0;
-  int all_result;
-  int removed = 0;
-
-  ///check waiting communications
-  pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-  printf ("T1 tot waiting before: %d\n",rrm->ip.users_waiting_update);//dbg
-
-  for(i = 0; i < rrm->ip.users_waiting_update && removed == 0; i++) {
-    if (  (L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][0]))==0 && L2_ID_cmp(&L2_id_dest, &(rrm->ip.L2_id_wait_users[i][1]) )==0 ) || (L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][1]))==0
-          && L2_ID_cmp(&L2_id_dest, &(rrm->ip.L2_id_wait_users[i][0]) )==0 )) {
-      removed = 1;
-
-      if (i < rrm->ip.users_waiting_update-1) {///check if there are still waiting communications to consider
-        memcpy(rrm->ip.L2_id_wait_users[i][0].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID));
-        memcpy(rrm->ip.L2_id_wait_users[i][1].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID));
-        i--;
-      }
-
-      rrm->ip.users_waiting_update--;
-      printf ("T1bis tot waiting inside: %d\n",rrm->ip.users_waiting_update);//dbg
-    }
-  }
-
-  printf ("T2 tot waiting after: %d removed %d\n",rrm->ip.users_waiting_update, removed);//dbg
-  pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-
-
-  ///check active communications
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  pChannels = rrm->rrc.pChannelsEntry;
-
-  while (removed == 0 && pChannels!=NULL) {
-    if (pChannels->is_ass && ( (L2_ID_cmp(&L2_id, &(pChannels->source_id))==0
-                                && L2_ID_cmp(&L2_id_dest, &(pChannels->dest_id) )==0 ) /*|| (L2_ID_cmp(&L2_id, &(pChannels->dest_id))==0 && L2_ID_cmp(&L2_id_dest, &(pChannels->source_id) )==0 )*/)) { //mod_lor_07_12_10
-      pChannels->is_ass = 0;
-      new_free++;
-      removed = 1;
-      printf ("T3 removed channel: %d\n",pChannels->channel.Ch_id);//dbg
-    }
-
-    pChannels=pChannels->next;
-  }
-
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-  ///link does not exist
-  if (removed == 0) {
-    printf("[CH %d]: Requested link to remove does not exist.\n ",rrm->id);
-    return 1;
-  }
-
-  printf("[CH %d]: Link between ",rrm->id);
-
-  for ( i=0; i<8; i++)
-    printf("%02X", L2_id.L2_id[i]);
-
-  printf( " and ");
-
-  for ( i=0; i<8; i++)
-    printf("%02X", L2_id_dest.L2_id[i]);
-
-  printf( " removed\n");
-
-  ///sending update only if channel removed among active links
-  if (new_free>0 && removed) {
-    pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-    printf ("New_free: %d\n",new_free);//dbg
-    //rrm->ip.users_waiting_update--; //mod_lor_10_12_09
-    printf ("N3 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
-
-    if(rrm->ip.users_waiting_update>0)//mod_lor_10_12_09
-      all_result = ask_freq_to_CH( inst, &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0]), &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1]), 1, 0 );  ///Update of channels
-    else//mod_lor_10_12_09
-      all_result = ask_freq_to_CH( inst, &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0]), &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1]), 0,
-                                   0 );  ///Update of channels//mod_lor_10_12_09
-
-    if (all_result != 0)
-      printf ("Error in reassigning free channels new_free: %d all_result: %d\n",new_free, all_result);//dbg
-
-    pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-  }
-
-  return 0;
-}
diff --git a/openair3/MESH/RRM/freq_ass_op.h b/openair3/MESH/RRM/freq_ass_op.h
deleted file mode 100755
index 78d0b1bd65574683b2ae5127b5c8da2c3034bea7..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/freq_ass_op.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file     freq_ass_op.h
-
-\brief    Fichier d'entete contenant les declarations des types, des defines ,
-      et des fonctions relatives a la gestion des frequences.
-
-\author   IACOBELLI Lorenzo
-
-\date     21/10/09
-
-
-\par     Historique:
-      $Author$  $Date$  $Revision$
-      $Id$
-      $Log$
-
-*******************************************************************************
-*/
-
-#ifndef FREQ_ASS_OP_H
-#define FREQ_ASS_OP_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//mod_lor_10_05_28: declaration of function for sensing and frequency allocation
-unsigned int evalaute_sens_info(
-  Sens_node_t *Sens_db,
-  unsigned int Start_f,
-  unsigned int Final_f
-);
-
-void take_decision(
-  Sens_node_t *SensDB     , //!< pointer to the sensing database
-  unsigned int Ch_id      , //!< channel ID
-  unsigned int *is_free  //mod_lor_10_05_28 ->char instead of int
-
-);
-
-unsigned int take_decision_sens(
-  Sens_node_t *SensDB     , //!< pointer to the sensing database
-  Sens_ch_t *finalSensChann, //!< info that will be returned after decision
-  unsigned int Ch_id       //!< channel ID
-
-);
-
-unsigned int find_available_channels(
-  Sens_node_t *Sens_db,
-  CHANNELS_DB_T **channels_db
-);
-
-unsigned int check_SN_channels(
-  Sens_node_t *Sens_db,
-  CHANNELS_DB_T *channels_db,
-  unsigned int *used_channels,
-  unsigned int nb_used_ch
-);
-
-void take_local_decision(
-  Sens_ch_t *Sens_info
-);
-
-unsigned int take_ch_coll_decision(
-  Sens_node_t *SensDB     , //!< pointer to the sensing database
-  Sens_ch_t *finalSensChann, //!< info that will be returned after decision
-  unsigned int Ch_id       //!< channel ID
-);
-
-void disconnect_user(
-  Instance_t    inst     , //!< identification de l'instance
-  L2_ID         L2_id      //!< L2_id of the SU
-);
-
-
-// ---------------------------------------------------------------------------
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* FREQ_ASS_OP_H */
diff --git a/openair3/MESH/RRM/ip_msg.c b/openair3/MESH/RRM/ip_msg.c
deleted file mode 100644
index 4749068edaa9e80f49c5ae53ad79b4759e61b5b7..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/ip_msg.c
+++ /dev/null
@@ -1,524 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       ip_msg.c
-
-\brief      Fonctions permettant le formattage des donnees pour l'envoi d'un
-            message sur le socket entre le  RRC et le RRM
-
-\author     IACOBELLI Lorenzo
-
-\date       27/04/10
-
-
-\par     Historique:
-
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include "L3_rrc_defs.h"
-#include "rrm_sock.h"
-#include "L3_rrc_interface.h"
-#include "ip_msg.h"
-#include "rrm_util.h"
-
-#ifdef TRACE
-//! Macro creant la chaine a partir du nom de la variable
-#define STRINGIZER(x) #x
-//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
-const char *Str_msg_ip[NB_MSG_IP] = {
-  STRINGIZER(UPDATE_SENS_RESULTS_3    ),
-  STRINGIZER(OPEN_FREQ_QUERY_4        ),
-  STRINGIZER(UPDATE_OPEN_FREQ_7       ),
-  STRINGIZER(UPDATE_SN_OCC_FREQ_5     ),
-  STRINGIZER(INIT_COLL_SENS_REQ       ),
-  STRINGIZER(STOP_COLL_SENS           ),
-  STRINGIZER(UP_CLUST_SENS_RESULTS    ),
-  STRINGIZER(STOP_COLL_SENS_CONF      ),
-  STRINGIZER(ASK_FREQ_TO_CH_3         ),
-  STRINGIZER(USER_DISCONNECT_9        ),
-  STRINGIZER(CLOSE_LINK               )/*,
-    STRINGIZER(RRC_CLUST_SCAN_REQ       ),
-    STRINGIZER(RRM_CLUST_SCAN_CONF      ),
-    STRINGIZER(RRM_CLUST_MON_REQ        ),
-    STRINGIZER(RRC_CLUST_MON_REQ        ),
-    STRINGIZER(RRM_CLUST_MON_CONF       ),
-    STRINGIZER(RRM_END_SCAN_CONF        ),
-    STRINGIZER(RRM_INIT_CONN_REQ        ),
-    STRINGIZER(RRC_INIT_CONN_CONF       ),
-    STRINGIZER(RRM_FREQ_ALL_PROP        ),
-    STRINGIZER(RRC_FREQ_ALL_PROP_CONF   ),
-    STRINGIZER(RRM_REP_FREQ_ALL         ),
-    STRINGIZER(RRC_REP_FREQ_ACK         ),
-    STRINGIZER(RRC_INIT_CONN_REQ        ),
-    STRINGIZER(RRM_CONN_SET             ),
-    STRINGIZER(RRC_FREQ_ALL_PROP        ),
-    STRINGIZER(RRM_FREQ_ALL_PROP_CONF   ),
-    STRINGIZER(RRC_REP_FREQ_ALL         ),
-    STRINGIZER(RRM_REP_FREQ_ACK         )  */
-
-} ;
-#endif
-
-
-/*!
-*******************************************************************************
-\brief  This function initialize the message header
-\return any return value
-*/
-static void init_ip_msg_head(
-  msg_head_t    *msg_head , //!< message header to initialize
-  Instance_t     inst     , //!< Instance ID
-  MSG_IP_T  msg_type , //!< type of message to initialize
-  unsigned int   size     , //!< size of message
-  Transaction_t  Trans_id   //!< transaction id associated to this message
-)
-{
-  if ( msg_head != NULL ) {
-    msg_head->start    = START_MSG ;
-    msg_head->msg_type = 0xFF & msg_type ;
-    msg_head->inst     = inst  ;
-    msg_head->Trans_id = Trans_id  ;
-    msg_head->size     = size;
-  }
-}
-
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        update_sens_results().
-\return message formate
-*/
-
-msg_t *msg_update_sens_results_3(
-  Instance_t inst,
-  L2_ID L2_id,                //!< FC L2_id
-  unsigned int NB_info,
-  Sens_ch_t *Sens_meas,
-  Transaction_t Trans_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof( rrm_update_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ; //mod_lor_10_04_23
-
-    rrm_update_sens_t *p = RRM_CALLOC2(rrm_update_sens_t , size ) ;
-
-    if ( p != NULL ) {
-      //fprintf(stderr,"rrmUSR 1 \n");//dbg
-      init_ip_msg_head(&(msg->head),inst, UPDATE_SENS_RESULTS_3, size ,Trans_id);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-      p->NB_info       = NB_info    ;
-      p->info_time     = 0 ;
-
-      if ( NB_info > 0 ) {
-        memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) )  ;
-      }
-
-      //fprintf(stdout,"msg_rrm_update_sens()2 : NB_chan %d\n", p->NB_info);//dbg
-      //fprintf(stdout,"NB_chan %d\n", p->NB_info);
-      //  for (int i=0; i<NB_info; i++)
-      // Sens_ch_t *ch = p->Sens_meas; ch!=NULL; ch=ch->next)
-      //fprintf(stdout,"channel in msg arr: %d\n", ch->Ch_id); //dbg
-
-    }
-
-    //fprintf(stderr,"rrmUSR end \n");//dbg
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        open_freq_query_4().
-\return message formate
-*/
-msg_t *msg_open_freq_query_4(
-  Instance_t    inst,
-  L2_ID         L2_id           ,
-  QOS_CLASS_T   QoS             ,
-  Transaction_t Trans_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    open_freq_query_t *p = RRM_CALLOC(open_freq_query_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_ip_msg_head(&(msg->head),inst,OPEN_FREQ_QUERY_4, sizeof( open_freq_query_t ) ,Trans_id);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      p->QoS = QoS;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        ask_freq_to_CH_3().
-\return message formate
-*/
-msg_t *msg_ask_freq_to_CH_3(
-  Instance_t    inst,
-  L2_ID         L2_id           ,
-  L2_ID         L2_id_dest      ,
-  QOS_CLASS_T   QoS             ,
-  Transaction_t Trans_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    ask_freq_to_CH_t *p = RRM_CALLOC(ask_freq_to_CH_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_ip_msg_head(&(msg->head),inst,ASK_FREQ_TO_CH_3, sizeof( ask_freq_to_CH_t ) ,Trans_id);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      memcpy( p->L2_id_dest.L2_id, L2_id_dest.L2_id, sizeof(L2_ID) )  ;
-      p->QoS = QoS;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_open_freq().
-\return message formate
-*/
-msg_t *msg_update_open_freq_7(
-  Instance_t    inst,
-  L2_ID         L2_id           ,
-  unsigned int NB_ch,
-  CHANNELS_DB_T *channels, //mod_lor_10_05_17
-  Transaction_t Trans_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof( update_open_freq_t );// + (NB_free_ch-1) * sizeof(CHANNEL_T) ;//mod_lor_10_04_23
-
-    update_open_freq_t *p = RRM_CALLOC2(update_open_freq_t , size ) ;
-
-    if ( p != NULL ) {
-      init_ip_msg_head(&(msg->head),inst,UPDATE_OPEN_FREQ_7, size ,Trans_id);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      p->NB_chan       = NB_ch    ;
-
-      if ( NB_ch > 0 ) {
-        memcpy( p->channels , channels, NB_ch * sizeof(CHANNELS_DB_T) )  ;
-      }
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_update_SN_freq().
-\return message formate
-*/
-
-msg_t *msg_update_SN_occ_freq_5(
-  Instance_t inst             , //!< instance ID
-  L2_ID L2_id                 , //!< Layer 2 (MAC) ID of FC
-  unsigned int NB_chan        ,
-  unsigned int *occ_channels      ,
-  Transaction_t Trans_id        //!< Transaction ID
-)
-
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-  //fprintf(stdout,"rrc_end_scan_ord() cp1\n"); //dbg
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof( update_SN_occ_freq_t );// + (NB_chan-1) * sizeof(unsigned int) ;//mod_lor_10_04_23
-    update_SN_occ_freq_t *p = RRM_CALLOC2(update_SN_occ_freq_t , size ) ;
-
-    if ( p != NULL ) {
-
-
-      init_ip_msg_head(&(msg->head),inst,UPDATE_SN_OCC_FREQ_5, size,Trans_id);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-
-      p->NB_chan = NB_chan;
-
-      if ( NB_chan != 0 ) {
-
-        memcpy( p->occ_channels, occ_channels, NB_chan*sizeof(unsigned int) );
-
-      }
-
-
-    }
-
-    msg->data = (char *) p ;
-
-  }
-
-  return msg ;
-}
-
-//mod_lor_10_05_05++
-/*!
-*******************************************************************************
-\brief  Message to be sent to a CH that will collaborate in sensing operation.
-\return message formate
-*/
-msg_t *msg_init_coll_sens_req(
-  Instance_t       inst,        //!< instance ID of asking CH
-  L2_ID L2_id                 , //!< Layer 2 (MAC) ID of asking CH
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq,
-  Transaction_t    Trans_id        //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    init_coll_sens_req_t *p = RRM_CALLOC(init_coll_sens_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_ip_msg_head(&(msg->head),inst, INIT_COLL_SENS_REQ, sizeof( init_coll_sens_req_t) ,0);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      p->Start_fr     = Start_fr;
-      p->Stop_fr      = Stop_fr;
-      p->Meas_band    = Meas_band;
-      p->Meas_tpf     = Meas_tpf;
-      p->Nb_channels  = Nb_channels;
-      p->Overlap      = Overlap;
-      p->Sampl_freq   = Sampl_freq;
-
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-//mod_lor_10_05_05--
-//mod_lor_10_05_06++
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_stop_sensing.
-\return message formate
-*/
-msg_t *msg_stop_coll_sens(
-  Instance_t inst        //!< identification de l'instance
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
-
-  if ( msg != NULL ) {
-    init_ip_msg_head(&(msg->head),inst,STOP_COLL_SENS, 0 ,0);
-    msg->data = NULL ;
-  }
-
-  return msg  ;
-}
-//mod_lor_10_05_06--
-//mod_lor_10_05_12++
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        cmm_stop_sensing.
-\return message formate
-*/
-msg_t *msg_stop_coll_sens_conf(
-  Instance_t inst,        //!< identification de l'instance
-  L2_ID L2_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
-
-  if ( msg != NULL ) {
-    stop_coll_sens_conf_t *p = RRM_CALLOC(stop_coll_sens_conf_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_ip_msg_head(&(msg->head),inst,STOP_COLL_SENS_CONF, sizeof( stop_coll_sens_conf_t) ,0);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg  ;
-}
-//mod_lor_10_05_12--
-
-//mod_lor_10_05_07++
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        up_clust_sens_results().
-\return message formate
-*/
-
-msg_t *msg_up_clust_sens_results(
-  Instance_t inst,
-  L2_ID L2_id,                //!< FC L2_id
-  unsigned int NB_info,
-  unsigned int info_value,
-  Sens_ch_t *Sens_meas,
-  Transaction_t Trans_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof( update_coll_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ; //mod_lor_10_04_23
-
-    update_coll_sens_t *p = RRM_CALLOC2(update_coll_sens_t , size ) ;
-
-    if ( p != NULL ) {
-      init_ip_msg_head(&(msg->head),inst, UP_CLUST_SENS_RESULTS, size ,Trans_id);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-      p->NB_info       = NB_info    ;
-      p->info_time     = 0 ;
-      p->info_value    = info_value;
-
-      if ( NB_info > 0 ) {
-        memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) )  ;
-      }
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-
-}
-
-//mod_lor_10_05_07--
-
-/*!add_lor_10_11_09
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        user_disconnect.
-\return message formate
-*/
-msg_t *msg_user_disconnect_9(
-  Instance_t inst,        //!< identification de l'instance
-  L2_ID L2_id,            //!< L2_id of the user that wants to disconnect
-  Transaction_t Trans_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
-
-  if ( msg != NULL ) {
-    user_disconnect_t *p = RRM_CALLOC(user_disconnect_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_ip_msg_head(&(msg->head),inst,USER_DISCONNECT_9, sizeof( user_disconnect_t) ,Trans_id);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg  ;
-
-}
-
-/*!add_lor_10_11_09
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        user_disconnect.
-\return message formate
-*/
-msg_t *msg_close_link(
-  Instance_t inst,        //!< identification de l'instance
-  L2_ID L2_id,            //!< L2_id of the user that wants to stop the link
-  L2_ID L2_id_dest,       //!< L2_id of the destination
-  Transaction_t Trans_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
-
-  if ( msg != NULL ) {
-    close_link_t *p = RRM_CALLOC(close_link_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_ip_msg_head(&(msg->head),inst,CLOSE_LINK, sizeof( close_link_t) ,Trans_id);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      memcpy( p->L2_id_dest.L2_id, L2_id_dest.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg  ;
-
-}
diff --git a/openair3/MESH/RRM/ip_msg.h b/openair3/MESH/RRM/ip_msg.h
deleted file mode 100644
index 5fd11e8a04b94ef141684c592b0f47e1e7b37cd4..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/ip_msg.h
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       ip_msg.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-            et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI.
-
-            Les fonctions servent à créer le buffer de message, remplir
-            l'entete et copier les parametres de fonction. Chaque fonction
-            retourne le message qui pourra être envoye sur le socket entre le
-            CMM et le RRM ou RRCI.
-
-\author     IACOBELLI Lorenzo
-
-\date       27/04/10
-
-\par     Historique:
-
-
-*******************************************************************************
-*/
-#ifndef __IP_MSG_H
-#define __IP_MSG_H
-
-#include "L3_rrc_defs.h"
-#include "COMMON/mac_rrc_primitives.h"
-
-
-#ifdef OPENAIR2_IN
-#include "rrm_sock.h"
-#else
-#include "RRC/MESH/rrc_rrm_interface.h"
-#endif
-//#include "../../../openair2/RRC/MESH/rrc_rrm_interface.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*!
-*******************************************************************************
-\brief  Enumeration des messages entre RRM/RRCI et le RRC
-*/
-typedef enum {
-  UPDATE_SENS_RESULTS_3       , ///< Message IP       : update to send to CH/FC //mod_lor_10_01_25
-  OPEN_FREQ_QUERY_4           , ///< Message IP       : BTS to ask free frequencies to FC
-  UPDATE_OPEN_FREQ_7          , ///< Message IP       : list of frequencies usable by the secondary network
-  UPDATE_SN_OCC_FREQ_5        , ///< Message IP       : BTS sends used freq. to FC
-  INIT_COLL_SENS_REQ          , ///< Message IP       : CH1 sends request to start collaboration to CH2
-  STOP_COLL_SENS              , ///< Message IP       : CH1 sends order to stop collaboration to CH2
-  UP_CLUST_SENS_RESULTS       , ///< Message IP       : update to send to CH from CH_COLL
-  STOP_COLL_SENS_CONF         , ///< Message IP       : CH2 sends confirmationof stop collaboration to CH1
-  ASK_FREQ_TO_CH_3            , ///< Message IP       : user that wants to transmits ask channels to CH
-  USER_DISCONNECT_9           , ///< Message IP       : user wants to disconnect
-  CLOSE_LINK                  , ///< Message IP       : user wants to stop a link
-  /*STOP_COLL_SENS             , ///< Message RRC->RRM : in FC/CH to report a frequency query
-  RRM_OPEN_FREQ               , ///< Message RRM->RRC : FC communicates open frequencies
-  RRM_UPDATE_SN_FREQ          , ///< Message RRM->RRC : BTS sends used freq. to FC
-  RRC_UPDATE_SN_FREQ          , ///< Message RRC->RRM : FC receives used freq. from BTS
-  RRM_CLUST_SCAN_REQ          , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the sensing process
-  RRC_CLUST_SCAN_REQ          , ///< Message RRC->RRM : CH2 receive request to collaborate for the sensing process from CH1
-  RRM_CLUST_SCAN_CONF         , ///< Message RRM->RRC : CH2 confirmrs the beginning of a collaboration process
-  RRM_CLUST_MON_REQ           , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the monitoring process
-  RRC_CLUST_MON_REQ           , ///< Message RRC->RRM : CH2 receive request to collaborate for the monitoring process from CH1
-  RRM_CLUST_MON_CONF          , ///< Message RRM->RRC : CH2 confirmrs the beginning of a monitoring process
-  RRM_END_SCAN_CONF           , ///< Message RRM->RRC : CH2 confirmrs the end of the collaborative sensing process at CH1
-  RRM_INIT_CONN_REQ           , ///< Message RRM->RRC : SU 1 requests a connection to SU 2
-  RRC_INIT_CONN_CONF          , ///< Message RRM->RRC : Confirm from SU2 about the requested connection
-  RRM_FREQ_ALL_PROP           , ///< Message RRM->RRC : SU1 sends a proposition of teh frequencies to use
-  RRC_FREQ_ALL_PROP_CONF      , ///< Message RRC->RRM : SU1 receives a confirm on the usable channels
-  RRM_REP_FREQ_ALL            , ///< Message RRM->RRC : SU1 reports to CH the possible channels
-  RRC_REP_FREQ_ACK            , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs
-  RRC_INIT_CONN_REQ           , ///< Message RRC->RRM : Request from SU1 to establish a connection
-  RRM_CONN_SET                , ///< Message RRC->RRM : Response to SU1 and connection settings communicated to rcc
-  RRC_FREQ_ALL_PROP           , ///< Message RRC->RRM : SU1 proposition of frequencies to use
-  RRM_FREQ_ALL_PROP_CONF      , ///< Message RRC->RRM : SU2 choise of frequencies to use
-  RRC_REP_FREQ_ALL            , ///< Message RRM->RRC : SU1 reports to CH the possible channels
-  RRM_REP_FREQ_ACK            , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs
-  */NB_MSG_IP                   ///< Nombre de message RRM-RRC
-
-}
-MSG_IP_T ;
-
-//mod_lor_10_05_05++
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction init_coll_sens_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID      L2_id              ; //!< Layer 2 (MAC) ID of Fusion Centre
-  unsigned int     Start_fr;      //!< Lowest frequency considered (MHz)
-  unsigned int     Stop_fr;       //!< Highest frequency considered (MHz)
-  unsigned int     Meas_band;     //!< Measurement bandwidth (KHz)
-  unsigned int     Meas_tpf;      //!< Measurement time per sub-band
-  unsigned int     Nb_channels;   //!< Number of sub-bands
-  unsigned int     Overlap;       //!< Overlap factor (%)
-  unsigned int     Sampl_freq;    //!< Sampling frequency (Ms/s)
-} init_coll_sens_req_t;
-//mod_lor_10_05_05--
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de les fonctions
-        rrm_update_sens()dans une structure permettant le passage
-        des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id                  ; //!< Layer 2 ID (MAC) of sensing node
-  unsigned int        NB_info                ; //!< Number of sensed channels
-  Sens_ch_t           Sens_meas[NB_SENS_MAX] ; //!< Sensing information
-  double              info_time              ; //!< Data of the information
-} rrm_update_sens_t ;
-
-//mod_lor_10_05_07++
-/*!
-*******************************************************************************
-\brief  Definition des parametres de les fonctions
-        rrm_update_sens()dans une structure permettant le passage
-        des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id                  ; //!< Layer 2 ID (MAC) of sensing node
-  unsigned int        NB_info                ; //!< Number of sensed channels
-  unsigned int        info_value             ; //!< value assigned to information
-  Sens_ch_t           Sens_meas[NB_SENS_MAX] ; //!< Sensing information
-  double              info_time              ; //!< Data of the information
-} update_coll_sens_t ;
-//mod_lor_10_05_07--
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de les fonctions rrm_ask_for_freq() et rrc_ask_for_freq()dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID      L2_id              ; //!< Layer 2 (MAC) ID of Fusion Centre
-  QOS_CLASS_T      QoS          ; //!< QoS required; if 0 all QoS at disposition
-} open_freq_query_t;
-
-/*! //mod_lor_10_10_29
-*******************************************************************************
-\brief  Definition des parametres de les fonctions rrm_ask_freq_to_CH() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID      L2_id              ; //!< Layer 2 (MAC) ID of source user
-  L2_ID      L2_id_dest         ; //!< Layer 2 (MAC) ID of destination user
-  QOS_CLASS_T      QoS          ; //!< QoS required; it corresponds to the mumber of channels required
-} ask_freq_to_CH_t;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de les fonctions
-        rrc_open_freq() et rrm_open_freq() dans une structure permettant le passage
-        des parametres via un socket
-*/
-typedef struct {
-  double              date;
-  L2_ID               L2_id                  ; //!< Layer 2 ID (MAC) of FC/CH
-  unsigned int        NB_chan                ; //!< number of channels
-  CHANNELS_DB_T       channels[NB_SENS_MAX]; //!< description of channelS
-} update_open_freq_t;
-
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres des fonctions rrm_update_SN_freq() et
-        rrm_update_SN_freq()dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id                ; //!< Layer 2 (MAC) ID of FC/BTS
-  unsigned int        NB_chan              ; //!< Number of channels
-  unsigned int        occ_channels[NB_SENS_MAX]; //!< Vector of channels
-} update_SN_occ_freq_t;
-
-/*!
-*******************************************************************************
-\brief
-*/
-typedef struct {
-  L2_ID               L2_id                ; //!< Layer 2 (MAC) ID
-} stop_coll_sens_conf_t, user_disconnect_t; //add_lor_10_11_09
-
-/*! //add_lor_10_11_09
-*******************************************************************************
-\brief
-*/
-typedef struct {
-  L2_ID               L2_id                ; //!< Layer 2 (MAC) ID
-  L2_ID               L2_id_dest           ; //!< Layer 2 (MAC) ID of dest
-} close_link_t;
-
-#ifdef TRACE
-extern const char *Str_msg_ip[NB_MSG_IP] ;
-#endif
-
-/* Rappel : les paramètres sont identiques aux fonctions
- *          (sans le prefixe msg_ ) du fichier: L3_rrc_interface.h
- */
-
-
-///MESSAGES VIA IP
-msg_t *msg_update_sens_results_3( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, Sens_ch_t *Sens_meas, Transaction_t Trans_id );
-msg_t *msg_open_freq_query_4( Instance_t inst, L2_ID L2_id, QOS_CLASS_T QoS, Transaction_t Trans_id );
-msg_t *msg_update_open_freq_7( Instance_t inst, L2_ID L2_id, unsigned int NB_ch, CHANNELS_DB_T *channels, Transaction_t Trans_id);
-msg_t *msg_update_SN_occ_freq_5( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, unsigned int *occ_channels, Transaction_t Trans_id);
-msg_t *msg_init_coll_sens_req( Instance_t inst, L2_ID L2_id, unsigned int  Start_fr, unsigned int  Stop_fr,unsigned int Meas_band,
-                               unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq, Transaction_t Trans_id ); //mod_lor_10_05_05
-msg_t *msg_stop_coll_sens( Instance_t inst);//mod_lor_10_05_06
-msg_t *msg_up_clust_sens_results( Instance_t inst, L2_ID L2_id, unsigned int NB_info,
-                                  unsigned int info_value, Sens_ch_t *Sens_meas, Transaction_t Trans_id ); //mod_lor_10_05_07
-msg_t *msg_stop_coll_sens_conf( Instance_t inst, L2_ID L2_id);//mod_lor_10_05_12
-msg_t *msg_ask_freq_to_CH_3( Instance_t inst, L2_ID L2_id, L2_ID L2_id_dest, QOS_CLASS_T QoS, Transaction_t Trans_id );//mod_lor_10_10_28
-msg_t *msg_user_disconnect_9( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id); //add_lor_10_11_09
-msg_t *msg_close_link( Instance_t inst, L2_ID L2_id, L2_ID L2_id_dest, Transaction_t Trans_id); //add_lor_10_11_09
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RRC_MSG_H */
diff --git a/openair3/MESH/RRM/mr_attach.c b/openair3/MESH/RRM/mr_attach.c
deleted file mode 100644
index 4ef9c6130ed4e76d1617783331e8130803a89ba5..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/mr_attach.c
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       mr_attach.c
-
-\brief      Fonctions permettant la gestion de l'attachement d'un Mesh Router
-            a un cluster.
-
-\author     BURLOT Pascal
-
-\date       29/08/08
-
-
-\par     Historique:
-        P.BURLOT 2009-01-20
-            + separation de la file de message CMM/RRM a envoyer en 2 files
-              distinctes ( file_send_cmm_msg, file_send_rrc_msg)
-        L.IACOBELLI 2009-10-19
-            + inclusions
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "L3_rrc_interface.h"
-#include "cmm_rrm_interface.h"
-#include "rrm_sock.h"
-#include "rrc_rrm_msg.h"
-#include "cmm_msg.h"
-#include "pusu_msg.h"
-#include "msg_mngt.h"
-#include "rb_db.h"
-#include "neighbor_db.h"
-#include "sens_db.h"
-#include "channels_db.h"
-#include "rrm_util.h"
-#include "transact.h"
-#include "rrm_constant.h"
-#include "rrm.h"
-#include "mr_attach.h"
-
-
-//! Met un message dans la file des messages a envoyer
-#define PUT_CMM_MSG(m)  put_msg(  &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m )  //mod_lor_10_01_25
-#define PUT_PUSU_MSG(m) put_msg(  &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m)  //mod_lor_10_01_25
-#define PUT_RRC_MSG(m)  put_msg(  &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m )  //mod_lor_10_01_25
-
-/*!
-*******************************************************************************
-\brief MR attachement indication. Sent by RRC to RRM to indicate the MAC ID of
-       a new MR attached to CH at layer 2
-*/
-void rrc_MR_attach_ind(
-  Instance_t inst  , //!< Identification de l'instance
-  L2_ID      L2_id   //!< Layer 2 (MAC) ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( (rrm->state == CLUSTERHEAD_INIT1 )|| (rrm->state == CLUSTERHEAD )) {
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    add_neighbor( &(rrm->rrc.pNeighborEntry), &L2_id ) ;
-    rrm->rrc.trans_cnt++ ;
-    //fprintf(stderr,"item_trans in RRM_SENSING_MEAS_REQ=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg
-    add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_SENSING_MEAS_REQ,0,NO_PARENT );
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-    PUT_RRC_MSG( msg_rrm_sensing_meas_req( inst, L2_id ,Sensing_meas_desc, rrm->rrc.trans_cnt));
-
-    PUT_CMM_MSG( msg_rrm_MR_attach_ind(inst,L2_id ));
-  } else
-    fprintf(stderr,"[RRM] RRC_MR_ATTACH_IND  is not allowed (Only CH):etat=%d\n",rrm->state);
-
-}
-
-/*!
-*******************************************************************************
-\brief RRC response to sensing_meas_req
-*/
-void rrc_sensing_meas_resp(
-  Instance_t    inst     , //!< Identification de l'instance
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( (rrm->state == CLUSTERHEAD_INIT1 )|| (rrm->state == CLUSTERHEAD ) ) {
-    //fprintf(stderr, "[RRM] RRC_SENSING_MEAS_RESP  is not coded %s %d \n",__FILE__ , __LINE__ );
-
-    transact_t *pTransact ;
-
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ;
-
-    if ( pTransact == NULL ) {
-      fprintf(stderr,"[RRM] rrc_sensing_meas_resp (%d) unknown transaction\n",Trans_id);
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-    } else {
-      del_item_transact( &(rrm->rrc.transaction),Trans_id ) ;
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-    }
-  } else
-    fprintf(stderr,"[RRM] RRC_SENSING_MEAS_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
-}
-
-/*!
-*******************************************************************************
-\brief RRC Connection Establishment indication.  Message received by RRM in CH
-        at completion of attachment phase of a new MR (after configuration MR IPAddr).
-        Here L3_info contains MR IPAddr. Message received by RRCI in MR after
-        configuration of initial RBs and reception of CH IPAddr.  Here L3_info
-        contains CH IPAddr.  For MR the RBID's of basic IP services are also required.
-*/
-void rrc_cx_establish_ind(
-  Instance_t     inst      , //!< Identification de l'instance
-  L2_ID          L2_id     , //!< Layer 2 (MAC) ID
-  Transaction_t  Trans_id  , //!< Transaction ID
-  unsigned char *L3_info   , //!< Optional L3 Information
-  L3_INFO_T      L3_info_t , //!< Type of L3 Information
-  RB_ID          DTCH_B_id , //!< RBID of broadcast IP service (MR only)
-  RB_ID          DTCH_id     //!< RBID of default IP service (MR only)
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  //fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) :status=%d\n",Trans_id,rrm->state);
-
-  if ( (rrm->state == CLUSTERHEAD) ) {
-    //fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) :status=CH %d\n",Trans_id,rrm->state);
-    PUT_CMM_MSG( msg_rrm_attach_ind(inst,L2_id,L3_info_t,L3_info, 0 )) ;
-  } else if ( rrm->state == MESHROUTER ) {
-    fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) :status=MR %d\n",Trans_id,rrm->state);
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    //fprintf(stderr,"item_trans in RRC_CX_ESTABLISH_IND=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg
-    add_item_transact( &(rrm->rrc.transaction), Trans_id,INT_RRC,RRC_CX_ESTABLISH_IND,0,NO_PARENT);
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-    pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
-    rrm->cmm.trans_cnt++ ;
-    //fprintf(stderr,"item_trans in RRCI_ATTACH_REQ=%d node %d\n",rrm->cmm.trans_cnt,rrm->id);//dbg
-    add_item_transact( &(rrm->cmm.transaction), rrm->cmm.trans_cnt,INT_CMM,RRCI_ATTACH_REQ,Trans_id,PARENT);
-    pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-
-    PUT_CMM_MSG( msg_rrci_attach_req(inst,L2_id,L3_info_t,L3_info, DTCH_B_id, DTCH_id ,rrm->cmm.trans_cnt)) ;
-  } else
-    fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) is not allowed (Only CH):status=%d\n",Trans_id,rrm->state);
-
-}
-/*!
-*******************************************************************************
-\brief Clusterhead PHY-Synch Indication
- */
-void rrc_phy_synch_to_CH_ind(
-  Instance_t   inst     , //!< Identification de l'instance
-  unsigned int Ch_index , //!< Clusterhead index
-  L2_ID        L2_id
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( (rrm->state == ISOLATEDNODE)  || (rrm->state == MESHROUTER) ) {
-    rrm->state = MESHROUTER ;
-
-    /* Memorisation du L2_id du noeud ( c'est le niveau RRC qui a l'info ) */
-    memcpy( &rrm->L2_id,  &L2_id, sizeof(L2_ID));
-
-    PUT_RRC_MSG(
-      msg_rrci_init_mr_req( inst,
-                            rrm->rrc.trans_cnt,
-                            &Lchan_desc[QOS_SRB0],
-                            &Lchan_desc[QOS_SRB1],
-                            Ch_index)
-    );
-
-
-  } else
-    fprintf(stderr,"[RRM] RRC_PHY_SYNCH_TO_CH_IND is not allowed (Only IN):etat=%d\n",rrm->state);
-}
-
-/*!
-*******************************************************************************
-\brief L3 Connection Attachment confirmation.  Message sent by CMM in MR at
-       completion of L3 attachment phase of a new MR Here L3_info contains
-       MR IPAddr.
-*/
-void cmm_attach_cnf(
-  Instance_t     inst      , //!< Identification de l'instance
-  L2_ID          L2_id     , //!< L2_id of CH ( Mesh Router can see 2 CH )
-  L3_INFO_T      L3_info_t , //!< Type of L3 Information
-  unsigned char *L3_info   , //!< L3 addressing Information
-  Transaction_t  Trans_id    //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( rrm->state == MESHROUTER ) {
-    transact_t *pTransact ;
-
-    pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
-    pTransact = get_item_transact(rrm->cmm.transaction,Trans_id ) ;
-
-    if ( pTransact == NULL ) {
-      fprintf(stderr,"[RRM] CMM_ATTACH_CNF (%d): unknown transaction\n",Trans_id);
-      pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-    } else {
-      unsigned int parent_id     = pTransact->parent_id ;
-      unsigned int status_parent = pTransact->parent_status ;
-
-      del_item_transact( &(rrm->cmm.transaction),Trans_id ) ;
-      pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-
-      if ( status_parent ) {
-        transact_t *pTransactParent ;
-
-        pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-        pTransactParent =get_item_transact(rrm->rrc.transaction,parent_id ) ;
-
-        if ( pTransactParent != NULL ) {
-          rrm->L3_info_t = L3_info_t; //mod_lor_10_01_25
-          memcpy (&(rrm->L3_info), L3_info, L3_info_t); //mod_lor_10_01_25
-          PUT_RRC_MSG( msg_rrci_cx_establish_resp(inst,pTransactParent->id,L2_id,L3_info,L3_info_t ));
-          del_item_transact( &(rrm->rrc.transaction),pTransactParent->id ) ;
-        } else // la transaction parent est inconnue, on ne fait rien
-          fprintf(stderr,"[RRM] CMM_ATTACH_CNF (%d) : the parent transaction (%d) is unknown\n",Trans_id,parent_id);
-
-        pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-      }
-    }
-  } else
-    fprintf(stderr,"[RRM] CMM_ATTACH_CNF (%d) is not allowed (Only MR):etat=%d\n",Trans_id,rrm->state);
-}
-/*!
-*******************************************************************************
-\brief RRC sensing measurement indication
-*/
-void rrc_sensing_meas_ind(
-  Instance_t      inst         , //!< Identification de l'instance
-  L2_ID           L2_id        , //!< Layer 2 ID (MAC) of sensing node
-  unsigned int    NB_meas      , //!< Number of measurements
-  SENSING_MEAS_T *Sensing_meas , //!< Sensing Information
-  Transaction_t   Trans_id       //!< Transaction ID
-)
-{
-  int i ;
-
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( (rrm->state == CLUSTERHEAD) ) {
-    pthread_mutex_lock(   &( rrm->rrc.exclu )  ) ;
-
-    // update database of neighbor
-    set_Sensing_meas_neighbor( rrm->rrc.pNeighborEntry, &L2_id , NB_meas, Sensing_meas );
-
-    pthread_mutex_unlock( &( rrm->rrc.exclu )  ) ;
-    // send the response to rrc
-    PUT_RRC_MSG( msg_rrm_sensing_meas_resp(inst,Trans_id) );
-
-    for (  i = 0 ; i< NB_meas ; i++) {
-      pthread_mutex_lock( &( rrm->pusu.exclu ) ) ;
-      rrm->pusu.trans_cnt++ ;
-      add_item_transact( &(rrm->pusu.transaction), rrm->pusu.trans_cnt,INT_PUSU,RRM_SENSING_INFO_IND,0,NO_PARENT);
-      pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ;
-
-      PUT_PUSU_MSG( msg_rrm_sensing_info_ind(inst, L2_id,Sensing_meas[i].L2_id, Sensing_meas[i].Rssi, rrm->pusu.trans_cnt ) ) ;
-    }
-
-  } else
-    fprintf(stderr,"[RRM] RRC_SENSING_MEAS_IND is not allowed (Only CH):etat=%d\n",rrm->state);
-}
-
-
-
diff --git a/openair3/MESH/RRM/mr_attach.h b/openair3/MESH/RRM/mr_attach.h
deleted file mode 100644
index 3dcdd16007ed49d4ff1185828ce2402414e34c27..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/mr_attach.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file     mr_attach.h
-
-\brief    Fichier d'entete contenant les declarations des types, des defines ,
-      et des fonctions relatives a la gestion de l'attachement d'un Mesh
-      Router a un cluster.
-
-\author   BURLOT Pascal
-
-\date     29/08/08
-
-
-\par     Historique:
-      $Author$  $Date$  $Revision$
-      $Id$
-      $Log$
-
-*******************************************************************************
-*/
-
-#ifndef MR_ATTACH_H
-#define MR_ATTACH_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// ---------------------------------------------------------------------------
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* MR_ATTACH_H */
diff --git a/openair3/MESH/RRM/msg_mngt.c b/openair3/MESH/RRM/msg_mngt.c
deleted file mode 100644
index 6d90e9bd304ca46440604138d82909d229196b20..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/msg_mngt.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       msg_mngt.c
-
-\brief      Gestion de l'envoi et la reception de message.
-
-\author     BURLOT Pascal
-
-\date       17/07/08
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "rrm_util.h"
-#include "rrm_sock.h"
-#include "msg_mngt.h"
-
-//! Selection locale du mode de debug
-#define DBG_MSG_MNGT 0
-
-#if DBG_MSG_MNGT==0
-//! Macro inactive
-#define PRINT_MSG_MNGT(...)
-#else
-//! Macro affichant  la file de message
-#define PRINT_MSG_MNGT(...) print_msg_mngt( __VA_ARGS__ )
-#endif
-
-/*!
-*******************************************************************************
-\brief  La fonction affiche a l'ecran la liste des messages
-
-\return  aucune valeur retournee
-*/
-static void print_msg_mngt( file_msg_t *pEntry , int id )
-{
-  file_msg_t *pCurrentItem = pEntry;
-
-  fprintf(stderr,"file_msg_t(%d)=[\n", id);
-
-  while ( pCurrentItem != NULL) {
-    fprintf(stderr,"  @%p(.s=%p, .msg=%p, .next=%p)\n", pCurrentItem, pCurrentItem->s,
-            pCurrentItem->msg, pCurrentItem->next);
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  fprintf(stderr," ]\n");
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction initialise  la file des messages.
-
-\return aucune valeur.
-*/
-void init_file_msg(
-  file_head_t *file_hd , ///< descripteur de la file des messages
-  int  id                ///< file id
-)
-{
-  pthread_mutex_init( &( file_hd->mutex ), NULL ) ;
-
-  file_hd->id   = id;
-  file_hd->file = NULL ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction ajoute un element en debut de la file des messages.
-
-\return  retourne le pointeur le nouvel element de la liste.
-*/
-file_msg_t *put_msg(
-  file_head_t *file_hd ,  ///< descripteur de la file des messages
-  //mod_lor_10_01_25
-  int s_type            , ///< socket type: 0 -> unix; 1 -> internet
-  //sock_rrm_t *s,          ///< socket associe au message
-  void *s ,               ///< socket associe au message
-
-  msg_t *msg              ///< le message a ajouter dans la liste
-)
-{
-  file_msg_t *pOldEntry = file_hd->file;
-
-  file_msg_t *pNewItem = RRM_MALLOC( file_msg_t , 1 ) ;
-
-  if ( pNewItem == NULL )
-    return NULL ;
-
-  //fprintf(stderr,"put_msg 1 \n");//dbg
-  CALL(pthread_mutex_lock( &(file_hd->mutex) ));
-
-  file_hd->file       = pNewItem          ;
-  pNewItem->next      = pOldEntry         ;
-  //mod_lor_10_01_25++
-  pNewItem->s_type    = s_type            ;
-
-  //fprintf(stderr,"put_msg 2 \n");//dbg
-  if (s_type) {
-    pNewItem->s     = NULL              ;
-    pNewItem->s_int = s                 ;
-  } else {
-    pNewItem->s     = s                 ;
-    pNewItem->s_int = NULL              ;
-  }
-
-  //mod_lor_10_01_25--
-  pNewItem->msg       = msg               ;
-
-  //fprintf(stderr,"put_msg 3 \n");//dbg
-  PRINT_MSG_MNGT( file_hd->file , file_hd->id );
-
-  //fprintf(stderr,"put_msg 4 \n");//dbg
-  CALL(pthread_mutex_unlock( &(file_hd->mutex) ));
-
-  //fprintf(stderr,"put_msg end \n");//dbg
-  return pNewItem ;
-}
-
-/*!
-*******************************************************************************
-\brief   La fonction retire le dernier element de la file des messages.
-
-\return  retourne le pointeur sur l'element enleve de la liste.
-*/
-file_msg_t *get_msg(
-  file_head_t *file_hd ///< descripteur de la file des messages
-)
-{
-  file_msg_t *pCurrentItem = file_hd->file ;
-  file_msg_t *pNextItem   ;
-  file_msg_t **ppPrevItem  = &(file_hd->file) ;
-
-  if ( (pCurrentItem == NULL)  )
-    return NULL ;
-
-  CALL(pthread_mutex_lock( &(file_hd->mutex) ));
-
-  while ( pCurrentItem != NULL ) {
-
-    pNextItem = pCurrentItem->next ;
-
-    if ( pNextItem == NULL ) {
-      /* Dernier element */
-      *ppPrevItem = NULL ;
-      break ;
-    }
-
-    ppPrevItem   = &(pCurrentItem->next) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  PRINT_MSG_MNGT( file_hd->file , file_hd->id );
-  PRINT_MSG_MNGT( pCurrentItem , file_hd->id *-1 );
-
-  CALL(pthread_mutex_unlock( &(file_hd->mutex) ));
-  return pCurrentItem ;
-}
-
diff --git a/openair3/MESH/RRM/msg_mngt.h b/openair3/MESH/RRM/msg_mngt.h
deleted file mode 100644
index 2d9b8ab31882910b959eed36d1494ba16af2f9d5..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/msg_mngt.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file     msg_mngt.h
-
-\brief    Fichier d'entete contenant les declarations des types, des defines ,
-      et des fonctions relatives a la gestion de l'envoi et la reception
-      de message.
-
-\author   BURLOT Pascal
-
-\date     17/07/08
-
-\par     Historique:
-      $Author$  $Date$  $Revision$
-      $Id$
-      $Log$
-
-*******************************************************************************
-*/
-
-#ifndef MSG_MNGT_H
-#define MSG_MNGT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*!
-*******************************************************************************
-\brief File des messages reçus ou a envoyer
-*/
-typedef struct msg_file_s {
-  //mod_lor_10_01_25
-  int s_type                  ; /// socket type: 0 -> unix; 1 -> internet
-  sock_rrm_t      *s    ; ///< socket origine ou destinataire si unix
-  sock_rrm_int_t      *s_int  ; ///< socket origine ou destinataire si internet
-
-  msg_t         *msg  ; ///< data of message
-  struct msg_file_s   *next ; ///< next message of file
-} file_msg_t ;
-
-/*!
-*******************************************************************************
-\brief Entete de la file des messages reçus ou a envoyer
-*/
-typedef struct {
-  int            id   ; ///< id
-  pthread_mutex_t      mutex  ; ///< Mutex associee
-  file_msg_t          *file   ; ///< point d'entree sur la file des messages
-} file_head_t ;
-
-/*
-*******************************************************************************
-*/
-void init_file_msg( file_head_t *file_hd , int id ) ;
-file_msg_t *put_msg( file_head_t *file_hd , int s_type, void *s, msg_t *msg) ; //mod_lor_10_01_25
-file_msg_t *get_msg( file_head_t *file_hd  ) ;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* MSG_MNGT_H */
diff --git a/openair3/MESH/RRM/neighbor_db.c b/openair3/MESH/RRM/neighbor_db.c
deleted file mode 100644
index 75f0a3459b44179df12b7fdc59586fb7da5379dc..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/neighbor_db.c
+++ /dev/null
@@ -1,485 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       neighbor_db.c
-
-\brief      Fonctions permettant la gestion de la base de donnée sur le voisinage
-            directe (1 saut) du cluster head et indirecte a 2 sauts.
-
-\author     BURLOT Pascal
-
-\date       29/08/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "rrm_sock.h"
-#include "rrc_rrm_msg.h"
-#include "rrm_util.h"
-#include "neighbor_db.h"
-
-//! Selection locale du mode de debug
-#define DBG_NEIGHBOR_DB 0
-
-#if DBG_NEIGHBOR_DB==0
-//! Macro inactive
-#define PRINT_NEIGHBOR_DB(...)
-#else
-//! Macro affichant  la liste du voisnage d'un cluster
-#define PRINT_NEIGHBOR_DB(...) print_neighbor_db( __VA_ARGS__ )
-#endif
-
-/*!
-*******************************************************************************
-\brief  Comparaison de deux ID de niveau 2
-
-\return si 0 alors les IDs sont identiques
-*/
-static int L2_ID_cmp(
-  L2_ID *L2_id1, ///< ID de niveau 2
-  L2_ID *L2_id2  ///< ID de niveau 2
-)
-{
-  return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction affiche a l'ecran la liste (pour DEBUG )
-
-\return  aucune valeur retournee
-*/
-static void print_neighbor_db(
-  neighbor_desc_t *pEntry ///< pointeur sur le debut de liste
-)
-{
-  unsigned int i , j ;
-  neighbor_desc_t *pCurrentItem = pEntry;
-
-  fprintf(stderr,"neighbor list=[\n");
-
-  while ( pCurrentItem != NULL) {
-    fprintf(stderr,"  @%p(.L2_id=", pCurrentItem );
-
-    for ( i=0; i<8; i++)
-      fprintf(stderr,"%02X", pCurrentItem->L2_id.L2_id[i]);
-
-    fprintf(stderr,", .NB_neighbor=%u, .Sensing_meas=%p, .next=%p)\n",
-            pCurrentItem->NB_neighbor, pCurrentItem->Sensing_meas,pCurrentItem->next );
-
-    if ( pCurrentItem->Sensing_meas != NULL )
-      for ( j=0; j<pCurrentItem->NB_neighbor; j++) {
-        fprintf(stderr,"\tNeighbor(%d):.L2_id=",j);
-
-        for ( i=0; i<8; i++)
-          fprintf(stderr,"%02X", pCurrentItem->Sensing_meas[j].L2_id.L2_id[i]);
-
-        fprintf(stderr," .RSSI=%02X\n", pCurrentItem->Sensing_meas[j].Rssi);
-      }
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  fprintf(stderr," ]\n");
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction ajoute un voisin dans la liste des voisins du Cluster head.
-
-\return  retourne la valeur du nouvel element
-*/
-neighbor_desc_t *add_neighbor(
-  neighbor_desc_t **neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage
-  L2_ID *L2_id                      ///< ID du nouveau noeud
-)
-{
-  neighbor_desc_t *pNewItem = get_neighbor( *neighbor_entry, L2_id );
-
-  if ( pNewItem == NULL ) {
-    // If not Exist then create a new item
-    neighbor_desc_t *pOldEntry = *neighbor_entry;
-
-    pNewItem = RRM_MALLOC(neighbor_desc_t , 1 ) ;
-
-    PNULL(pNewItem) ;
-
-    if ( pNewItem == NULL )
-      return NULL ;
-
-    memcpy( pNewItem->L2_id.L2_id , L2_id->L2_id, sizeof(L2_ID) ) ;
-    //pNewItem->RSSI      =  0   ;
-    pNewItem->NB_neighbor =  0   ;
-    pNewItem->Sensing_meas=  NULL;
-
-    *neighbor_entry     =  pNewItem ;
-    pNewItem->next      =  pOldEntry;
-  }
-
-  PRINT_NEIGHBOR_DB( *neighbor_entry );
-  return pNewItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction retire un element de la liste des voisins
-
-\return  aucune valeur.
-*/
-void del_neighbor(
-  neighbor_desc_t **neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage
-  L2_ID            *L2_id           ///< ID niveau 2 du voisin a detruire
-)
-{
-  neighbor_desc_t *pCurrentItem = *neighbor_entry;
-  neighbor_desc_t *pNextItem  ;
-  neighbor_desc_t **ppPrevItem  = neighbor_entry ;
-
-  if ( (pCurrentItem == NULL)  || (neighbor_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-
-    if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) {
-      *ppPrevItem = pNextItem;
-
-      RRM_FREE( pCurrentItem->Sensing_meas) ;
-      RRM_FREE( pCurrentItem ) ;
-      break ;
-    }
-
-    ppPrevItem   = &(pCurrentItem->next) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  PRINT_NEIGHBOR_DB( *neighbor_entry );
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction detruit entierement la liste des voisins
-
-\return aucune valeur.
-*/
-void del_all_neighbor(
-  neighbor_desc_t **neighbor_entry ///< pointeur sur l'entree de la liste de voisinage
-)
-{
-  neighbor_desc_t *pCurrentItem = *neighbor_entry;
-  neighbor_desc_t *pNextItem  ;
-
-  if ( (pCurrentItem == NULL)  || (neighbor_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-
-    RRM_FREE( pCurrentItem->Sensing_meas ) ;
-    RRM_FREE( pCurrentItem ) ;
-
-    pCurrentItem = pNextItem ;
-  }
-
-  *neighbor_entry = NULL ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction recherche les informations de voisinage d'un noeud
-
-\return descripteur sur les infos de voisinage du noeud ou NULL
-*/
-neighbor_desc_t *get_neighbor(
-  neighbor_desc_t *neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage
-  L2_ID *L2_id                     ///< ID du noeud
-)
-{
-  neighbor_desc_t *pCurrentItem = neighbor_entry;
-
-  while ( pCurrentItem != NULL) {
-    if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 )
-      break ;
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  return pCurrentItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction met a jour les informations de mesure de voisinage d'un noeud
-
-\return aucune valeur
-*/
-void set_Sensing_meas_neighbor(
-  neighbor_desc_t *neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage
-  L2_ID           *L2_id         , ///< ID du noeud
-  unsigned int     nb_meas       , ///< Nombre de mesure associe au noeud
-  SENSING_MEAS_T *sensing_meas     ///< Mesures de voisinage
-)
-{
-  neighbor_desc_t *pCurrentItem = neighbor_entry;
-
-  while ( pCurrentItem != NULL) {
-    if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) {
-      pCurrentItem->NB_neighbor = 0 ;
-
-      RRM_FREE(pCurrentItem->Sensing_meas );
-
-      if (  nb_meas > 0 ) {
-        SENSING_MEAS_T *p   = RRM_MALLOC(SENSING_MEAS_T, nb_meas ) ;
-
-        if ( p != NULL ) {
-          int size = nb_meas * sizeof(SENSING_MEAS_T) ;
-          memcpy( p,sensing_meas , size );
-          pCurrentItem->NB_neighbor  = nb_meas ;
-          pCurrentItem->Sensing_meas = p ;
-        }
-      }
-
-      break ;
-    }
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  if (pCurrentItem==NULL) {
-    fprintf(stderr,"ERROR: Unknown MR L2_id  :");
-    print_L2_id(L2_id) ;
-    fprintf(stderr,"\n");
-  }
-
-  PRINT_NEIGHBOR_DB( neighbor_entry );
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction lit l'information de RSSI entre un noeud et un noeud voisin
-
-\return la valeur de RSSI
-*/
-unsigned char get_RSSI_neighbor(
-  neighbor_desc_t *neighbor_entry , ///< pointeur sur l'entree de la liste de voisinage
-  L2_ID           *L2_id          , ///< ID du noeud
-  L2_ID           *neighbor_id      ///< ID du noeud voisin
-)
-{
-  neighbor_desc_t *pCurrentItem = neighbor_entry;
-  unsigned char   rssi = 0xFF ;
-  int i ;
-
-  while ( pCurrentItem != NULL) {
-    if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) {
-      for ( i = 0 ; i < pCurrentItem->NB_neighbor ; i++ ) {
-        if ( L2_ID_cmp( &(pCurrentItem->Sensing_meas[i].L2_id),neighbor_id) == 0 ) {
-          rssi = pCurrentItem->Sensing_meas[i].Rssi ;
-          return (rssi) ;
-        }
-      }
-    }
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  return rssi ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction ajoute un couple de voisin a la liste de type neighbor_list_t
-
-\return le nouvel element de liste
-*/
-static neighbor_list_t *add_item_neighbor_list(
-  neighbor_list_t **neighbor_list_entry , ///< pointeur sur l'entree de la liste des couples de voisins
-  L2_ID            *L2_id1              , ///< ID du noeud 1
-  L2_ID             *L2_id2               ///< ID du noeud 2
-)
-{
-  neighbor_list_t *pOldEntry = *neighbor_list_entry;
-
-  neighbor_list_t *pNewItem = RRM_MALLOC(neighbor_list_t, 1 ) ;
-
-  PNULL(pNewItem) ;
-
-  if ( pNewItem == NULL )
-    return NULL ;
-
-  memcpy( &(pNewItem->L2_id[0]) , L2_id1, sizeof(L2_ID) ) ;
-  memcpy( &(pNewItem->L2_id[1]) , L2_id2, sizeof(L2_ID) ) ;
-  pNewItem->Rssi[0]       =  0xFF      ;
-  pNewItem->Rssi[1]       =  0xFF      ;
-  pNewItem->nb_opened_rb  =  0   ;
-  pNewItem->rb_meas       =  NULL;
-
-  *neighbor_list_entry    =  pNewItem ;
-  pNewItem->next          =  pOldEntry;
-
-  return pNewItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction touve un couple de voisin dans la liste de type neighbor_list_t
-
-\return l'element trouve
-*/
-static neighbor_list_t *get_item_neighbor_list(
-  neighbor_list_t *neighbor_list_entry, ///< pointeur sur l'entree de la liste des couples de voisins
-  L2_ID           *L2_id1             , ///< ID du noeud 1
-  L2_ID           *L2_id2               ///< ID du noeud 2
-)
-{
-  neighbor_list_t *pCurrentItem = neighbor_list_entry;
-  L2_ID L2_id[2] ;
-
-  memcpy( &(L2_id[0]), L2_id1, sizeof(L2_ID) ) ;
-  memcpy( &(L2_id[1]), L2_id2, sizeof(L2_ID) ) ;
-
-  while ( pCurrentItem != NULL) {
-    if ( memcmp( &(pCurrentItem->L2_id),L2_id,2*sizeof(L2_ID)) == 0 )
-      break ;
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  return pCurrentItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction cree la liste de type neighbor_list_t a partie d'une liste
-        de type neighbor_desc_t:
-        - Elle construit la liste des MR en vue directe du CH (voisinage directe)
-        - Elle construit la liste des MR voyant d'autre MR (voisinage a 2 sauts)
-
-\return retourne la liste de type neighbor_list_t.
-*/
-neighbor_list_t *create_neighbor_list(
-  neighbor_desc_t *neighbor_entry , ///< pointeur sur l'entree de la liste de voisinage
-  L2_ID           *L2_id_CH         ///< ID du Cluster Head
-)
-{
-  neighbor_desc_t *pCurrentItem = neighbor_entry;
-  neighbor_list_t *pList=NULL ;
-
-  // construit la liste des MR voyant le CH en directe (voisinage directe)
-  while ( pCurrentItem != NULL) {
-    add_item_neighbor_list( &pList, L2_id_CH, &(pCurrentItem->L2_id) ) ;
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  // construit la liste des MR voyant d'autre MR (voisinage a 2 sauts)
-  pCurrentItem = neighbor_entry;
-
-  while ( pCurrentItem != NULL) {
-    int i ;
-
-    for ( i = 0 ; i<pCurrentItem->NB_neighbor; i++ ) {
-      neighbor_list_t *pItemFound ;
-      // Recherche du couple de voisin dans la liste
-      pItemFound = get_item_neighbor_list(pList ,
-                                          &(pCurrentItem->L2_id) ,
-                                          &(pCurrentItem->Sensing_meas[i].L2_id)
-                                         );
-
-      if ( pItemFound == NULL ) {
-        // si le couple n'est pas trouve alors on inverse les adresses MAC
-        pItemFound = get_item_neighbor_list(pList ,
-                                            &(pCurrentItem->Sensing_meas[i].L2_id) ,
-                                            &(pCurrentItem->L2_id)
-                                           );
-
-        if ( pItemFound == NULL ) {
-          // si ce couple n'est pas dans la liste alors on l'y ajoute
-          pItemFound = add_item_neighbor_list( &pList, &(pCurrentItem->L2_id), &(pCurrentItem->Sensing_meas[i].L2_id)) ;
-          pItemFound->Rssi[1] = pCurrentItem->Sensing_meas[i].Rssi ;
-        }
-      } else {
-        // Met a jour le champs Rssi
-        pItemFound->Rssi[0] = pCurrentItem->Sensing_meas[i].Rssi ;
-      }
-    }
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  return pList ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction detruit la liste de type neighbor_list_t .
-
-\return Aucune valeur
-*/
-void del_neighbor_list(
-  neighbor_list_t **neighbor_list_entry ///< pointeur sur l'entree de la liste de voisinage
-)
-{
-  neighbor_list_t *pCurrentItem = *neighbor_list_entry;
-  neighbor_list_t *pNextItem  ;
-
-  if ( (pCurrentItem == NULL)  || (neighbor_list_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-
-    RRM_FREE( pCurrentItem->rb_meas ) ;
-    RRM_FREE( pCurrentItem ) ;
-
-    pCurrentItem = pNextItem ;
-  }
-
-  *neighbor_list_entry = NULL ;
-}
diff --git a/openair3/MESH/RRM/neighbor_db.h b/openair3/MESH/RRM/neighbor_db.h
deleted file mode 100644
index 40bc52a9c024fde6fec7f3bbaba3b0f7bb7b89c4..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/neighbor_db.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       neighbor_db.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-            et des fonctions relatives a la gestion de la base de donnée sur le
-            voisinage  directe (1 saut) du cluster head et indirecte a 2 sauts.
-
-\author     BURLOT Pascal
-
-\date       29/08/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-
-#ifndef NEIGHBOR_DB_H
-#define NEIGHBOR_DB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*!
-*******************************************************************************
-\brief  Description de la structure de voisinage d'un noeud attache a un cluster
-*/
-typedef struct  neighbor_desc_s {
-  L2_ID               L2_id           ; /*!< L2_id of a node               */
-  // Note: suppression du champ RSSI  a ce niveau car le RSSI CH-MR n'est
-  // a priori pas mesuré , seul le RSSI des mesures de voisinage  ou le RSSI
-  // sur les canaux logiques (RB) logiques
-  //unsigned char         RSSI        ; /*!< RSSI (minus in dBm) with the CH  */
-
-  unsigned int        NB_neighbor     ; /*!< Number de neighbor (2hops)    */
-  SENSING_MEAS_T      *Sensing_meas   ; /*!< RSSI measurement information
-                                              and list of neighbor L2_id     */
-  struct  neighbor_desc_s   *next     ; /*!< Next neighbor to 1 hop        */
-} neighbor_desc_t ;
-
-/*!
-*******************************************************************************
-\brief  Description de la liste de voisinage par couple de voisin
-*/
-typedef struct neighbor_list_s {
-  L2_ID                   L2_id[2]     ; /*!< L2_id of a neighbor couple   */
-  unsigned char           Rssi[2]      ; /*!< Rssi of each neighbor        */
-  unsigned int            nb_opened_rb ; /*!< Number of opened RBs         */
-  rrc_rb_meas_ind_t       *rb_meas     ; /*!< Measure of opened RBs        */
-  struct neighbor_list_s  *next        ; /*!< Next item                    */
-} neighbor_list_t ;
-
-// ---------------------------------------------------------------------------
-
-neighbor_desc_t *add_neighbor( neighbor_desc_t **neighbor_entry, L2_ID *L2_id ) ;
-void del_neighbor( neighbor_desc_t **neighbor_entry, L2_ID *L2_id ) ;
-void del_all_neighbor( neighbor_desc_t **neighbor_entry ) ;
-neighbor_desc_t *get_neighbor( neighbor_desc_t *neighbor_entry, L2_ID *L2_id ) ;
-
-void set_Sensing_meas_neighbor( neighbor_desc_t *neighbor_entry, L2_ID *L2_id ,
-                                unsigned int nb_meas, SENSING_MEAS_T *sensing_meas ) ;
-
-
-unsigned char get_RSSI_neighbor(neighbor_desc_t *neighbor_entry,L2_ID *L2_id, L2_ID *neighbor_id );
-
-// ---------------------------------------------------------------------------
-/* NOT USED
-neighbor_list_t *create_neighbor_list(  neighbor_desc_t *neighbor_entry, L2_ID *L2_id_CH );
-void del_neighbor_list( neighbor_list_t **neighbor_list_entry );
-*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* NEIGHBOR_DB_H */
diff --git a/openair3/MESH/RRM/pusu_msg.c b/openair3/MESH/RRM/pusu_msg.c
deleted file mode 100644
index 08ca2b1411ff8283021feb696bce0a641250b819..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/pusu_msg.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       pusu_msg.c
-
-\brief      Fonctions permettant le formattage des donnees pour l'envoi d'un
-            message sur le socket entre le RRM et PuSu (intra/inter Routing)
-
-\author     BURLOT Pascal
-
-\date       29/08/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "L3_rrc_defs.h"
-#include "rrm_sock.h"
-#include "cmm_rrm_interface.h"
-#include "pusu_msg.h"
-#include "rrm_util.h"
-
-#ifdef TRACE
-//! Macro creant la chaine a partir du nom de la variable
-#define STRINGIZER(x) #x
-//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
-const char *Str_msg_pusu_rrm[NB_MSG_RRM_PUSU] =  {
-  STRINGIZER(RRM_PUBLISH_IND      ) ,
-  STRINGIZER(PUSU_PUBLISH_RESP    ) ,
-  STRINGIZER(RRM_UNPUBLISH_IND    ) ,
-  STRINGIZER(PUSU_UNPUBLISH_RESP  ) ,
-  STRINGIZER(RRM_LINK_INFO_IND    ) ,
-  STRINGIZER(PUSU_LINK_INFO_RESP  ) ,
-  STRINGIZER(RRM_SENSING_INFO_IND ) ,
-  STRINGIZER(PUSU_SENSING_NFO_RESP) ,
-  STRINGIZER(RRM_CH_LOAD_IND      ) ,
-  STRINGIZER(PUSU_CH_LOAD_RESP    )
-};
-#endif
-
-/*!
-*******************************************************************************
-\brief  This function initialize the message header
-\return any return value
-*/
-static void init_pusu_msg_head(
-  msg_head_t     *msg_head , ///< message header to initialize
-  Instance_t      inst     , ///< Instance associated to this message
-  MSG_RRM_PUSU_T  msg_type , ///< type of message to initialize
-  unsigned int    size     , ///< size of message
-  Transaction_t   Trans_id   ///< transaction id associated to this message
-)
-{
-  if ( msg_head != NULL ) {
-    msg_head->start    = START_MSG ;
-    msg_head->msg_type = 0xFF & msg_type ;
-    msg_head->inst     = inst  ;
-    msg_head->Trans_id = Trans_id  ;
-    msg_head->size     = size ;
-  }
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message d'annonce de nouveau service
-        envoyer sur le socket du PUSU.
-\return message formate
-*/
-msg_t *msg_rrm_publish_ind(
-  Instance_t      inst     , ///< Instance associated to this message
-  int             service  , ///< service type
-  Transaction_t   Trans_id   ///< transaction id associated to this message
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    pusu_publish_t *p = RRM_CALLOC(pusu_publish_t , 1 );
-
-    if ( p != NULL ) {
-      init_pusu_msg_head(&msg->head, inst, RRM_PUBLISH_IND, sizeof(pusu_publish_t),Trans_id);
-
-      p->service_type     = service ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message de retrait d'un service
-        envoyer sur le socket du PUSU.
-\return message formate
-*/
-msg_t *msg_rrm_unpublish_ind(
-  Instance_t      inst     , ///< Instance associated to this message
-  int             service  , ///< type de service a retirer
-  Transaction_t   Trans_id   ///< transaction id associated to this message
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    pusu_publish_t *p = RRM_CALLOC(pusu_publish_t , 1 );
-
-    if ( p != NULL ) {
-      init_pusu_msg_head(&msg->head, inst, RRM_UNPUBLISH_IND, sizeof(pusu_unpublish_t),Trans_id);
-
-      p->service_type     = service ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message de mesure a envoyer sur le socket du PUSU.
-\return message formate
-*/
-msg_t *msg_rrm_link_info_ind(
-  Instance_t      inst     , ///< Instance associated to this message
-  L2_ID           noeud1   , ///< L2_ID du noeud 1
-  L2_ID           noeud2   , ///< L2_ID du noeud 2
-  RB_ID           rb_id    , ///< identtification du lien RB
-  unsigned char   rssi     , ///< RSSI du noeud2 mesure  par le noeud1
-  unsigned char   spec_eff , ///< Efficacite spectrale du noeud2 mesure par le noeud1
-  Transaction_t   Trans_id   ///< transaction id associated to this message
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    pusu_link_info_t *p = RRM_CALLOC(pusu_link_info_t , 1 );
-
-    if ( p != NULL ) {
-      init_pusu_msg_head(&msg->head, inst, RRM_LINK_INFO_IND, sizeof(pusu_link_info_t),Trans_id);
-
-      p->rssi             = rssi ;
-      p->spec_eff         = spec_eff ;
-      memcpy( &p->noeud1, &noeud1, sizeof(L2_ID) )  ;
-      memcpy( &p->noeud2, &noeud2, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message de mesure de voisnage a envoyer sur
-        le socket du PUSU.
-
-\return message formate
-*/
-msg_t *msg_rrm_sensing_info_ind(
-  Instance_t      inst     , ///< Instance associated to this message
-  L2_ID           noeud1   , ///< L2_ID du noeud 1
-  L2_ID           noeud2   , ///< L2_ID du noeud 2
-  unsigned char   rssi     , ///< RSSI du noeud2 mesure  par le noeud1
-  Transaction_t   Trans_id   ///< transaction id associated to this message
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    pusu_sensing_info_t *p = RRM_CALLOC(pusu_sensing_info_t , 1 );
-
-    if ( p != NULL ) {
-      init_pusu_msg_head(&msg->head, inst, RRM_SENSING_INFO_IND, sizeof(pusu_sensing_info_t),Trans_id);
-
-      p->rssi             = rssi ;
-      memcpy( &p->noeud1, &noeud1, sizeof(L2_ID) )  ;
-      memcpy( &p->noeud2, &noeud2, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message de charge de cluster a envoyer sur
-        le socket du PUSU.
-\return message formate
-*/
-msg_t *msg_rrm_ch_load_ind(
-  Instance_t      inst     , ///< Instance associated to this message
-  unsigned char   load     , ///< Charge du cluster
-  Transaction_t   Trans_id   ///< transaction id associated to this message
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    pusu_ch_load_t *p = RRM_CALLOC(pusu_ch_load_t , 1 );
-
-    if ( p != NULL ) {
-      init_pusu_msg_head(&msg->head, inst, RRM_CH_LOAD_IND, sizeof(pusu_ch_load_t),Trans_id);
-
-      p->load             = load ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message d'annonce de nouveau service
-        envoyer sur le socket du PUSU.
-\return message formate
-*/
-msg_t *msg_pusu_resp(
-  Instance_t      inst     , ///< Instance associated to this message
-  MSG_RRM_PUSU_T response  , ///< identification de la reponse
-  Transaction_t   Trans_id   ///< transaction id associated to this message
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    // Header only
-    init_pusu_msg_head(&msg->head, inst, response, 0,Trans_id);
-
-    msg->data           = NULL ;
-  }
-
-  return msg ;
-}
-
diff --git a/openair3/MESH/RRM/pusu_msg.h b/openair3/MESH/RRM/pusu_msg.h
deleted file mode 100644
index f852e096cd4e8273eb4f0652714ba8f6257983bd..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/pusu_msg.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       pusu_msg.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-            et des fonctions relatives aux messages RRM->PUSU.
-
-            Les fonctions servent à créer le buffer de message, remplir l'entete
-            et copier les parametres de fonction. Chaque fonction retourne le
-            message qui pourra être envoye sur le socket.
-
-\author     BURLOT Pascal
-
-\date       29/08/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-
-#ifndef PUSU_MSG_H
-#define PUSU_MSG_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//! Definition de la taille de l'identification niveau 2
-#define IEEE80211_MAC_ADDR_LEN 8
-
-
-/*!
-*******************************************************************************
-\brief  Enumeration des messages entre le RRM et PUSU
-*/
-typedef enum {
-  RRM_PUBLISH_IND = 0     , ///< Annonce de nouveau service
-  PUSU_PUBLISH_RESP       , ///< Reponse de PUSU_PUBLISH_IND
-  RRM_UNPUBLISH_IND       , ///< Annonce de retrait d'un service
-  PUSU_UNPUBLISH_RESP     , ///< Reponse de PUSU_UNPUBLISH_IND
-  RRM_LINK_INFO_IND       , ///< Info sur un lien (oriente)
-  PUSU_LINK_INFO_RESP     , ///< Reponse de PUSU_LINK_INFO_IND
-  RRM_SENSING_INFO_IND    , ///< Info sur un voisin (oriente)
-  PUSU_SENSING_INFO_RESP  , ///< Reponse de RRM_SENSING_INFO_IND
-  RRM_CH_LOAD_IND         , ///< Info sur la charge d'un cluster
-  PUSU_CH_LOAD_RESP       , ///< Reponse de PUSU_CH_LOAD_IND
-  NB_MSG_RRM_PUSU           ///< Nombre de message de l'interface
-}
-MSG_RRM_PUSU_T ;
-
-/*!
-*******************************************************************************
-\brief  Enumeration des services entre le RRM et PUSU
-*/
-typedef enum {
-  PUSU_RRM_SERVICE = 0xAA      ///< service d'un information RRM vers le TRM
-} SERVICE_RRM_PUSU_T ;
-
-/*!
-*******************************************************************************
-\brief  Definition de publish/unpublish
-*/
-typedef struct {
-  int service_type ;  ///< type de service
-} pusu_publish_t ,  pusu_unpublish_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des informations remontees au TRM relatives a un lien
-*/
-typedef struct {
-  L2_ID         noeud1       ;  ///< L2_ID du noeud 1
-  L2_ID         noeud2       ;  ///< L2_ID du noeud 2
-  RB_ID         rb_id        ;  ///< identification du lien
-  unsigned char rssi         ;  ///< metrique RSSI
-  unsigned char spec_eff     ;  ///< metrique Efficacite spectrale
-} pusu_link_info_t;
-
-/*!
-*******************************************************************************
-\brief  Definition des informations remontees au TRM relatives a un voisin
-        sans notion de lien etabli obligatoirement
-*/
-typedef struct {
-  L2_ID         noeud1       ;  ///< L2_ID du noeud 1
-  L2_ID         noeud2       ;  ///< L2_ID du noeud 2
-  unsigned char rssi         ;  ///< metrique RSSI
-} pusu_sensing_info_t;
-
-/*!
-*******************************************************************************
-\brief  Definition de la structure d'information de charge du cluster remontee
-        au TRM
-*/
-typedef struct {
-  unsigned char load         ;  ///< la charge du cluster
-} pusu_ch_load_t;
-
-#ifdef TRACE
-extern const char *Str_msg_pusu_rrm[NB_MSG_RRM_PUSU] ;
-#endif
-
-msg_t *msg_rrm_publish_ind(Instance_t inst, int service, Transaction_t Trans_id  );
-msg_t *msg_rrm_unpublish_ind(Instance_t inst, int service, Transaction_t Trans_id  );
-msg_t *msg_rrm_link_info_ind(Instance_t inst, L2_ID noeud1, L2_ID noeud2, RB_ID rb_id, unsigned char rssi ,unsigned char spec_eff, Transaction_t Trans_id ) ;
-msg_t *msg_rrm_sensing_info_ind(Instance_t inst, L2_ID noeud1, L2_ID noeud2, unsigned char rssi, Transaction_t Trans_id ) ;
-msg_t *msg_rrm_ch_load_ind(Instance_t inst, unsigned char load, Transaction_t Trans_id  );
-msg_t *msg_pusu_resp(Instance_t inst, MSG_RRM_PUSU_T response, Transaction_t Trans_id );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* PUSU_MSG_H */
diff --git a/openair3/MESH/RRM/rb_db.c b/openair3/MESH/RRM/rb_db.c
deleted file mode 100644
index 2eb350599738848b8367be8c40e8daa04ee53f93..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rb_db.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rb_db.c
-
-\brief      Fonctions permettant la gestion de la base de donnée sur les radio-
-            bearers du cluster par le cluster head
-
-\author     BURLOT Pascal
-
-\date       29/08/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "rrm_util.h"
-#include "rb_db.h"
-
-//! Selection locale du mode de debug
-#define DBG_RB_DB 0
-
-#if DBG_RB_DB==0
-//! Macro inactive
-#define PRINT_RB_DB(...)
-#else
-//! Macro affichant  la liste des radio bearers
-#define PRINT_RB_DB(...) print_rb_db( __VA_ARGS__ )
-#endif
-
-/*!
-*******************************************************************************
-\brief  La fonction affiche a l'ecran la liste (pour du debug)
-
-\return  aucune valeur retournee
-*/
-static void print_rb_db(
-  RB_desc_t *pEntry ///< pointeur sur le debut de liste
-)
-{
-  unsigned int i ;
-  RB_desc_t *pCurrentItem = pEntry;
-
-  fprintf(stderr,"RB list=[\n");
-
-  while ( pCurrentItem != NULL) {
-    fprintf(stderr,"  @%p(.Trans_id=%d, .Rb_id=%d, .Rb_type=%d",
-            pCurrentItem, pCurrentItem->Trans_id,
-            pCurrentItem->Rb_id,  pCurrentItem->RB_type);
-
-    fprintf(stderr,", @SRC=");
-
-    for ( i=0; i<8; i++)
-      fprintf(stderr,"%02X", pCurrentItem->L2_id[0].L2_id[i]);
-
-    fprintf(stderr,", @DST=");
-
-    for ( i=0; i<8; i++)
-      fprintf(stderr,"%02X", pCurrentItem->L2_id[1].L2_id[i]);
-
-    fprintf(stderr,", .QoS_class=%d", pCurrentItem->QoS_class );
-
-    /*
-    fprintf(stderr,",\n   .Lchan_desc=%p(",&(pCurrentItem->Lchan_desc));
-        fprintf(stderr,".transport_block_size=%d,",pCurrentItem->Lchan_desc.transport_block_size);
-        fprintf(stderr,".max_transport_blocks=%d,",pCurrentItem->Lchan_desc.max_transport_blocks);
-        fprintf(stderr,".Guaranteed_bit_rate=%ld,",pCurrentItem->Lchan_desc.Guaranteed_bit_rate);
-        fprintf(stderr,".Max_bit_rate=%ld,",pCurrentItem->Lchan_desc.Max_bit_rate);
-        fprintf(stderr,".Delay_class=%d,",pCurrentItem->Lchan_desc.Delay_class);
-        fprintf(stderr,".Target_bler=%d,",pCurrentItem->Lchan_desc.Target_bler);
-        fprintf(stderr,".LCHAN_t=%d),",pCurrentItem->Lchan_desc.LCHAN_t);
-
-    fprintf(stderr,",\n   .Mac_rlc_meas_desc=%p(",&(pCurrentItem->Mac_rlc_meas_desc));
-        fprintf(stderr,".Meas_trigger=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Meas_trigger));
-            fprintf(stderr,".Rssi=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Rssi);
-            fprintf(stderr,".Sinr=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Sinr);
-            fprintf(stderr,".Harq_delay=%u, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Harq_delay);
-            fprintf(stderr,".Bler=%u,",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Bler);
-            fprintf(stderr,".Spec_eff=%u), ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Spec_eff);
-        fprintf(stderr,".Mac_avg=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Mac_avg));
-            fprintf(stderr,".Rssi_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Rssi_forgetting_factor);
-            fprintf(stderr,".Sinr_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Sinr_forgetting_factor);
-            fprintf(stderr,".Harq_delay_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Harq_delay_forgetting_factor);
-            fprintf(stderr,".Bler_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Bler_forgetting_factor);
-            fprintf(stderr,".Spec_eff_forgetting_factor=%u),\n",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Spec_eff_forgetting_factor);
-        fprintf(stderr,"   .bo_forgetting_factor=%u,",pCurrentItem->Mac_rlc_meas_desc.bo_forgetting_factor);
-        fprintf(stderr,".sdu_loss_trigger=%u,",pCurrentItem->Mac_rlc_meas_desc.sdu_loss_trigger);
-        fprintf(stderr,".Rep_amount=%u,",pCurrentItem->Mac_rlc_meas_desc.Rep_amount);
-        fprintf(stderr,".Rep_interval=%d,",pCurrentItem->Mac_rlc_meas_desc.Rep_interval);
-    */
-
-    fprintf(stderr,", .next=%p)\n", pCurrentItem->next );
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  fprintf(stderr," ]\n");
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction ajoute un rb dans la liste des RB ouverts du Cluster head.
-
-\return  retourne la valeur du nouvel element
-*/
-RB_desc_t *add_rb(
-  RB_desc_t     **rb_entry  , ///< pointeur sur l'entree de la liste des RB
-  Transaction_t   Trans_id  , ///< transaction associee
-  QOS_CLASS_T     QoS_class , ///< index de la classe de QoS
-  L2_ID          *L2_id       ///< ID de niveau 2  des noeuds associes au RB
-)
-{
-  RB_desc_t *pOldEntry = *rb_entry;
-  RB_desc_t *pNewItem = RRM_CALLOC( RB_desc_t , 1 ) ;
-
-  PNULL(pNewItem) ;
-
-  if ( pNewItem == NULL )
-    return NULL ;
-
-  pNewItem->QoS_class  =  QoS_class   ;
-
-  memcpy( &(pNewItem->L2_id[0]) , L2_id, 2*sizeof(L2_ID) ) ;
-
-  pNewItem->Trans_id  =  Trans_id ;
-  pNewItem->Rb_id     =  0        ;
-  pNewItem->RB_type   =  0;
-
-  *rb_entry           =  pNewItem ;
-  pNewItem->next      =  pOldEntry;
-
-  PRINT_RB_DB( *rb_entry );
-  return pNewItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction retire l'element identifie par le RB_id de la liste des RB
-
-\return  aucune valeur.
-*/
-void del_rb_by_rbid(
-  RB_desc_t **rb_entry , ///< pointeur sur l'entree de la liste des RB
-  RB_ID       Rb_id      ///< ID du RB a detruire
-)
-{
-  RB_desc_t *pCurrentItem = *rb_entry;
-  RB_desc_t *pNextItem    ;
-  RB_desc_t **ppPrevItem  = rb_entry ;
-
-  if ( (pCurrentItem == NULL)  || (rb_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-
-    if ( Rb_id == pCurrentItem->Rb_id ) {
-      *ppPrevItem = pNextItem;
-      RRM_FREE( pCurrentItem ) ;
-      PRINT_RB_DB( *rb_entry );
-      return ;
-    }
-
-    ppPrevItem   = &(pCurrentItem->next) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  if ( pCurrentItem == NULL )
-    fprintf(stderr, "ERROR: RB_id (%d) unknown\n", Rb_id ) ;
-
-  PRINT_RB_DB( *rb_entry );
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction retire l'element identifie par le Trans_id de la liste des RB
-
-\return  aucune valeur.
-*/
-void del_rb_by_transid(
-  RB_desc_t     **rb_entry , ///< pointeur sur l'entree de la liste des RB
-  Transaction_t   Trans_id   ///< transaction identifiant le RB
-)
-{
-  RB_desc_t *pCurrentItem = *rb_entry;
-  RB_desc_t *pNextItem    ;
-  RB_desc_t **ppPrevItem  = rb_entry ;
-
-  if ( (pCurrentItem == NULL)  || (rb_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-
-    if ( Trans_id == pCurrentItem->Trans_id ) {
-      *ppPrevItem = pNextItem;
-      RRM_FREE( pCurrentItem ) ;
-      PRINT_RB_DB( *rb_entry );
-      return ;
-    }
-
-    ppPrevItem   = &(pCurrentItem->next) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  PRINT_RB_DB( *rb_entry );
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction detruit entierement la liste des RB
-
-\return  aucune valeur.
-*/
-void del_all_rb(
-  RB_desc_t **rb_entry ///< pointeur sur l'entree de la liste des RB
-)
-{
-  RB_desc_t *pCurrentItem = *rb_entry;
-  RB_desc_t *pNextItem    ;
-
-  if ( (pCurrentItem == NULL)  || (rb_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-    RRM_FREE( pCurrentItem ) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  *rb_entry = NULL ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction recherche le descripteur de RB identifie par le RB_id
-        la liste des RBs
-
-\return  pointeur sur le descripteur de RB trouve sinon NULL .
-*/
-RB_desc_t *get_rb_desc_by_rbid(
-  RB_desc_t *rb_entry , ///< pointeur sur l'entree de la liste des RB
-  RB_ID      Rb_id      ///< Id du descripteur de RB recherchee
-)
-{
-  RB_desc_t *pCurrentItem = rb_entry;
-
-  while ( pCurrentItem != NULL) {
-    if ( Rb_id == pCurrentItem->Rb_id )
-      break ;
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  return pCurrentItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction recherche le descripteur de RB identifie par le Trans_id
-        la liste des RBs
-
-\return  pointeur sur le descripteur de RB trouve sinon NULL .
-*/
-RB_desc_t *get_rb_desc_by_transid(
-  RB_desc_t    *rb_entry , ///< pointeur sur l'entree de la liste des RB
-  Transaction_t Trans_id   ///< transaction du descripteur de RB recherchee
-)
-{
-  RB_desc_t *pCurrentItem = rb_entry;
-
-  while ( pCurrentItem != NULL) {
-    if ( Trans_id == pCurrentItem->Trans_id )
-      break ;
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  return pCurrentItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction rafraichit  les champs Rb_id, RB_type d'un descripteur
-            de RB identifie par le Trans_id la liste des RBs .
-
-\return  aucune valeur
-*/
-void update_rb_desc(
-  RB_desc_t     *rb_entry , ///< pointeur sur un element de la liste des RB
-  Transaction_t  Trans_id , ///< transaction id
-  RB_ID          Rb_id    , ///< RB id
-  RB_TYPE        RB_type    ///< type de RB
-)
-{
-  RB_desc_t *pItem = get_rb_desc_by_transid(rb_entry,Trans_id);
-
-  if ( pItem != NULL) {
-    pItem->Trans_id= -1 ;
-    pItem->Rb_id   = Rb_id ;
-    pItem->RB_type = RB_type ;
-  }
-
-  PRINT_RB_DB( rb_entry );
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction rafraichit  le champs Rb_meas d'un RB identifie dans la
-        liste des RBs .
-
-\return  aucune valeur
-*/
-void update_rb_meas(
-  RB_desc_t      *rb_entry   , ///< pointeur sur un element de la liste des RB
-  RB_ID           Rb_id      , ///< RB id
-  L2_ID          *L2_id      , ///< ID de niveau 2 d'un des noeuds du RB
-  MAC_RLC_MEAS_T *Rb_meas      ///< mesure RB effectue par le noeud
-)
-{
-  RB_desc_t *pItem = get_rb_desc_by_rbid(rb_entry,Rb_id);
-
-  if ( pItem != NULL) {
-    if ( memcmp(L2_id, &pItem->L2_id[0], sizeof(L2_ID) ) == 0 ) {
-      memcpy( &pItem->Rb_meas[0],Rb_meas, sizeof(MAC_RLC_MEAS_T) ) ;
-    } else if ( memcmp(L2_id, &pItem->L2_id[1], sizeof(L2_ID) ) == 0 ) {
-      memcpy( &pItem->Rb_meas[1],Rb_meas, sizeof(MAC_RLC_MEAS_T) ) ;
-    }
-  }
-
-}
diff --git a/openair3/MESH/RRM/rb_db.h b/openair3/MESH/RRM/rb_db.h
deleted file mode 100644
index b2f3495cb90ddcda3301f7a0618f49ee68ee4495..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rb_db.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rb_db.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-            et des fonctions relatives a la gestion de la base de donnée sur
-            les radio bearers par le cluster head.
-
-\author     BURLOT Pascal
-
-\date       29/08/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#ifndef RB_DB_H
-#define RB_DB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*!
-*******************************************************************************
-\brief Structure de liste decrivant un radio bearer (RB)
-*/
-typedef struct  RB_desc_s {
-  Transaction_t       Trans_id   ; ///< transaction associe au RB
-  RB_ID               Rb_id      ; ///< ID du RB
-  RB_TYPE             RB_type    ; ///< type de RB
-  QOS_CLASS_T         QoS_class  ; ///< index sur la classe de QoS du RB
-  L2_ID               L2_id[2]   ; ///< ID de niveau 2 des noeuds du RB
-  MAC_RLC_MEAS_T      Rb_meas[2] ; ///< Description de mesures RB associes a chaque noeud
-  struct  RB_desc_s  *next       ; ///< pointeur sur le prochain descripteur de RB
-} RB_desc_t ;
-
-// ---------------------------------------------------------------------------
-
-
-RB_desc_t *add_rb( RB_desc_t **rb_entry,Transaction_t  Trans_id, QOS_CLASS_T QoS_class, L2_ID *L2_id ) ;
-void del_rb_by_rbid( RB_desc_t **rb_entry, RB_ID Rb_id ) ;
-void del_rb_by_transid( RB_desc_t **rb_entry, Transaction_t Trans_id ) ;
-void del_all_rb( RB_desc_t **rb_entry ) ;
-RB_desc_t *get_rb_desc_by_rbid( RB_desc_t *rb_entry, RB_ID Rb_id ) ;
-RB_desc_t *get_rb_desc_by_transid(RB_desc_t *rb_entry, Transaction_t Trans_id ) ;
-void update_rb_desc( RB_desc_t *rb_entry, Transaction_t Trans_id, RB_ID Rb_id, RB_TYPE RB_type );
-void update_rb_meas( RB_desc_t *rb_entry, RB_ID Rb_id, L2_ID*L2_id, MAC_RLC_MEAS_T *Rb_meas );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RB_DB_H */
diff --git a/openair3/MESH/RRM/rb_mngt.c b/openair3/MESH/RRM/rb_mngt.c
deleted file mode 100644
index f049bc96a7d493349a3e8dda3d103ca43c9ff8ef..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rb_mngt.c
+++ /dev/null
@@ -1,571 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rb_mngt.c
-
-\brief      Fonctions permettant la gestion des radio bearers du cluster par
-            le cluster head
-
-\author     BURLOT Pascal
-
-\date       29/08/08
-
-
-\par     Historique:
-        P.BURLOT 2009-01-20
-            + separation de la file de message CMM/RRM a envoyer en 2 files
-              distinctes ( file_send_cmm_msg, file_send_rrc_msg)
-        L. IACOBELLI 2010-01-05
-            + inclusions
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "L3_rrc_interface.h"
-#include "cmm_rrm_interface.h"
-#include "rrm_sock.h"
-#include "rrc_rrm_msg.h"
-#include "cmm_msg.h"
-#include "pusu_msg.h"
-#include "msg_mngt.h"
-#include "rb_db.h"
-#include "neighbor_db.h"
-#include "sens_db.h"
-#include "channels_db.h"
-#include "rrm_util.h"
-#include "transact.h"
-#include "rrm_constant.h"
-#include "rrm.h"
-#include "rb_mngt.h"
-
-//! Met un message dans la file des messages a envoyer
-#define PUT_CMM_MSG(m)  put_msg(  &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m )  //mod_lor_10_01_25
-#define PUT_PUSU_MSG(m) put_msg(  &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m)  //mod_lor_10_01_25
-#define PUT_RRC_MSG(m)  put_msg(  &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m )  //mod_lor_10_01_25
-
-/*
- *  =========================================================================
- *  OUVERTURE D'UN RADIO BEARER
- *  =========================================================================
- */
-
-/*!
-*******************************************************************************
- \brief CMM connection setup request.  Only in CH. It asks to create a
- * connection p2p between CH and MR
-*/
-int cmm_cx_setup_req(
-  Instance_t    inst      , //!< Identification de l'instance
-  L2_ID         Src       , //!< L2 source MAC address
-  L2_ID         Dst       , //!< L2 destination MAC address
-  QOS_CLASS_T   QoS_class , //!< QOS class index
-  Transaction_t Trans_id    //!< Transaction ID
-)
-{
-  int ret = -1 ;
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( (rrm->state == CLUSTERHEAD_INIT1 ) || (rrm->state == CLUSTERHEAD ) ) {
-    L2_ID src_dst[2] ;
-    memcpy(&src_dst[0], &Src, sizeof(L2_ID)) ;
-    memcpy(&src_dst[1], &Dst, sizeof(L2_ID)) ;
-
-    pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
-    //fprintf(stderr,"item_trans in CMM_CX_SETUP_REQ=%d node %d\n",rrm->cmm.trans_cnt,rrm->id);//dbg
-    add_item_transact( &(rrm->cmm.transaction), Trans_id,INT_CMM,CMM_CX_SETUP_REQ, 0,NO_PARENT);
-    pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-
-    /** \todo Evaluer si le RB peut etre cree avant d'envoyer la commande au RRC */
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    rrm->rrc.trans_cnt++ ;
-    //fprintf(stderr,"item_trans in RRM_RB_ESTABLISH_REQ=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg
-    add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_ESTABLISH_REQ,Trans_id,PARENT);
-    add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QoS_class, &src_dst[0] ) ;
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-    PUT_RRC_MSG(
-      msg_rrm_rb_establish_req(inst,
-                               &Lchan_desc[QoS_class],
-                               &Mac_rlc_meas_desc[QoS_class],
-                               &src_dst[0] ,
-                               rrm->rrc.trans_cnt,
-                               NULL,NONE_L3)
-    ) ;
-
-    if(QoS_class == QOS_DTCH_D) { //faire le srb2 seulement a l'attachement (ouverture du DTCH IP par Defaut)
-      pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-      rrm->rrc.trans_cnt++ ;
-      //fprintf(stderr,"item_trans in RRM_RB_ESTABLISH_REQ 2=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg
-      add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_ESTABLISH_REQ,0,NO_PARENT);
-      add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_SRB2, &src_dst[0] ) ;
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-
-      PUT_RRC_MSG(
-        msg_rrm_rb_establish_req(inst,
-                                 &Lchan_desc[QOS_SRB2],
-                                 &Mac_rlc_meas_desc[QOS_SRB2],
-                                 &src_dst[0] ,
-                                 rrm->rrc.trans_cnt,
-                                 rrm->L3_info,rrm->L3_info_t)
-      ) ;
-    }
-
-    ret = 0 ;
-  } else {
-    if ( rrm->state == CLUSTERHEAD_INIT0 ) {
-      L2_ID src_dst[2] ;
-
-      pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
-      //fprintf(stderr,"item_trans in CMM_CX_SETUP_REQ 2=%d node %d\n",rrm->cmm.trans_cnt,rrm->id);//dbg
-      add_item_transact( &(rrm->cmm.transaction), Trans_id, INT_CMM, CMM_CX_SETUP_REQ,0,NO_PARENT);
-      pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-
-      /** \todo Evaluer si le RB peut etre cree avant de solliciter le RRC */
-      pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-
-      memcpy(&src_dst[0], &Src, sizeof(L2_ID)) ;
-      memcpy(&src_dst[1], &Dst, sizeof(L2_ID)) ;
-
-      rrm->rrc.trans_cnt++ ;
-      PUT_RRC_MSG(
-        msg_rrm_rb_establish_req(inst,
-                                 &Lchan_desc[QOS_DTCH_B],
-                                 &Mac_rlc_meas_desc[QOS_DTCH_B],
-                                 &src_dst[0] ,
-                                 rrm->rrc.trans_cnt,
-                                 rrm->L3_info,rrm->L3_info_t)
-      ) ;
-      //fprintf(stderr,"item_trans in RRM_RB_ESTABLISH_REQ 3=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg
-      add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_ESTABLISH_REQ,Trans_id,PARENT);
-
-      add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_DTCH_B, &src_dst[0] ) ;
-
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-      rrm->state = CLUSTERHEAD_INIT1 ;
-      fprintf(stderr,"[RRM] CLUSTERHEAD_INIT1\n" );
-      ret = 0 ;
-    } else
-      fprintf(stderr,"[RRM] CMM_CX_SETUP_REQ (%d) is not allowed (Only CH):etat=%d\n", Trans_id, rrm->state);
-  }
-
-  return ret ;
-}
-
-/*!
-*******************************************************************************
-\brief RRC response to rb_establish_req.  RRC Acknowledgement of reception of
-       rrc_rb_establishment_req.
-*/
-void rrc_rb_establish_resp(
-  Instance_t    inst     , //!< Identification de l'instance
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( (rrm->state == CLUSTERHEAD)
-       || (rrm->state == CLUSTERHEAD_INIT0)
-       || (rrm->state == CLUSTERHEAD_INIT1)
-     ) {
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    set_ttl_transact(rrm->rrc.transaction, Trans_id, TTL_DEFAULT_VALUE ) ;
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-  } else
-    fprintf(stderr,"[RRM] RRC_RB_ESTABLISH_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
-}
-/*!
-*******************************************************************************
-\brief Liberation d'un radio bearer
- */
-static void rb_release_req(
-  Instance_t    inst           , ///< Identification de l'instance
-  rrm_t        *rrm            , ///< pointeur sur l'instance du RRM
-  RB_ID         Rb_id          , ///< Id du RB a liberer
-  unsigned int  parentTransact , ///< Transaction parent  ( a l'origne de la requete )
-  unsigned int  status_parent    ///< Status du parent
-)
-{
-  rrm->rrc.trans_cnt++ ;
-  PUT_RRC_MSG( msg_rrm_rb_release_req(inst,Rb_id, rrm->rrc.trans_cnt) );
-  add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt, INT_RRC, RRM_RB_RELEASE_REQ, parentTransact,status_parent);
-}
-
-/*!
-*******************************************************************************
-\brief RRC confirmation of rb_establish_req.  RRC confirmation of
-        rrc_rb_establishment_req after transactions are complete.
-        Essentially for CH only (except SRB0/1)
-*/
-void rrc_rb_establish_cfm(
-  Instance_t    inst     , //!< Identification de l'instance
-  RB_ID         Rb_id    , //!< Radio Bearer ID used by RRC
-  RB_TYPE       RB_type  , //!< Radio Bearer Type
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( (rrm->state == CLUSTERHEAD)
-       || (rrm->state == CLUSTERHEAD_INIT0)
-       || (rrm->state == CLUSTERHEAD_INIT1)
-     ) {
-    transact_t *pTransact ;
-
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ;
-
-    if ( pTransact == NULL ) {
-      fprintf(stderr,"[RRM] rrc_rb_establish_cfm (%d) unknown transaction\n",Trans_id);
-      // comme la transaction est inconnue, on libere immediatement le
-      // tuyau nouvellement  cree (au niveau du RRC uniquement)
-      rb_release_req( inst, rrm,Rb_id,0,NO_PARENT );
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-    } else {
-      unsigned int parent_id = pTransact->parent_id ;
-      unsigned int status_parent = pTransact->parent_status ;
-
-      update_rb_desc(rrm->rrc.pRbEntry, Trans_id, Rb_id, RB_type );
-      del_item_transact( &(rrm->rrc.transaction),Trans_id ) ;
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-      if ( status_parent ) {
-        transact_t *pTransactParent;
-
-        pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
-        pTransactParent = get_item_transact(rrm->cmm.transaction,parent_id ) ;
-
-        if ( pTransactParent != NULL ) {
-          PUT_CMM_MSG( msg_rrm_cx_setup_cnf(inst,Rb_id,pTransactParent->id ));
-
-          if ( rrm->state == CLUSTERHEAD_INIT1 )
-            rrm->state = CLUSTERHEAD ;
-
-          del_item_transact( &(rrm->cmm.transaction),pTransactParent->id ) ;
-          pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-        } else {
-          // comme la transaction parent est inconnue, on libere
-          // immediatement le  tuyau nouvellement  cree (au niveau
-          // du RRC uniquement)
-          pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-
-          pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-          rb_release_req( inst, rrm,Rb_id, 0, NO_PARENT );
-          del_rb_by_rbid( &(rrm->rrc.pRbEntry), Rb_id ) ;
-          pthread_mutex_unlock( &( rrm->rrc.exclu ) );
-        }
-      }
-
-      pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-    }
-  } else
-    fprintf(stderr,"[RRM] RRC_RB_ESTABLISH_CFM (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
-}
-
-/*
- *  =========================================================================
- *  MODICATION D'UN RADIO BEARER
- *  =========================================================================
- */
-
-/*!
-*******************************************************************************
-\brief CMM connection modify request.  Only in CH.
-
-*/
-int cmm_cx_modify_req(
-  Instance_t    inst      , //!< Identification de l'instance
-  RB_ID         Rb_id     , //!< L2 Rb_id
-  QOS_CLASS_T   QoS_class , //!< QOS class index
-  Transaction_t Trans_id    //!< Transaction ID
-)
-{
-  int ret = -1 ;
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( rrm->state == CLUSTERHEAD ) {
-    RB_desc_t *pRb ;
-
-    pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
-    add_item_transact( &(rrm->cmm.transaction), Trans_id,INT_CMM,CMM_CX_MODIFY_REQ,0,NO_PARENT);
-    pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-
-    /** \todo Evaluer si le RB peut etre modifier avant de solliciter le RRC */
-    pRb = (RB_desc_t *) get_rb_desc_by_rbid( rrm->rrc.pRbEntry, Rb_id ) ;
-
-    if ( pRb != NULL ) {
-      pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-      rrm->rrc.trans_cnt++ ;
-
-      PUT_RRC_MSG(
-        msg_rrm_rb_modify_req( inst,
-                               &Lchan_desc[QoS_class],
-                               &Mac_rlc_meas_desc[QoS_class],
-                               Rb_id,
-                               rrm->rrc.trans_cnt)
-      ) ;
-
-      add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_MODIFY_REQ,Trans_id,PARENT);
-      add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QoS_class, &pRb->L2_id[0] ) ;
-
-      pRb->QoS_class =  QoS_class ;
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-    }
-
-    ret = 0 ;
-  } else
-    fprintf(stderr,"[RRM] CMM_CX_MODIFY_REQ (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
-
-  return ret ;
-}
-/*!
-*******************************************************************************
-\brief RRC response to rb_modify_req
-*/
-void rrc_rb_modify_resp(
-  Instance_t    inst     , //!< Identification de l'instance
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( (rrm->state == CLUSTERHEAD)
-       || (rrm->state == CLUSTERHEAD_INIT0)
-       || (rrm->state == CLUSTERHEAD_INIT1)
-     ) {
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    set_ttl_transact(rrm->rrc.transaction,Trans_id, TTL_DEFAULT_VALUE) ;
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-  } else
-    fprintf(stderr,"[RRM] RRC_RB_MODIFY_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
-}
-/*!
-*******************************************************************************
-\brief RRC confirmation of rb_modify_req
-*/
-void rrc_rb_modify_cfm(
-  Instance_t    inst     , //!< Identification de l'instance
-  RB_ID         Rb_id    , //!< Radio Bearer ID used by RRC
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( rrm->state == CLUSTERHEAD ) {
-    transact_t *pTransact ;
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ;
-
-    if ( pTransact == NULL ) {
-      fprintf(stderr,"[RRM] rrc_rb_modify_cfm (%d) unknown transaction\n",Trans_id);
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-    } else {
-      unsigned int parent_id = pTransact->parent_id ;
-      unsigned int status_parent = pTransact->parent_status ;
-
-      RB_desc_t * pRb = (RB_desc_t *) get_rb_desc_by_rbid( rrm->rrc.pRbEntry, Rb_id ) ;
-
-      if ( pRb != NULL ) {
-        RB_TYPE RB_type = pRb->RB_type ;
-        // détruit l'ancienne description
-        del_rb_by_rbid( &(rrm->rrc.pRbEntry), Rb_id ) ;
-        // mise à jour de la nouvelle
-        update_rb_desc(rrm->rrc.pRbEntry, Trans_id, Rb_id, RB_type );
-      }
-
-      del_item_transact( &(rrm->rrc.transaction),Trans_id ) ;
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-      pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
-
-      if ( status_parent ) {
-        transact_t *pTransactParent = get_item_transact(rrm->cmm.transaction,parent_id ) ;
-
-        if ( pTransactParent != NULL ) {
-          PUT_CMM_MSG( msg_rrm_cx_modify_cnf(inst,pTransactParent->id ));
-          del_item_transact( &(rrm->cmm.transaction),pTransactParent->id ) ;
-        } else // la transaction parent est inconnue, on ne fait rien
-          fprintf(stderr, "[RRM] RRC_RB_MODIFY_CFM (%d) : the parent transaction (%d) is unknown\n",Trans_id,parent_id);
-      }
-
-      pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-    }
-  } else
-    fprintf(stderr,"[RRM] RRC_RB_MODIFY_CFM (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
-}
-
-/*
- *  =========================================================================
- *  LIBERATION D'UN RADIO BEARER
- *  =========================================================================
- */
-
-/*!
-*******************************************************************************
-\brief CMM connection release request.  Only in CH.
- */
-int cmm_cx_release_req(
-  Instance_t    inst     , //!< Identification de l'instance
-  RB_ID         Rb_id    , //!< L2 Rb_id
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  int ret = -1 ;
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( rrm->state == CLUSTERHEAD ) {
-    pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
-    add_item_transact( &(rrm->cmm.transaction), Trans_id,INT_CMM,CMM_CX_RELEASE_REQ,0,NO_PARENT);
-    pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    rb_release_req( inst, rrm,Rb_id,Trans_id, PARENT );
-    del_rb_by_rbid( &(rrm->rrc.pRbEntry), Rb_id ) ;
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-    ret = 0 ;
-  } else
-    fprintf(stderr,"[RRM] CMM_CX_RELEASE_REQ (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
-
-  return ret ;
-}
-
-/*!
-*******************************************************************************
-\brief RRC response to rb_release_req
-*/
-void rrc_rb_release_resp(
-  Instance_t    inst     , //!< Identification de l'instance
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( rrm->state == CLUSTERHEAD ) {
-    transact_t *pTransact ;
-
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ;
-
-    if ( pTransact == NULL ) {
-      fprintf(stderr,"[RRM] rrc_rb_release_resp (%d) unknown transaction\n",Trans_id);
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-    } else {
-      unsigned int parent_id = pTransact->parent_id ;
-      unsigned int status_parent = pTransact->parent_status ;
-
-      del_item_transact( &(rrm->rrc.transaction),Trans_id ) ;
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-      pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
-
-      if ( status_parent ) {
-        transact_t *pTransactParent = get_item_transact(rrm->cmm.transaction,parent_id ) ;
-
-        if ( pTransactParent != NULL ) {
-          PUT_CMM_MSG( msg_rrm_cx_release_cnf(inst,pTransactParent->id ) );
-          del_item_transact( &(rrm->cmm.transaction),pTransactParent->id ) ;
-        } else // la transaction parent est inconnue, on ne fait rien
-          fprintf(stderr,"[RRM] RRC_RB_RELEASE_RESP (%d) : the parent transaction (%d) is unknown\n",Trans_id,parent_id);
-      }
-
-      pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
-    }
-  } else
-    fprintf(stderr,"[RRM] RRC_RB_RELEASE_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
-}
-
-/*
- *  =========================================================================
- *  MESURES SUR UN RADIO BEARER
- *  =========================================================================
- */
-/*!
-*******************************************************************************
-\brief RRC measurement indication
- */
-void rrc_rb_meas_ind(
-  Instance_t     inst         , //!< Identification de l'instance
-  RB_ID          Rb_id        , //!< Radio Bearer ID
-  L2_ID          L2_id        , //!< Layer 2 (MAC) IDs for link
-  MEAS_MODE      Meas_mode    , //!< Measurement mode (periodic or event-driven)
-  MAC_RLC_MEAS_T Mac_rlc_meas , //!< MAC/RLC measurements
-  Transaction_t  Trans_id       //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ( rrm->state == CLUSTERHEAD ) {
-    PUT_RRC_MSG( msg_rrm_rb_meas_resp(inst,Trans_id) );
-
-    if ( Meas_mode == PERIODIC ) {
-      RB_desc_t *pRb ;
-      int ii_rb = 1 ;
-      int transaction_link_info ;
-
-      // update database of RB
-      pthread_mutex_lock(   &( rrm->rrc.exclu )  ) ;
-      update_rb_meas( rrm->rrc.pRbEntry, Rb_id, &L2_id, &Mac_rlc_meas );
-      pthread_mutex_unlock( &( rrm->rrc.exclu )  ) ;
-
-      pthread_mutex_lock( &( rrm->pusu.exclu ) ) ;
-      rrm->pusu.trans_cnt++ ;
-      transaction_link_info = rrm->pusu.trans_cnt ;
-      add_item_transact( &(rrm->pusu.transaction), transaction_link_info,INT_PUSU,RRM_LINK_INFO_IND,0,NO_PARENT);
-      pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ;
-
-      pRb = get_rb_desc_by_rbid( rrm->rrc.pRbEntry, Rb_id ) ;
-
-      if ( memcmp(&L2_id, &pRb->L2_id[1], sizeof(L2_ID ) )  == 0 )
-        ii_rb=0 ;
-
-      PUT_PUSU_MSG(
-        msg_rrm_link_info_ind(inst, L2_id , pRb->L2_id[ii_rb] , Rb_id,
-                              Mac_rlc_meas.Rssi ,Mac_rlc_meas.Spec_eff, transaction_link_info )
-      );
-    }
-  } else
-    fprintf(stderr,"[RRM] RRC_RB_MEAS_IND (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
-}
diff --git a/openair3/MESH/RRM/rb_mngt.h b/openair3/MESH/RRM/rb_mngt.h
deleted file mode 100644
index dafe810975e5d4a7cbdccb7703cbdf8c8ea9cfe2..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rb_mngt.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file     rb_mngt.h
-
-\brief    Fichier d'entete contenant les declarations des types, des defines ,
-      et des fonctions relatives a la gestion des radio bearers par
-      le cluster head.
-
-\author   BURLOT Pascal
-
-\date     29/08/08
-
-
-\par     Historique:
-      $Author$  $Date$  $Revision$
-      $Id$
-      $Log$
-
-*******************************************************************************
-*/
-
-#ifndef RB_MNGT_H
-#define RB_MNGT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// ---------------------------------------------------------------------------
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RB_MNGT_H */
diff --git a/openair3/MESH/RRM/rrc_2_rrm_msg.c b/openair3/MESH/RRM/rrc_2_rrm_msg.c
deleted file mode 100644
index b6294d1727b4d2be9d8394cfe68438c34290ee8d..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrc_2_rrm_msg.c
+++ /dev/null
@@ -1,724 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrc_2_rrm_msg.c
-
-\brief      Fonctions permettant le formattage des donnees pour l'envoi d'un
-            message sur le socket entre le  RRC et le RRM
-
-\author     BURLOT Pascal
-
-\date       16/07/08
-
-
-\par     Historique:
-        P.BURLOT 2009-01-20
-            Correction de bug (debordement memoire) remplacement de la macro
-            RRM_CALLOC() par RRM_CALLOC2() dans la fonction msg_rrc_sensing_meas_ind()
-        L. IACOBELLI 2010-01-05
-            + new messages for sensing
-
-*******************************************************************************
-*/
-#ifdef RRC_EMUL
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include "L3_rrc_defs.h"
-#include "rrm_sock.h"
-#include "L3_rrc_interface.h"
-#include "rrc_rrm_msg.h"
-#include "rrm_util.h"
-//#include "sensing_rrm_msg.h" //mod_lor_10_04_15
-
-#else
-
-#include "defs.h"
-
-#endif
-
-#ifdef TRACE
-//! Macro creant la chaine a partir du nom de la variable
-#define STRINGIZER(x) #x
-//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
-const char *Str_msg_rrc_rrm[NB_MSG_RRC_RRM] = {
-  STRINGIZER(RRM_RB_ESTABLISH_REQ     ),
-  STRINGIZER(RRC_RB_ESTABLISH_RESP    ),
-  STRINGIZER(RRC_RB_ESTABLISH_CFM     ),
-  STRINGIZER(RRM_RB_MODIFY_REQ        ),
-  STRINGIZER(RRC_RB_MODIFY_RESP       ),
-  STRINGIZER(RRC_RB_MODIFY_CFM        ),
-  STRINGIZER(RRM_RB_RELEASE_REQ       ),
-  STRINGIZER(RRC_RB_RELEASE_RESP      ),
-  STRINGIZER(RRC_MR_ATTACH_IND        ),
-  STRINGIZER(RRM_SENSING_MEAS_REQ     ),
-  STRINGIZER(RRC_SENSING_MEAS_RESP    ),
-  STRINGIZER(RRC_CX_ESTABLISH_IND     ),
-  STRINGIZER(RRC_PHY_SYNCH_TO_MR_IND  ),
-  STRINGIZER(RRC_PHY_SYNCH_TO_CH_IND  ),
-  STRINGIZER(RRCI_CX_ESTABLISH_RESP   ),
-  STRINGIZER(RRC_SENSING_MEAS_IND     ),
-  STRINGIZER(RRM_SENSING_MEAS_RESP    ),
-  STRINGIZER(RRC_RB_MEAS_IND          ),
-  STRINGIZER(RRM_RB_MEAS_RESP         ),
-  STRINGIZER(RRM_INIT_CH_REQ          ),
-  STRINGIZER(RRCI_INIT_MR_REQ         ),
-  STRINGIZER(RRC_UPDATE_SENS          ),
-  STRINGIZER(RRM_INIT_MON_REQ         ),
-  STRINGIZER(RRM_INIT_SCAN_REQ        ),
-  STRINGIZER(RRC_INIT_SCAN_REQ        ),
-  STRINGIZER(RRM_SCAN_ORD             ),
-  // STRINGIZER(UPDATE_SENS_RESULTS_3    ), //mod_lor_10_01_25
-  STRINGIZER(RRM_END_SCAN_REQ         ),
-  STRINGIZER(RRC_END_SCAN_REQ         ),
-  STRINGIZER(RRC_END_SCAN_CONF        ),
-  // STRINGIZER(OPEN_FREQ_QUERY_4        ),
-  // STRINGIZER(UPDATE_OPEN_FREQ_7       ),
-  // STRINGIZER(UPDATE_SN_OCC_FREQ_5     ),
-  STRINGIZER(RRM_UP_FREQ_ASS          ),
-  STRINGIZER(RRM_END_SCAN_CONF        ),
-  STRINGIZER(RRC_UP_FREQ_ASS          ),//add_lor_10_11_05
-  STRINGIZER(RRM_UP_FREQ_ASS_SEC      ),//add_lor_10_11_05
-  STRINGIZER(RRC_UP_FREQ_ASS_SEC      )/*,//add_lor_10_11_05
-    STRINGIZER(RRC_OPEN_FREQ            ),
-    STRINGIZER(RRM_OPEN_FREQ            ),
-    STRINGIZER(RRM_UPDATE_SN_FREQ       ),
-    STRINGIZER(RRC_UPDATE_SN_FREQ       ),
-    STRINGIZER(RRM_CLUST_SCAN_REQ       ),
-    STRINGIZER(RRC_CLUST_SCAN_REQ       ),
-    STRINGIZER(RRM_CLUST_SCAN_CONF      ),
-    STRINGIZER(RRM_CLUST_MON_REQ        ),
-    STRINGIZER(RRC_CLUST_MON_REQ        ),
-    STRINGIZER(RRM_CLUST_MON_CONF       ),
-    STRINGIZER(RRM_END_SCAN_CONF        ),
-    STRINGIZER(RRM_INIT_CONN_REQ        ),
-    STRINGIZER(RRC_INIT_CONN_CONF       ),
-    STRINGIZER(RRM_FREQ_ALL_PROP        ),
-    STRINGIZER(RRC_FREQ_ALL_PROP_CONF   ),
-    STRINGIZER(RRM_REP_FREQ_ALL         ),
-    STRINGIZER(RRC_REP_FREQ_ACK         ),
-    STRINGIZER(RRC_INIT_CONN_REQ        ),
-    STRINGIZER(RRM_CONN_SET             ),
-    STRINGIZER(RRC_FREQ_ALL_PROP        ),
-    STRINGIZER(RRM_FREQ_ALL_PROP_CONF   ),
-    STRINGIZER(RRC_REP_FREQ_ALL         ),
-    STRINGIZER(RRM_REP_FREQ_ACK         ) */
-
-} ;
-#endif
-
-/*!
-*******************************************************************************
-\brief  This function initialize the message header
-\return any return value
-*/
-static void init_rrc_msg_head(
-  msg_head_t    *msg_head , //!< message header to initialize
-  Instance_t     inst     , //!< Instance ID
-  MSG_RRC_RRM_T  msg_type , //!< type of message to initialize
-  unsigned int   size     , //!< size of message
-  Transaction_t  Trans_id   //!< transaction id associated to this message
-)
-{
-  if ( msg_head != NULL ) {
-    msg_head->start    = START_MSG ;
-    msg_head->msg_type = 0xFF & msg_type ;
-    msg_head->inst     = inst  ;
-    msg_head->Trans_id = Trans_id  ;
-    msg_head->size     = size;
-  }
-}
-
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message generique de reponse pour les
-          fonctions :
-            - rrc_rb_establish_resp(),rrc_rb_modify_resp(),rrc_rb_modify_resp(),
-            - rrc_rb_release_resp() et rrc_sensing_meas_resp() .
-\return message formate
-*/
-static msg_t *msg_rrc_generic_resp(
-  Instance_t    inst     , //!< Instance ID
-  MSG_RRC_RRM_T msg_type , //!< type of message
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    init_rrc_msg_head(&(msg->head),inst, msg_type, 0 , Trans_id);
-    msg->data = NULL ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_rb_establish_resp().
-\return message formate
-*/
-msg_t *msg_rrc_rb_establish_resp(
-  Instance_t    inst     , //!< Instance ID
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  return msg_rrc_generic_resp( inst, RRC_RB_ESTABLISH_RESP, Trans_id) ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_rb_establish_cfm().
-\return message formate
-*/
-msg_t *msg_rrc_rb_establish_cfm(
-  Instance_t    inst     , //!< Instance ID
-  RB_ID         Rb_id    , //!< Radio Bearer ID used by RRC
-  RB_TYPE       RB_type  , //!< Radio Bearer Type
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrc_rb_establish_cfm_t *p = RRM_CALLOC(rrc_rb_establish_cfm_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRC_RB_ESTABLISH_CFM, sizeof( rrc_rb_establish_cfm_t ) ,Trans_id);
-
-
-      p->Rb_id        = Rb_id ;
-      p->RB_type      = RB_type ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_rb_modify_resp().
-\return message formate
-*/
-msg_t *msg_rrc_rb_modify_resp(
-  Instance_t    inst     , //!< Instance ID
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  return msg_rrc_generic_resp( inst,RRC_RB_MODIFY_RESP, Trans_id) ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_rb_modify_cfm().
-\return message formate
-*/
-msg_t *msg_rrc_rb_modify_cfm(
-  Instance_t    inst     , //!< Instance ID
-  RB_ID         Rb_id    , //!< Radio Bearer ID used by RRC
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrc_rb_modify_cfm_t *p = RRM_CALLOC(rrc_rb_modify_cfm_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRC_RB_MODIFY_CFM, sizeof( rrc_rb_modify_cfm_t ) ,Trans_id);
-
-
-      p->Rb_id        = Rb_id ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-          rrc_rb_release_resp().
-\return message formate
-*/
-msg_t *msg_rrc_rb_release_resp(
-  Instance_t    inst     , //!< Instance ID
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  return msg_rrc_generic_resp( inst,RRC_RB_RELEASE_RESP, Trans_id) ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_MR_attach_ind().
-\return message formate
-*/
-msg_t * msg_rrc_MR_attach_ind(
-  Instance_t    inst     , //!< Instance ID
-  L2_ID         L2_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrc_MR_attach_ind_t *p = RRM_CALLOC(rrc_MR_attach_ind_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRC_MR_ATTACH_IND, sizeof( rrc_MR_attach_ind_t ) ,0);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_sensing_meas_resp().
-\return message formate
-*/
-msg_t *msg_rrc_sensing_meas_resp(
-  Instance_t    inst     , //!< Instance ID
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  return msg_rrc_generic_resp( inst,RRC_SENSING_MEAS_RESP, Trans_id) ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_cx_establish_ind().
-\return message formate
-*/
-msg_t * msg_rrc_cx_establish_ind(
-  Instance_t     inst      , //!< Instance ID
-  L2_ID          L2_id     , //!< Layer 2 (MAC) ID
-  Transaction_t  Trans_id  , //!< Transaction ID
-  unsigned char *L3_info   , //!< Optional L3 Information
-  L3_INFO_T      L3_info_t , //!< Type of L3 Information
-  RB_ID          DTCH_B_id , //!< RBID of broadcast IP service (MR only)
-  RB_ID          DTCH_id     //!< RBID of default IP service (MR only)
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrc_cx_establish_ind_t *p = RRM_CALLOC(rrc_cx_establish_ind_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRC_CX_ESTABLISH_IND, sizeof( rrc_cx_establish_ind_t ) ,Trans_id);
-
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-      p->DTCH_B_id    = DTCH_B_id ;
-      p->DTCH_id      = DTCH_id   ;
-
-      p->L3_info_t    = L3_info_t ;
-
-      if ( L3_info_t == IPv4_ADDR )
-        memcpy( p->L3_info, L3_info, 4 );
-      else if ( L3_info_t == IPv6_ADDR )
-        memcpy( p->L3_info, L3_info, 16 );
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_phy_synch_to_MR_ind().
-\return message formate
-*/
-msg_t * msg_rrc_phy_synch_to_MR_ind(
-  Instance_t     inst  , //!< Instance ID
-  L2_ID          L2_id
-)
-{
-
-  msg_t *smsg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( smsg != NULL ) {
-    rrc_phy_synch_to_MR_ind_t *p = RRM_CALLOC(rrc_phy_synch_to_MR_ind_t , 1) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(smsg->head),inst,RRC_PHY_SYNCH_TO_MR_IND, sizeof( rrc_phy_synch_to_MR_ind_t ) ,0);
-      memcpy(&p->L2_id,(L2_ID*)&L2_id,sizeof(L2_ID));
-    }
-
-    smsg->data = (char *)p ;
-    msg("[msg_rrc_phy_synch_to_MR_ind] from Inst :%d\n",smsg->head.inst);
-  }
-
-  return smsg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-          rrc_phy_synch_to_CH_ind().
-\return message formate
-*/
-msg_t * msg_rrc_phy_synch_to_CH_ind(
-  Instance_t   inst      , //!< Instance ID
-  unsigned int Ch_index  , //!< Clusterhead index
-  L2_ID        L2_id
-)
-{
-  msg_t *smsg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( smsg != NULL ) {
-    rrc_phy_synch_to_CH_ind_t *p = RRM_CALLOC(rrc_phy_synch_to_CH_ind_t , 1) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(smsg->head),inst, RRC_PHY_SYNCH_TO_CH_IND, sizeof( rrc_phy_synch_to_CH_ind_t ) ,0);
-
-      p->Ch_index     = Ch_index  ;
-      memcpy(&p->L2_id,(L2_ID*)&L2_id,sizeof(L2_ID));
-    }
-
-    smsg->data = (char *) p ;
-    msg("[msg_rrc_phy_synch_to_CH_ind] from Inst :%d\n",smsg->head.inst);
-  }
-
-  return smsg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-          rrc_sensing_meas_ind().
-\return message formate
-*/
-msg_t * msg_rrc_sensing_meas_ind(
-  Instance_t      inst         , //!< Instance ID
-  L2_ID           L2_id        , //!< Layer 2 ID (MAC) of sensing node
-  unsigned int    NB_meas      , //!< Layer 2 ID (MAC) of sensing node
-  SENSING_MEAS_T *Sensing_meas , //!< Sensing Information
-  Transaction_t   Trans_id       //!< Transaction ID
-)
-{
-
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof( rrc_sensing_meas_ind_t ) + (NB_meas-1) * sizeof(SENSING_MEAS_T) ;
-    // Note : (NB_meas-1) car la première est incorporé dans  rrc_sensing_meas_ind_t
-    rrc_sensing_meas_ind_t *p   = RRM_CALLOC2(rrc_sensing_meas_ind_t,size ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst, RRC_SENSING_MEAS_IND, size ,Trans_id);
-
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-      if ( NB_meas > 0 ) {
-        memcpy( p->Sensing_meas , Sensing_meas, NB_meas * sizeof(SENSING_MEAS_T) )  ;
-      }
-
-      p->NB_meas      = NB_meas   ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_rb_meas_ind().
-\return message formate
-*/
-msg_t * msg_rrc_rb_meas_ind(
-  Instance_t      inst         , //!< Instance ID
-  RB_ID           Rb_id        , //!< Radio Bearer ID
-  L2_ID           L2_id        , //!< Layer 2 (MAC) IDs for link
-  MEAS_MODE       Meas_mode    , //!< Measurement mode (periodic or event-driven)
-  MAC_RLC_MEAS_T *Mac_rlc_meas , //!< MAC/RLC measurements
-  Transaction_t   Trans_id       //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrc_rb_meas_ind_t *p = RRM_CALLOC(rrc_rb_meas_ind_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst, RRC_RB_MEAS_IND, sizeof( rrc_rb_meas_ind_t ) ,Trans_id);
-
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      memcpy( &(p->Mac_rlc_meas), Mac_rlc_meas, sizeof(L2_ID) )  ;
-
-      p->Rb_id        = Rb_id     ;
-      p->Meas_mode    = Meas_mode ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-
-}
-
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_update_sens().
-\return message formate
-*/
-
-msg_t *msg_rrc_update_sens(
-  Instance_t inst,
-  //double info_time            , //!< Date of the message
-  L2_ID L2_id,
-  unsigned int NB_info,
-  Sens_ch_t *Sens_meas,
-  Transaction_t Trans_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof( rrc_update_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ;//mod_lor_10_04_23
-
-    rrc_update_sens_t *p = RRM_CALLOC2(rrc_update_sens_t , size ) ;
-
-    if ( p != NULL ) {
-      //fprintf(stdout,"msg_rrc_update_sens() time : %d\n", NB_info); //dbg
-      init_rrc_msg_head(&(msg->head),inst, RRC_UPDATE_SENS, size ,Trans_id);
-      //fprintf(stdout,"msg_rrc_update_sens() time : %f\n", info_time); //dbg
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-      p->NB_info       = NB_info    ;
-
-      if ( NB_info > 0 ) {
-        memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) )  ;
-      }
-
-
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_init_scan_req().
-\return message formate
-*/
-
-msg_t *msg_rrc_init_scan_req(
-  Instance_t        inst            , //!< instance ID
-  L2_ID             L2_id           ,
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq,
-  Transaction_t     Trans_id          //!< Transaction ID
-
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrc_init_scan_req_t *p = RRM_CALLOC(rrc_init_scan_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRC_INIT_SCAN_REQ, sizeof( rrc_init_scan_req_t ) ,Trans_id);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      //mod_lor_10_03_12++
-      p->Start_fr     = Start_fr;
-      p->Stop_fr      = Stop_fr;
-      p->Meas_band    = Meas_band;
-      p->Meas_tpf     = Meas_tpf;
-      p->Nb_channels  = Nb_channels;
-      p->Overlap      = Overlap;
-      p->Sampl_freq   = Sampl_freq;
-      //mod_lor_10_03_12--
-
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_end_scan_conf().
-\return message formate
-*/
-
-msg_t *msg_rrc_end_scan_conf(
-  Instance_t        inst            , //!< instance ID
-  L2_ID             L2_id           ,
-  Transaction_t     Trans_id          //!< Transaction ID
-
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrc_end_scan_conf_t *p = RRM_CALLOC(rrc_end_scan_conf_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRC_END_SCAN_CONF, sizeof( rrc_end_scan_conf_t ) ,Trans_id);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_end_scan_req().
-\return message formate
-*/
-msg_t *msg_rrc_end_scan_req(
-  Instance_t    inst,
-  L2_ID         L2_id           ,
-  Transaction_t Trans_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  //fprintf(stdout,"msg_rrc_end_scan_req\n"); //dbg
-  if ( msg != NULL ) {
-    rrc_end_scan_req_t *p = RRM_CALLOC(rrc_end_scan_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRC_END_SCAN_REQ, sizeof( rrc_end_scan_req_t ) ,Trans_id);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrc_init_mon_req().
-\return message formate
-*/
-
-msg_t *msg_rrc_init_mon_req(
-  Instance_t        inst            , //!< instance ID
-  L2_ID             L2_id           ,
-  unsigned int      *ch_to_scan     ,
-  unsigned int      NB_chan         ,
-  unsigned int      interval        ,
-  Transaction_t     Trans_id          //!< Transaction ID
-
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof( rrc_init_mon_req_t ) + (NB_chan-1) * sizeof(unsigned int) ;
-
-    rrc_init_mon_req_t *p = RRM_CALLOC2(rrc_init_mon_req_t , size ) ;
-
-    if ( p != NULL ) {
-      //for (int i=0; i<NB_chan; i++)
-      //  fprintf(stdout,"msg_rrm_init_mon_req(), chan: %d\n", ch_to_scan[i]); //dbg
-      init_rrc_msg_head(&(msg->head),inst,RRC_INIT_MON_REQ, size ,Trans_id);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      p->NB_chan = NB_chan;
-      p->interval = interval;
-
-      if ( NB_chan != 0 )
-        memcpy( p->ch_to_scan, ch_to_scan, NB_chan*sizeof(unsigned int) );
-
-      // for (int i=0; i<NB_chan; i++)
-      //   fprintf(stdout,"msg_rrm_init_mon_req(), after memcpy: %d\n", ch_to_scan[i]); //dbg
-
-      //fprintf(stderr,"pointer ch_to_scan  @%p \n", p->ch_to_scan);//dbg
-      //for (int i=0; i<NB_chan;i++)//dbg
-      //    fprintf(stderr,"channel %d to scan \n", p->ch_to_scan[i]);//dbg
-
-
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
diff --git a/openair3/MESH/RRM/rrc_rrm_msg.h b/openair3/MESH/RRM/rrc_rrm_msg.h
deleted file mode 100644
index ad46fc4819d8437f7ee44b6a726554d2ab44ab62..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrc_rrm_msg.h
+++ /dev/null
@@ -1,508 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrc_msg.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-            et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI.
-
-            Les fonctions servent à créer le buffer de message, remplir
-            l'entete et copier les parametres de fonction. Chaque fonction
-            retourne le message qui pourra être envoye sur le socket entre le
-            CMM et le RRM ou RRCI.
-
-\author     BURLOT Pascal
-
-\date       17/07/08
-
-\par     Historique:
-        L.IACOBELLI 2009-10-19
-            + sensing messages
-
-*******************************************************************************
-*/
-#ifndef __RRC_RRM_MSG_H
-#define __RRC_RRM_MSG_H
-
-#include "L3_rrc_defs.h"
-#include "COMMON/mac_rrc_primitives.h"
-
-#ifdef OPENAIR2_IN
-#include "rrm_sock.h"
-#else
-#include "RRC/MESH/rrc_rrm_interface.h"
-#endif
-//#include "../../../openair2/RRC/MESH/rrc_rrm_interface.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*!
-*******************************************************************************
-\brief  Enumeration des messages entre RRM/RRCI et le RRC
-*/
-typedef enum {
-  RRM_RB_ESTABLISH_REQ = 0    , ///< Message RRM->RRC : requete d'etablissement d'un RB
-  RRC_RB_ESTABLISH_RESP       , ///< Message RRC->RRM : reponse d'etablissement d'un RB
-  RRC_RB_ESTABLISH_CFM        , ///< Message RRC->RRM : confirmation d'etablissement d'un RB
-  RRM_RB_MODIFY_REQ           , ///< Message RRM->RRC : requete de modification d'un RB
-  RRC_RB_MODIFY_RESP          , ///< Message RRC->RRM : reponse de modification d'un RB
-  RRC_RB_MODIFY_CFM           , ///< Message RRC->RRM : confirmation de modification d'un RB
-  RRM_RB_RELEASE_REQ          , ///< Message RRM->RRC : requete de liberation d'un RB
-  RRC_RB_RELEASE_RESP         , ///< Message RRC->RRM : reponse de liberation d'un RB
-  RRC_MR_ATTACH_IND           , ///< Message RRC->RRM : indication d'attachement d'un MR
-  RRM_SENSING_MEAS_REQ        , ///< Message RRM->RRC : requete de configuration de mesure sensing
-  RRC_SENSING_MEAS_RESP       , ///< 10Message RRC->RRM : reponse de configuration de mesure sensing
-  RRC_CX_ESTABLISH_IND        , ///< Message RRC->RRM : indication de connexion etablie
-  RRC_PHY_SYNCH_TO_MR_IND     , ///< Message RRC->RRM : indication de synchronisation physique a un MR
-  RRC_PHY_SYNCH_TO_CH_IND     , ///< Message RRC->RRM : indication de synchronisation physique a un CH
-  RRCI_CX_ESTABLISH_RESP      , ///< Message RRCI->RRC : reponse de connexion etablie
-  RRC_SENSING_MEAS_IND        , ///< Message RRC->RRM : indication de nouvel mesure de sensing
-  RRM_SENSING_MEAS_RESP       , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure de sensing
-  RRC_RB_MEAS_IND             , ///< Message RRC->RRM : indication de nouvel mesure sur un RB
-  RRM_RB_MEAS_RESP            , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure sur un RB
-  RRM_INIT_CH_REQ             , ///< Message RRM->RRC : init d'un CH
-  RRCI_INIT_MR_REQ            , ///< 20Message RRM->RRC : init d'un MR
-  RRM_INIT_MON_REQ            , ///< Message RRM->RRC : initiation of a scanning monitoring
-  RRM_INIT_SCAN_REQ           , ///< Message RRM->RRC : initiation of a scanning process
-  RRC_INIT_SCAN_REQ           , ///< Message RRC->RRM : initiation of a scanning process
-  //UPDATE_SENS_RESULTS_3       , ///< Message IP       : update to send to CH/FC //mod_lor_10_01_25
-  RRM_END_SCAN_REQ            , ///< Message RRM->RRC : end of a scanning process
-  RRC_END_SCAN_REQ            , ///< Message RRC->RRM : end of a scanning process
-  RRC_END_SCAN_CONF           , ///< Message RRC->RRM : end of a scanning process ack
-  RRC_INIT_MON_REQ            , ///< Message RRM->RRC : initiation of a scanning monitoring
-  //OPEN_FREQ_QUERY_4           , ///< Message IP   : BTS to ask free frequencies to FC
-  //UPDATE_OPEN_FREQ_7          , ///< 30Message IP       : list of frequencies usable by the secondary network
-  //UPDATE_SN_OCC_FREQ_5        , ///< Message IP       : BTS sends used freq. to FC
-  RRM_UP_FREQ_ASS             , ///< Message RRM->RRC : BTS assigns channels to SUs (scen1)
-  RRM_END_SCAN_CONF           , ///< Message RRM->RRC : end of a scanning process
-  RRC_UP_FREQ_ASS             , ///< Message RRC->RRM ://mod_lor_10_06_04
-  RRM_UP_FREQ_ASS_SEC         , ///< Message RRM->RRC : CH assigns channels to SUs (scen2) //add_lor_10_11_05
-  RRC_UP_FREQ_ASS_SEC         , ///< Message RRC->RRM : frequencies assigned by CH (scen2)  //add_lor_10_11_05
-  /*RRC_ASK_FOR_FREQ            , ///< Message RRC->RRM : in FC/CH to report a frequency query
-  RRM_OPEN_FREQ               , ///< Message RRM->RRC : FC communicates open frequencies
-  RRM_UPDATE_SN_FREQ          , ///< Message RRM->RRC : BTS sends used freq. to FC
-  RRC_UPDATE_SN_FREQ          , ///< Message RRC->RRM : FC receives used freq. from BTS
-  RRM_CLUST_SCAN_REQ          , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the sensing process
-  RRC_CLUST_SCAN_REQ          , ///< Message RRC->RRM : CH2 receive request to collaborate for the sensing process from CH1
-  RRM_CLUST_SCAN_CONF         , ///< Message RRM->RRC : CH2 confirmrs the beginning of a collaboration process
-  RRM_CLUST_MON_REQ           , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the monitoring process
-  RRC_CLUST_MON_REQ           , ///< Message RRC->RRM : CH2 receive request to collaborate for the monitoring process from CH1
-  RRM_CLUST_MON_CONF          , ///< Message RRM->RRC : CH2 confirmrs the beginning of a monitoring process
-  RRM_END_SCAN_CONF           , ///< Message RRM->RRC : CH2 confirmrs the end of the collaborative sensing process at CH1
-  RRM_INIT_CONN_REQ           , ///< Message RRM->RRC : SU 1 requests a connection to SU 2
-  RRC_INIT_CONN_CONF          , ///< Message RRM->RRC : Confirm from SU2 about the requested connection
-  RRM_FREQ_ALL_PROP           , ///< Message RRM->RRC : SU1 sends a proposition of teh frequencies to use
-  RRC_FREQ_ALL_PROP_CONF      , ///< Message RRC->RRM : SU1 receives a confirm on the usable channels
-  RRM_REP_FREQ_ALL            , ///< Message RRM->RRC : SU1 reports to CH the possible channels
-  RRC_REP_FREQ_ACK            , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs
-  RRC_INIT_CONN_REQ           , ///< Message RRC->RRM : Request from SU1 to establish a connection
-  RRM_CONN_SET                , ///< Message RRC->RRM : Response to SU1 and connection settings communicated to rcc
-  RRC_FREQ_ALL_PROP           , ///< Message RRC->RRM : SU1 proposition of frequencies to use
-  RRM_FREQ_ALL_PROP_CONF      , ///< Message RRC->RRM : SU2 choise of frequencies to use
-  RRC_REP_FREQ_ALL            , ///< Message RRM->RRC : SU1 reports to CH the possible channels
-  RRM_REP_FREQ_ACK            , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs
-  */NB_MSG_RRC_RRM                ///< Nombre de message RRM-RRC
-
-}
-MSG_RRC_RRM_T ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_init_ch_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-
-typedef struct   {
-  LCHAN_DESC          Lchan_desc_srb0      ; //!< Logical Channel Descriptor Array
-  LCHAN_DESC          Lchan_desc_srb1      ; //!< Logical Channel Descriptor Array
-  L2_ID               L2_id                ; //!< Layer 2 (MAC) IDs for link
-} rrm_init_ch_req_t ;
-
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_init_mr_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct   {
-  LCHAN_DESC          Lchan_desc_srb0      ; //!< Logical Channel Descriptor Array
-  LCHAN_DESC          Lchan_desc_srb1      ; //!< Logical Channel Descriptor Array
-  unsigned char       CH_index             ; //!< Layer 2 (MAC) IDs for CH
-} rrci_init_mr_req_t ;
-
-
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_rb_establish_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct   {
-  L2_ID               L2_id[2]             ; //!< Layer 2 (MAC) IDs for link
-  LCHAN_DESC          Lchan_desc           ; //!< Logical Channel Descriptor Array
-  MAC_RLC_MEAS_DESC   Mac_rlc_meas_desc    ; //!< MAC/RLC Measurement descriptors for RB
-  L3_INFO_T           L3_info_t            ; //!< Optional L3 Information
-  unsigned char       L3_info[MAX_L3_INFO] ; //!< Type of L3 Information
-} rrm_rb_establish_req_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrc_rb_establish_cfm() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  RB_ID               Rb_id                ; //!< Radio Bearer ID used by RRC
-  RB_TYPE             RB_type              ; //!< Radio Bearer Type
-} rrc_rb_establish_cfm_t        ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_rb_modify_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct   {
-  LCHAN_DESC          Lchan_desc           ; //!< Logical Channel Descriptor Array
-  MAC_RLC_MEAS_DESC   Mac_meas_desc        ; //!< MAC/RLC Measurement descriptors for RB
-  RB_ID               Rb_id                ; //!< Radio Bearer ID
-} rrm_rb_modify_req_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres des fonctions rrc_rb_modify_cfm() et
-        rrm_rb_release_req() dans une structure  permettant le passage des
-        parametres via un socket
-*/
-typedef struct {
-  RB_ID               Rb_id                ; //!< Radio Bearer ID
-} rrc_rb_modify_cfm_t   ,
-rrm_rb_release_req_t  ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrc_MR_attach_ind() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id               ; //!< Layer 2 (MAC) ID
-} rrc_MR_attach_ind_t  ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_sensing_meas_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id                ; //!< Layer 2 (MAC) ID
-  SENSING_MEAS_DESC   Sensing_meas_desc    ; //!< Sensing Measurement Descriptor
-} rrm_sensing_meas_req_t  ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrc_cx_establish_ind() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id                ; //!< Layer 2 (MAC) ID
-  L3_INFO_T           L3_info_t            ; //!< Type of L3 Information
-  unsigned char       L3_info[MAX_L3_INFO] ; //!< Optional L3 Information
-  RB_ID               DTCH_B_id            ; //!< RBID of broadcast IP service (MR only)
-  RB_ID               DTCH_id              ; //!< RBID of default IP service (MR only)
-} rrc_cx_establish_ind_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrc_phy_synch_to_CH_ind() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  unsigned int          Ch_index             ; //!< Clusterhead index
-  L2_ID                 L2_id                ; //!< L2_ID du MR
-} rrc_phy_synch_to_CH_ind_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrc_phy_synch_to_MR_ind() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID           L2_id                ; //!< L2_ID du CH
-} rrc_phy_synch_to_MR_ind_t ;
-
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrci_cx_establish_resp() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id                 ;
-  unsigned char       L3_info[MAX_L3_INFO]  ; //!< Optional L3 Information
-  L3_INFO_T           L3_info_t             ; //!< Type of L3 Information
-} rrci_cx_establish_resp_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrc_sensing_meas_ind_t() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id                 ; //!< Layer 2 ID (MAC) of sensing node
-  unsigned int        NB_meas               ; //!< Layer 2 ID (MAC) of sensing node
-  SENSING_MEAS_T      Sensing_meas[NB_SENS_MAX]; //!< first Sensing Information
-} rrc_sensing_meas_ind_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrc_rb_meas_ind() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  RB_ID              Rb_id                 ; //!< Radio Bearer ID
-  L2_ID              L2_id                 ; //!< Layer 2 (MAC) IDs for link
-  MEAS_MODE          Meas_mode             ; //!< Measurement mode (periodic or event-driven)
-  MAC_RLC_MEAS_T     Mac_rlc_meas          ; //!< MAC/RLC measurements
-} rrc_rb_meas_ind_t;
-
-
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de les fonctions
-        rrm_update_sens()dans une structure permettant le passage
-        des parametres via un socket
-*/
-/*typedef struct {
-    L2_ID               L2_id                  ; //!< Layer 2 ID (MAC) of sensing node
-    unsigned int        NB_info                ; //!< number of sensed channels
-    Sens_ch_t           Sens_meas[NB_SENS_MAX] ; //!< sensing information
-} rrm_update_sens_t ;  */
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres des fonctions rrm_init_mon_req(),
-        rrc_init_mon_req(), rrm_clust_mon_req(), rrc_clust_mon_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id                ; //!< Layer 2 (MAC) ID of destination
-  unsigned int        NB_chan              ; //!< Number of channels to scan
-  unsigned int        interval             ; //!< Time between two sensing sessions
-  unsigned int        ch_to_scan[NB_SENS_MAX]; //!< Vector of channels to scan
-} rrm_init_mon_req_t,
-rrc_init_mon_req_t/*,
- rrm_clust_mon_req_t,
- rrc_clust_mon_req_t*/;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_init_scan_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-//mod_lor_10_03_12++
-typedef struct {
-  unsigned int     Start_fr;      //!< Lowest frequency considered (MHz)
-  unsigned int     Stop_fr;       //!< Highest frequency considered (MHz)
-  unsigned int     Meas_band;     //!< Measurement bandwidth (KHz)
-  unsigned int     Meas_tpf;      //!< Measurement time per sub-band
-  unsigned int     Nb_channels;   //!< Number of sub-bands
-  unsigned int     Overlap;       //!< Overlap factor (%)
-  unsigned int     Sampl_freq;    //!< Sampling frequency (Ms/s)
-} rrm_init_scan_req_t;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrc_init_scan_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID      L2_id              ; //!< Layer 2 (MAC) ID of Fusion Centre
-  unsigned int     Start_fr;      //!< Lowest frequency considered (MHz)
-  unsigned int     Stop_fr;       //!< Highest frequency considered (MHz)
-  unsigned int     Meas_band;     //!< Measurement bandwidth (KHz)
-  unsigned int     Meas_tpf;      //!< Measurement time per sub-band
-  unsigned int     Nb_channels;   //!< Number of sub-bands
-  unsigned int     Overlap;       //!< Overlap factor (%)
-  unsigned int     Sampl_freq;    //!< Sampling frequency (Ms/s)
-} rrc_init_scan_req_t;
-//mod_lor_10_03_12--
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_end_scan_req() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID      L2_id              ; //!< Layer 2 (MAC) ID of destination sensor/FC
-} rrm_end_scan_req_t,
-rrc_end_scan_req_t,
-rrc_end_scan_conf_t;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_up_freq_ass() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id                ; //!< Layer 2 (MAC) ID of SU
-  unsigned int        NB_chan              ; //!< Number of channels
-  CHANNEL_T           ass_channels[NB_SENS_MAX]; //!< description of assigned channelS
-} rrm_up_freq_ass_t ;
-
-/*! //add_lor_10_11_05
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_up_freq_ass() dans
-        une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  L2_ID               L2_id [NB_SENS_MAX]      ; //!< Layer 2 (MAC) ID of SU source
-  L2_ID               L2_id_dest [NB_SENS_MAX] ; //!< Layer 2 (MAC) ID of SU source
-  unsigned int        NB_all                   ; //!< Number of allocated channels
-  CHANNEL_T           ass_channels[NB_SENS_MAX]; //!< description of assigned channelS
-} rrm_up_freq_ass_sec_t ;
-
-///< TYPEDEF VIA IP
-//mod_lor_10_04_27++
-/*!
-*******************************************************************************
-\brief  Definition des parametres de les fonctions
-        rrm_update_sens()dans une structure permettant le passage
-        des parametres via un socket
-*/
-/*typedef struct {
-    L2_ID               L2_id                  ; //!< Layer 2 ID (MAC) of sensing node
-    unsigned int        NB_info                ; //!< Number of sensed channels
-    Sens_ch_t           Sens_meas[NB_SENS_MAX] ; //!< Sensing information
-    double              info_time              ; //!< Data of the information
-} rrm_update_sens_t ; */
-
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de les fonctions rrm_ask_for_freq() et rrc_ask_for_freq()dans
-        une structure permettant le passage des parametres via un socket
-*/
-/*typedef struct {
-    L2_ID      L2_id              ; //!< Layer 2 (MAC) ID of Fusion Centre
-    QOS_CLASS_T      QoS          ; //!< QoS required; if 0 all QoS at disposition
-} open_freq_query_t;*/
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de les fonctions
-        rrc_open_freq() et rrm_open_freq() dans une structure permettant le passage
-        des parametres via un socket
-*/
-/*typedef struct {
-    double              date;
-    L2_ID               L2_id                  ; //!< Layer 2 ID (MAC) of FC/CH
-    unsigned int        NB_chan                ; //!< number of free channels
-    CHANNEL_T           fr_channels[NB_SENS_MAX]; //!< description of free channelS
-} update_open_freq_t;*/
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres des fonctions rrm_update_SN_freq() et
-        rrm_update_SN_freq()dans
-        une structure permettant le passage des parametres via un socket
-*/
-/*typedef struct {
-    L2_ID               L2_id                ; //!< Layer 2 (MAC) ID of FC/BTS
-    unsigned int        NB_chan              ; //!< Number of channels
-    unsigned int        occ_channels[NB_SENS_MAX]; //!< Vector of channels
-} update_SN_occ_freq_t;*/
-//mod_lor_10_04_27--
-
-#ifdef TRACE
-extern const char *Str_msg_rrc_rrm[NB_MSG_RRC_RRM] ;
-#endif
-
-/* Rappel : les paramètres sont identiques aux fonctions
- *          (sans le prefixe msg_ ) du fichier: L3_rrc_interface.h
- */
-
-
-msg_t *msg_rrm_rb_establish_req( Instance_t inst,
-                                 const LCHAN_DESC *Lchan_desc, const MAC_RLC_MEAS_DESC *Mac_rlc_meas_desc,
-                                 L2_ID *L2_id, Transaction_t Trans_id, unsigned char *L3_info, L3_INFO_T L3_info_t );
-
-
-msg_t *msg_rrm_rb_modify_req( Instance_t inst,
-                              const LCHAN_DESC  *Lchan_desc, const MAC_RLC_MEAS_DESC *Mac_meas_desc,
-                              RB_ID Rb_id, Transaction_t Trans_id );
-
-msg_t *msg_rrm_rb_release_req( Instance_t inst, RB_ID Rb_id, Transaction_t Trans_id );
-
-msg_t *msg_rrm_sensing_meas_req( Instance_t inst,
-                                 L2_ID L2_id, SENSING_MEAS_DESC Sensing_meas_desc, Transaction_t Trans_id ) ;
-
-msg_t *msg_rrci_cx_establish_resp( Instance_t inst,
-                                   Transaction_t Trans_id,L2_ID L2_id,
-                                   unsigned char *L3_info, L3_INFO_T L3_info_t );
-
-msg_t *msg_rrm_sensing_meas_resp( Instance_t inst, Transaction_t Trans_id );
-
-
-msg_t *msg_rrm_rb_meas_resp( Instance_t inst, Transaction_t Trans_id );
-
-msg_t *msg_rrm_init_ch_req( Instance_t inst, Transaction_t Trans_id,
-                            const LCHAN_DESC *Lchan_desc_srb0, const LCHAN_DESC *Lchan_desc_srb1,
-                            L2_ID L2_id )  ;
-
-msg_t *msg_rrci_init_mr_req( Instance_t inst,
-                             Transaction_t Trans_id, const LCHAN_DESC *Lchan_desc_srb0,
-                             const LCHAN_DESC  *Lchan_desc_srb1, unsigned char CH_index);
-
-msg_t *msg_rrm_init_mon_req(Instance_t inst, L2_ID L2_id, unsigned int NB_chan,
-                            unsigned int interval, unsigned int *ch_to_scan, Transaction_t Trans_id );
-msg_t *msg_rrm_init_scan_req(Instance_t inst, unsigned int  Start_fr, unsigned int  Stop_fr,unsigned int Meas_band,
-                             unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq, Transaction_t Trans_id ); //mod_lor_10_03_12
-msg_t *msg_rrm_end_scan_req( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id );
-msg_t *msg_rrm_up_freq_ass( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, CHANNEL_T *ass_channels);
-msg_t *msg_rrm_end_scan_conf( Instance_t inst, Transaction_t Trans_id);
-msg_t *msg_rrm_up_freq_ass_sec( Instance_t inst, L2_ID *L2_id, L2_ID *L2_id_dest,unsigned int NB_all, CHANNEL_T *ass_channels);//add_lor_10_11_05
-
-
-/*//mod_lor_10_04_27++
-///MESSAGES VIA IP
-msg_t *msg_update_sens_results_3( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, Sens_ch_t *Sens_meas, Transaction_t Trans_id );
-msg_t *msg_open_freq_query_4( Instance_t inst, L2_ID L2_id, QOS_CLASS_T QoS, Transaction_t Trans_id );
-msg_t *msg_update_open_freq_7( Instance_t inst, L2_ID L2_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels, Transaction_t Trans_id);
-msg_t *msg_update_SN_occ_freq_5( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, unsigned int *occ_channels, Transaction_t Trans_id);
-//mod_lor_10_04_27--*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RRC_MSG_H */
diff --git a/openair3/MESH/RRM/rrm.c b/openair3/MESH/RRM/rrm.c
deleted file mode 100644
index a16e68cf61de55f59c48359c29e94f91ddb783e4..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm.c
+++ /dev/null
@@ -1,2245 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrm.c
-
-\brief      RRM (Radio Ressource Manager )
-
-            Cette application a pour objet
-                - de gérer la ressource radio du cluster
-                - de commander le RRC pour l'ouverture de RB
-                - de recevoir des commandes du CMM
-                - de gérer le voisinage
-
-\author     BURLOT Pascal
-
-\date       10/07/08
-
-
-\par     Historique:
-        P.BURLOT 2009-01-20
-            + separation de la file de message CMM/RRM a envoyer en 2 files
-              distinctes ( file_send_cmm_msg, file_send_rrc_msg)
-            + l'envoi de message via la fifo:
-                - envoi du header
-                - puis des donnees s'il y en a
-            + reception des donnees de la fifo:
-                - copie du message dans la file d'attente des messages
-                - traitement du cas du message n'ayant pas de data (ex: response )
-        L.IACOBELLI 2009-10-19
-            + sensing database
-            + channels database
-            + new cases
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <fcntl.h>
-#include <pthread.h>
-
-#include "debug.h"
-
-#include "L3_rrc_defs.h"
-#include "L3_rrc_interface.h"
-#include "cmm_rrm_interface.h"
-#include "rrm_sock.h"
-#include "rrc_rrm_msg.h"
-#include "ip_msg.h"                 //mod_lor_10_04_27
-#include "sensing_rrm_msg.h"
-#include "cmm_msg.h"
-#include "pusu_msg.h"
-#include "msg_mngt.h"
-#include "neighbor_db.h"
-#include "rb_db.h"
-#include "sens_db.h"
-#include "channels_db.h"
-#include "transact.h"
-#include "rrm_constant.h"
-#include "rrm_util.h"
-#include "rrm.h"
-
-#include "forms.h"                  //mod_eure_lor
-#include "sensing_form.h"           //mod_eure_lor
-#include "SN_freq_form.h"           //mod_lor_10_06_01
-#include "sens_scen_2_form.h"       //mod_lor_10_11_04
-#include "all_freq_to_users_form.h" //mod_lor_10_11_04
-#include "sens_CH1_scen_2.h"        //mod_lor_10_11_04
-#include "sens_sensor.h"        //mod_lor_11_02_18
-
-
-/*
-** ----------------------------------------------------------------------------
-** DEFINE LOCAL
-** ----------------------------------------------------------------------------
-*/
-//mod_lor_10_05_18++
-/*!
-*******************************************************************************
-\brief Definition of IP @ in main entities. i.e. they have to correspond
-        to the ones in node_info vector in emul_interface.c
-*/
-static unsigned char FC_L3id [4]= {0x0A,0x00,0x01,0x01};
-static unsigned char BTS_L3id [4]= {0x0A,0x00,0x02,0x02};
-static unsigned char CH_COLL_L3id [4]= {0x0A,0x00,0x02,0x02};
-FD_sensing_form *form;
-FD_Secondary_Network_frequencies *SN_form; //mod_lor_10_06_01
-FD_sens_scen_2 *Sens_form_CH2;             //mod_lor_10_11_04
-FD_all_freq_to_users *Chann_form;          //mod_lor_10_11_04
-FD_sens_CH1_scen_2 *Sens_form_CH1;         //mod_lor_10_11_04
-FD_sens_sensor *Sens_sensor_form;          //mod_lor_11_02_18
-static int SN_waiting = 0;                 //mod_lor_10_06_02
-//mod_lor_10_05_18--
-/*
-** ----------------------------------------------------------------------------
-** DECLARATION DE NOUVEAU TYPE
-** ----------------------------------------------------------------------------
-*/
-
-/*!
-*******************************************************************************
-\brief Structure de data passe en parametre au threads
-*/
-struct data_thread {
-  char *name              ; ///< Nom du thread
-  char *sock_path_local   ; ///< fichier du "rrm->..." pour le socket Unix
-  char *sock_path_dest    ; ///< fichier du "...->rrm " pour le socket Unix
-  sock_rrm_t  s           ; ///< Descripteur du socket
-}  ;
-
-//mod_lor_10_01_25++
-struct data_thread_int {
-  char *name              ; ///< Nom du thread
-  unsigned char *sock_path_local  ; ///< local IP address for internet socket
-  int local_port          ; ///< local IP port for internet socket
-  unsigned char *sock_path_dest   ; ///< dest IP address for internet socket
-  int dest_port           ; ///< dest IP port for internet socket
-  sock_rrm_int_t  s       ; ///< Descripteur du socket
-  int instance            ; ///<instance rrm
-}  ;
-//mod_lor_10_01_25--
-
-#ifdef RRC_KERNEL_MODE
-
-#define RRC2RRM_FIFO 14
-#define RRM2RRC_FIFO 15
-
-#define RX_MSG_STARTED 0; //mod_lor_10_01_25
-/*!
-*******************************************************************************
-\brief Structure regroupant les handles des fifos pour la communication en
-       mode KERNEL
-*/
-typedef struct {
-  int rrc_2_rrm_fifo;
-  int rrm_2_rrc_fifo;
-} RRM_FIFOS;
-
-#endif /* RRC_KERNEL_MODE */
-
-/*
-** ----------------------------------------------------------------------------
-** DECLARATION DES VARIABLES GLOBALES PUBLIQUES
-** ----------------------------------------------------------------------------
-*/
-rrm_t rrm_inst[MAX_RRM] ;
-int   nb_inst = -1 ;
-
-/*
-** ----------------------------------------------------------------------------
-** DECLARATION DES VARIABLES GLOBALES PRIVEES
-** ----------------------------------------------------------------------------
-*/
-#ifdef RRC_KERNEL_MODE
-static RRM_FIFOS Rrm_fifos;
-#endif
-
-static int flag_not_exit = 1 ;
-static pthread_t pthread_recv_rrc_msg_hnd,
-       pthread_recv_cmm_msg_hnd ,
-
-       pthread_send_rrc_msg_hnd ,
-
-       pthread_send_cmm_msg_hnd ,
-
-       pthread_recv_pusu_msg_hnd ,
-       pthread_recv_sensing_msg_hnd ,
-       pthread_send_sensing_msg_hnd ,
-
-       pthread_recv_int_msg_hnd ,
-       pthread_send_ip_msg_hnd ,
-
-       pthread_ttl_hnd ;
-static unsigned int cnt_timer = 0;
-static float st_fr = 2.42e6; //mod_lor_10_06_01
-static float end_fr = 2.46e6; //mod_lor_10_06_01
-
-#ifdef TRACE
-static FILE *cmm2rrm_fd  = NULL ;
-static FILE *rrc2rrm_fd  = NULL ;
-static FILE *pusu2rrm_fd = NULL ;
-static FILE *sensing2rrm_fd = NULL ;
-static FILE *ip2rrm_fd = NULL ;
-#endif
-static FILE *output_2 = NULL; //mod_lor_10_04_20
-
-/*
-** ----------------------------------------------------------------------------
-** DECLARATION DES FONCTIONS
-** ----------------------------------------------------------------------------
-*/
-//mod_eure_lor++
-/*!
-*******************************************************************************
-\brief  function to plot the spectrum sensing results
-
-\return NULL
-*/
-
-void plot_spectra(Sens_ch_t *S, unsigned int NB_info, /*FD_sensing_form *form,*/ unsigned int sensor)
-{
-
-  float f[MAX_NUM_SB*NB_info],spec_dBm[MAX_NUM_SB*NB_info];
-  //float f[100],spec_dBm[100];
-  unsigned int tot_sub_bands = MAX_NUM_SB*NB_info;
-  unsigned int SB_BW;
-  int i, j, k=0;
-
-  //printf("nb_info %d tot sub: %d \n",NB_info, tot_sub_bands);//dbg
-  // Compute frequencies and store in f
-  for (i=0; i<NB_info ; i++) {
-    SB_BW = (S[i].Final_f-S[i].Start_f)/MAX_NUM_SB;
-
-    for (j=0; j< MAX_NUM_SB; j++) {
-      f[k]=S[i].Start_f+(SB_BW*j)+(SB_BW/2);
-      // Transfer power measurements to spec_dBm (float)
-      spec_dBm[k] = S[i].mu0[j];
-      //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-      k++;
-    }
-  }
-
-  if (sensor == 1) {
-    fl_set_xyplot_xbounds(form->spec_SN1,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(form->spec_SN1,-115,-70);
-
-    fl_set_xyplot_data(form->spec_SN1,f,spec_dBm,tot_sub_bands,"","","");
-  } else if (sensor == 2) {
-    fl_set_xyplot_xbounds(form->spec_SN2,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(form->spec_SN2,-115,-70);
-
-    fl_set_xyplot_data(form->spec_SN2,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == 3) {
-    fl_set_xyplot_xbounds(form->spec_SN3,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(form->spec_SN3,-115,-70);
-
-    fl_set_xyplot_data(form->spec_SN3,f,spec_dBm,tot_sub_bands,"","","");
-  } else
-    printf("Error! Sensor %d not considered",sensor);
-
-  fl_check_forms();
-}//mod_eure_lor--
-
-//mod_lor_10_06_01++
-/*!
-*******************************************************************************
-\brief  function to plot the selected channels
-
-\return NULL
-*/
-
-void plot_SN_channels(CHANNELS_DB_T *channels_db, unsigned int NB_info, unsigned int *selected, /*FD_Secondary_Network_frequencies *SN_form,*/ unsigned int rrm_id)
-{
-
-  float f[SB_NEEDED_FOR_SN*NB_info],spec_dBm[SB_NEEDED_FOR_SN*NB_info];
-  CHANNELS_DB_T *pCurrent;
-  //float f[100],spec_dBm[100];
-  unsigned int tot_sub_bands = SB_NEEDED_FOR_SN*NB_info;
-  unsigned int SB_BW;
-  float Start_fr, Final_fr;
-  int i, j, k=0;
-
-  //printf("nb_info %d tot sub: %d \n",NB_info, tot_sub_bands);//dbg
-  // Compute frequencies and store in f
-  for (i=0; i<NB_info ; i++) {
-    pCurrent = get_chann_db_info(channels_db,selected[i]);
-    SB_BW = (pCurrent->channel.Final_f-pCurrent->channel.Start_f)/SB_NEEDED_FOR_SN;
-
-    for (j=0; j< SB_NEEDED_FOR_SN; j++) {
-      f[k]=pCurrent->channel.Start_f+(SB_BW*j)+(SB_BW/2);
-      // Transfer power measurements to spec_dBm (float)
-      spec_dBm[k] = 1;
-      //printf ("for k = %d f: %f; spec_dBm %f\n",k,f[k], spec_dBm[k]);//dbg
-      //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-      k++;
-    }
-  }
-
-  Start_fr = st_fr;
-  Final_fr = end_fr;
-  //printf ("start: %f; end %f\n",f[0], f[k-1]);//dbg
-
-  if (rrm_id == BTS_ID) {
-    fl_set_xyplot_xbounds(SN_form->Selected_frequencies,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(SN_form->Selected_frequencies,0,2);
-
-    fl_set_xyplot_data(SN_form->Selected_frequencies,f,spec_dBm,tot_sub_bands,"","","");
-  } else if (rrm_id == FC_ID) {
-    fl_set_xyplot_xbounds(form->Secondary_Network_frequencies,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(form->Secondary_Network_frequencies,0,2);
-
-    fl_set_xyplot_data(form->Secondary_Network_frequencies,f,spec_dBm,tot_sub_bands,"","","");
-  }
-
-  fl_check_forms();
-}
-//mod_lor_10_06_01--
-
-//add_lor_10_11_04++
-/*!
-*******************************************************************************
-\brief  function to plot the spectrum sensing results in cluster 1
-
-\return NULL
-*/
-void plot_spectra_CH1(Sens_ch_t *S, unsigned int NB_info, /*FD_sens_CH1_scen_2 *Sens_form_CH1,*/ int sensor)
-{
-
-  float f[MAX_NUM_SB*NB_info],spec_dBm[MAX_NUM_SB*NB_info];
-  //float f[100],spec_dBm[100];
-  unsigned int tot_sub_bands = MAX_NUM_SB*NB_info;
-  unsigned int SB_BW;
-  int i, j, k=0;
-
-  //printf("nb_info %d tot sub: %d \n",NB_info, tot_sub_bands);//dbg
-  // Compute frequencies and store in f
-  if (sensor!=-1) {
-    for (i=0; i<NB_info ; i++) {
-      SB_BW = (S[i].Final_f-S[i].Start_f)/MAX_NUM_SB;
-
-      for (j=0; j< MAX_NUM_SB; j++) {
-        f[k]=S[i].Start_f+(SB_BW*j)+(SB_BW/2);
-        // Transfer power measurements to spec_dBm (float)
-        spec_dBm[k] = S[i].mu0[j];
-        //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-        k++;
-      }
-    }
-  } else {
-    for (i=0; i<NB_info ; i++) {
-      SB_BW = (S[i].Final_f-S[i].Start_f)/MAX_NUM_SB;
-
-      for (j=0; j< MAX_NUM_SB; j++) {
-        f[k]=S[i].Start_f+(SB_BW*j)+(SB_BW/2);
-        // Transfer power measurements to spec_dBm (float)
-        spec_dBm[k] = (S[i].is_free[j]+1)%2;
-        //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-        k++;
-      }
-    }
-  }
-
-  if (sensor == 1) {
-    fl_set_xyplot_xbounds(Sens_form_CH1->User_1_sens,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH1->User_1_sens,-115,-70);
-
-    fl_set_xyplot_data(Sens_form_CH1->User_1_sens,f,spec_dBm,tot_sub_bands,"","","");
-
-  } else if (sensor == 2) {
-    fl_set_xyplot_xbounds(Sens_form_CH1->User_2_sens,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH1->User_2_sens,-115,-70);
-
-    fl_set_xyplot_data(Sens_form_CH1->User_2_sens,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == 3) {
-    fl_set_xyplot_xbounds(Sens_form_CH1->User_3_sens,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH1->User_3_sens,-115,-70);
-
-    fl_set_xyplot_data(Sens_form_CH1->User_3_sens,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == 4) {
-    fl_set_xyplot_xbounds(Sens_form_CH1->User_4_sens,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH1->User_4_sens,-115,-70);
-
-    fl_set_xyplot_data(Sens_form_CH1->User_4_sens,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == -1) {
-    fl_set_xyplot_xbounds(Sens_form_CH1->Cluster_2_sensing,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH1->Cluster_2_sensing,0,2);
-
-    fl_set_xyplot_data(Sens_form_CH1->Cluster_2_sensing,f,spec_dBm,tot_sub_bands,"","","");
-  } else
-    printf("Error! Sensor %d not considered",sensor);
-
-  fl_check_forms();
-}
-
-/*!
-*******************************************************************************
-\brief  function to plot the spectrum sensing results of collaborative cluster 2
-
-\return NULL
-*/
-void plot_spectra_CH2(Sens_ch_t *S, unsigned int NB_info, /*FD_sensing_form *form,*/ unsigned int sensor)
-{
-
-  float f[MAX_NUM_SB*NB_info],spec_dBm[MAX_NUM_SB*NB_info];
-  //float f[100],spec_dBm[100];
-  unsigned int tot_sub_bands = MAX_NUM_SB*NB_info;
-  unsigned int SB_BW;
-  int i, j, k=0;
-
-  for (i=0; i<NB_info ; i++) {
-    SB_BW = (S[i].Final_f-S[i].Start_f)/MAX_NUM_SB;
-
-    for (j=0; j< MAX_NUM_SB; j++) {
-      f[k]=S[i].Start_f+(SB_BW*j)+(SB_BW/2);
-      // Transfer power measurements to spec_dBm (float)
-      spec_dBm[k] = S[i].mu0[j];
-      //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-      k++;
-    }
-  }
-
-  if (sensor == 1) {
-    fl_set_xyplot_xbounds(Sens_form_CH2->User_1,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH2->User_1,-115,-70);
-
-    fl_set_xyplot_data(Sens_form_CH2->User_1,f,spec_dBm,tot_sub_bands,"","","");
-  } else if (sensor == 2) {
-    fl_set_xyplot_xbounds(Sens_form_CH2->User_2,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH2->User_2,-115,-70);
-
-    fl_set_xyplot_data(Sens_form_CH2->User_2,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == 3) {
-    fl_set_xyplot_xbounds(Sens_form_CH2->User_3,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH2->User_3,-115,-70);
-
-    fl_set_xyplot_data(Sens_form_CH2->User_3,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == 4) {
-    fl_set_xyplot_xbounds(Sens_form_CH2->User_4,(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH2->User_4,-115,-70);
-
-    fl_set_xyplot_data(Sens_form_CH2->User_4,f,spec_dBm,tot_sub_bands,"","","");
-  } else
-    printf("Error! Sensor %d not considered",sensor);
-
-  fl_check_forms();
-}
-
-/*!
-*******************************************************************************
-\brief  function to plot the attributed channel
-
-\return NULL
-*/
-
-void plot_all_chann_scen_2(unsigned int *tx, unsigned int *chann_start, unsigned int *chann_end, unsigned int NB_info, unsigned int rrm_id)
-{
-
-  float Start_fr, Final_fr;
-
-  float f[SB_NEEDED_FOR_SN*NB_info], spec_dBm[SB_NEEDED_FOR_SN*NB_info];
-  Start_fr = st_fr;
-  Final_fr = end_fr;
-
-  unsigned int tot_sub_bands = SB_NEEDED_FOR_SN*NB_info;
-  unsigned int SB_BW ;
-
-  int i, j, k=0;
-
-  // Compute frequencies and store in f
-  for (i=0; i<NB_info ; i++) {
-    SB_BW = (chann_end[i]-chann_start[i])/SB_NEEDED_FOR_SN;
-
-    for (j=0; j< SB_NEEDED_FOR_SN; j++) {
-      f[k]=chann_start[i]+(SB_BW*j)+(SB_BW/2);
-
-      if (tx[i]==1)
-        spec_dBm[k] = 2;
-      else
-        spec_dBm[k] = 1;
-
-      k++;
-    }
-  }
-
-  //printf ("start: %f; end %f\n",f[0], f[k-1]);//dbg
-
-  if (rrm_id == 1) {
-    fl_set_xyplot_xbounds(Chann_form->User_1_channels,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(Chann_form->User_1_channels,0,3);
-    fl_set_xyplot_data(Chann_form->User_1_channels,f,spec_dBm,tot_sub_bands,"","","");
-
-  } else if (rrm_id == 2) {
-    fl_set_xyplot_xbounds(Chann_form->User_2_channels,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(Chann_form->User_2_channels,0,3);
-    fl_set_xyplot_data(Chann_form->User_2_channels,f,spec_dBm,tot_sub_bands,"","","");
-
-  } else if (rrm_id == 3) {
-    fl_set_xyplot_xbounds(Chann_form->User_3_channels,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(Chann_form->User_3_channels,0,3);
-    fl_set_xyplot_data(Chann_form->User_3_channels,f,spec_dBm,tot_sub_bands,"","","");
-
-  } else if (rrm_id == 4) {
-    fl_set_xyplot_xbounds(Chann_form->User_4_channels,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(Chann_form->User_4_channels,0,3);
-    fl_set_xyplot_data(Chann_form->User_4_channels,f,spec_dBm,tot_sub_bands,"","","");
-
-  } else
-    printf("Error! User %d not considered",rrm_id);
-
-  fl_check_forms();
-}
-//add_lor_10_11_04--
-
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des ttl des transactions (rrc ou cmm).
-
-\return NULL
-*/
-static void * thread_processing_ttl (
-  void * p_data /**< parametre du pthread */
-)
-{
-  int ii ;
-  fprintf(stderr,"TTL :starting ... \n");
-  fflush(stdout);
-
-  while ( flag_not_exit) {
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      rrm_t *rrm = &rrm_inst[ii] ;
-
-      pthread_mutex_lock(   &( rrm->cmm.exclu )  ) ;
-      dec_all_ttl_transact( rrm->cmm.transaction ) ;
-      // Trop simpliste et pas fonctionnel , il faut faire une gestion des erreurs de transaction
-      //if (rrm->cmm.transaction!=NULL)
-      //  fprintf(stderr,"delete on cmm of %d\n", ii); //dbg
-      del_all_obseleted_transact( &(rrm->cmm.transaction));
-      pthread_mutex_unlock( &( rrm->cmm.exclu )  ) ;
-
-      pthread_mutex_lock(   &( rrm->rrc.exclu )  ) ;
-      dec_all_ttl_transact( rrm->rrc.transaction ) ;
-      // idem :commentaire ci-dessus
-      //if (rrm->rrc.transaction!=NULL)
-      //  fprintf(stderr,"delete on rrc of %d\n", ii); //dbg
-      del_all_obseleted_transact( &(rrm->rrc.transaction));
-      pthread_mutex_unlock( &( rrm->rrc.exclu )  ) ;
-
-      pthread_mutex_lock(   &( rrm->pusu.exclu )  ) ;
-      dec_all_ttl_transact( rrm->pusu.transaction ) ;
-      // idem :commentaire ci-dessus
-      del_all_obseleted_transact( &(rrm->pusu.transaction));
-      pthread_mutex_unlock( &( rrm->pusu.exclu )  ) ;
-
-      pthread_mutex_lock(   &( rrm->sensing.exclu )  ) ;
-      dec_all_ttl_transact( rrm->sensing.transaction ) ;
-      // idem :commentaire ci-dessus
-      del_all_obseleted_transact( &(rrm->sensing.transaction));
-      pthread_mutex_unlock( &( rrm->sensing.exclu )  ) ;
-
-      //mod_lor_10_01_25++
-      pthread_mutex_lock(   &( rrm->ip.exclu )  ) ;
-      dec_all_ttl_transact( rrm->ip.transaction ) ;
-      // idem :commentaire ci-dessus
-      del_all_obseleted_transact( &(rrm->ip.transaction));
-      pthread_mutex_unlock( &( rrm->ip.exclu )  ) ;
-      //mod_lor_10_01_25--*/
-
-    }
-
-    cnt_timer++;
-    usleep( 2000*1000 ) ;//mod_lor_10_03_01: incrementing timeout
-  }
-
-  fprintf(stderr,"... stopped TTL\n");
-  fflush(stdout);
-  return NULL;
-
-}
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages sortants sur les sockets (rrc ou cmm).
-
-\return NULL
-*/
-static void * thread_send_msg_cmm (
-  void * p_data /**< parametre du pthread */
-)
-{
-  int ii ;
-  int no_msg ;
-  fprintf(stderr,"Thread Send Message: starting ... \n");
-  fflush(stderr);
-  file_msg_t *pItem ;
-
-  while ( flag_not_exit) {
-    no_msg = 0  ;
-
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      rrm_t      *rrm = &rrm_inst[ii] ;
-
-      pItem = get_msg( &(rrm->file_send_cmm_msg) ) ;
-
-
-      if ( pItem == NULL )
-        no_msg++;
-      else {
-        int r =  send_msg( pItem->s, pItem->msg );
-        WARNING(r!=0);
-      }
-
-      RRM_FREE( pItem ) ;
-    }
-
-    if ( no_msg==nb_inst ) // Pas de message
-      usleep(1000);
-  }
-
-  fprintf(stderr,"... stopped Thread Send Message\n");
-  fflush(stderr);
-  return NULL;
-}
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages sortants sur les sockets (rrc ou cmm).
-
-\return NULL
-*/
-static void * thread_send_msg_rrc (
-  void * p_data /**< parametre du pthread */
-)
-{
-  int ii ;
-
-  int no_msg ;
-  fprintf(stderr,"Thread Send Message To RRC: starting ... \n");
-  fflush(stderr);
-  file_msg_t *pItem ;
-
-  while ( flag_not_exit) {
-    no_msg = 0  ;
-
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      rrm_t      *rrm = &rrm_inst[ii] ;
-
-      pItem = get_msg( &(rrm->file_send_rrc_msg) ) ;
-
-
-      if ( pItem == NULL )
-        no_msg++;
-      else {
-
-#ifdef RRC_KERNEL_MODE
-        // envoi du header
-        status = write (Rrm_fifos.rrm_2_rrc_fifo,(char*) pItem->msg, sizeof(msg_head_t) );
-
-        if ( pItem->msg->head.size >0)
-          status = write (Rrm_fifos.rrm_2_rrc_fifo,(pItem->msg)->data, pItem->msg->head.size);
-
-        //printf( "status write: %d \n",status);
-        //printf("send msg to rrc [%d] id msg: %d \n", (pItem->msg)->head.inst, (pItem->msg)->head.msg_type );
-#else
-        int r =  send_msg( pItem->s, pItem->msg );
-        WARNING(r!=0);
-#endif
-      }
-
-      RRM_FREE( pItem ) ;
-    }
-
-    if ( no_msg==nb_inst ) // Pas de message
-      usleep(1000);
-  }
-
-  fprintf(stderr,"... stopped Thread Send Message\n");
-  fflush(stderr);
-  return NULL;
-}
-
-//mod_lor_10_01_25++
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages sortants sur les sockets (rrc ou cmm).
-
-\return NULL
-*/
-static void * thread_send_msg_ip (
-  void * p_data /**< parametre du pthread */
-)
-{
-  int ii ;
-  int no_msg ;
-  fprintf(stderr,"Thread Send Message IP: starting ... \n");
-  fflush(stderr);
-  file_msg_t *pItem ;
-
-  while ( flag_not_exit) {
-    no_msg = 0  ;
-
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      rrm_t      *rrm = &rrm_inst[ii] ;
-
-      pItem = get_msg( &(rrm->file_send_ip_msg) ) ;
-
-
-      if ( pItem == NULL )
-        no_msg++;
-      else {
-        // fprintf(stderr,"Thread Send Message inst %d socket %d msg_type = %d dest %X\n", ii, rrm->ip.s->s,pItem->msg->head.msg_type, rrm->ip.s->in_dest_addr.sin_addr.s_addr); //dbg
-        //fprintf(stderr,"dest in msg%X\n\n\n\n",  pItem->s_int->in_dest_addr.sin_addr.s_addr); //dbg
-
-
-        // if (pItem->msg->head.msg_type == 26)
-        //   msg_fct( "IP -> UPDATE_SENSING_RESULTS_3 inst: %d sockid %d\n", ii, rrm->ip.s->s);//dbg
-        //printf("T4b:ok user %d msg %d\n", rrm->id,pItem->msg->head.msg_type);//dbg
-        int r =  send_msg_int( rrm->ip.s, pItem->msg );
-        //printf("T5b:ok r: %d\n",r);//dbg
-
-        WARNING(r!=0);
-      }
-
-      RRM_FREE( pItem ) ;
-    }
-
-    if ( no_msg==nb_inst ) // Pas de message
-      usleep(1000);
-  }
-
-  fprintf(stderr,"... stopped Thread Send Message\n");
-  fflush(stderr);
-  return NULL;
-}
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages sortants sur les sockets (rrc ou cmm).
-
-\return NULL
-*/
-static void * thread_send_msg_sensing (
-  void * p_data /**< parametre du pthread */
-)
-{
-  int ii ;
-
-  int no_msg ;
-  fprintf(stderr,"Thread Send Message To Sensing Unit: starting ... \n");
-  fflush(stderr);
-  file_msg_t *pItem ;
-
-  while ( flag_not_exit) {
-    no_msg = 0  ;
-
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      rrm_t      *rrm = &rrm_inst[ii] ;
-
-      pItem = get_msg( &(rrm->file_send_sensing_msg) ) ;
-
-
-      if ( pItem == NULL )
-        no_msg++;
-      else {
-        int r =  send_msg( pItem->s, pItem->msg );
-        WARNING(r!=0);
-
-      }
-
-      RRM_FREE( pItem ) ;
-    }
-
-    if ( no_msg==nb_inst ) // Pas de message
-      usleep(1000);
-  }
-
-  fprintf(stderr,"... stopped Thread Send Message\n");
-  fflush(stderr);
-  return NULL;
-}
-
-//mod_lor_10_01_25--*/
-
-
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages entrant sur une interface (rrc, cmm ou sensing).
-
-\return NULL
-*/
-
-static void * thread_recv_msg (
-  void * p_data /**< parametre du pthread */
-)
-{
-  msg_t *msg ;
-  struct data_thread *data = (struct data_thread *) p_data;
-  int sock ;
-
-  fprintf(stderr,"%s interfaces :starting ... %s %s\n",data->name , data->sock_path_local, data->sock_path_dest);
-  fflush(stderr);
-
-  /* ouverture des liens de communications */
-  sock = open_socket( &data->s,  data->sock_path_local, data->sock_path_dest ,0 );
-
-  if ( sock != -1 ) {
-    fprintf(stderr,"   %s -> socket =  %d\n",data->name , sock );
-    fflush(stderr);
-
-    while (flag_not_exit) {
-      msg = (msg_t *) recv_msg(&data->s) ;
-
-      if (msg == NULL ) {
-        fprintf(stderr,"Server closed connection\n");
-        flag_not_exit = 0;
-      } else {
-        int inst = msg->head.inst ;
-        rrm_t      *rrm = &rrm_inst[inst];
-
-        put_msg( &(rrm->file_recv_msg), 0, &data->s, msg) ;//mod_lor_10_01_25
-      }
-    }
-
-    close_socket(&data->s) ;
-  }
-
-  fprintf(stderr,"... stopped %s interfaces\n",data->name);
-  return NULL;
-}
-
-//mod_lor_10_01_25++
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages entrant via ip.
-
-\return NULL
-*/
-
-static void * thread_recv_msg_int (
-  void * p_data /**< parametre du pthread */
-)
-{
-  msg_t *msg ;
-  struct data_thread_int *data = (struct data_thread_int *) p_data;
-  rrm_t      *rrm = &rrm_inst[data->instance];
-  int sock ;
-
-  fprintf(stderr,"%s interfaces :starting on inst. %d ... ",data->name, data->instance  );
-  fprintf(stderr,"\n");
-
-  fflush(stderr);
-
-  /* ouverture des liens de communications */
-  sock = open_socket_int( &data->s,  data->sock_path_local, data->local_port, data->sock_path_dest, data->dest_port,0 );
-  data->s.s = sock;
-  memcpy(rrm->ip.s, &(data->s), sizeof(sock_rrm_int_t));
-  //fprintf(stderr,"IP dest %X \n", rrm->ip.s->in_dest_addr.sin_addr.s_addr);//dbg
-
-  if ( sock != -1 ) {
-    fprintf(stderr,"   %s -> socket =  %d\n",data->name , sock );
-    fflush(stderr);
-
-    while (flag_not_exit) {
-
-      msg = (msg_t *) recv_msg_int(rrm->ip.s) ;
-
-      if (msg == NULL ) {
-        fprintf(stderr,"Server closed connection\n");
-        flag_not_exit = 0;
-      } else {
-        //fprintf(stdout,"Ip dest in FC  when received msg %X\n",rrm_inst[0].ip.s->in_dest_addr.sin_addr.s_addr); //dbg
-        //printf(stderr,"msg received from %X \n", rrm->ip.s->in_dest_addr.sin_addr.s_addr);//dbg
-        put_msg( &(rrm->file_recv_msg), 1, &data->s, msg) ;
-        //fprintf(stdout,"Ip dest in FC after put_msg %X\n",rrm_inst[0].ip.s->in_dest_addr.sin_addr.s_addr); //dbg
-
-      }
-    }
-
-    close_socket_int(&data->s) ;
-  }
-
-  fprintf(stderr,"... stopped %s interfaces\n",data->name);
-  return NULL;
-}
-//mod_lor_10_01_25--
-
-/*******************************************************************************/
-#ifdef RRC_KERNEL_MODE
-char Header_buf[sizeof(msg_head_t)];
-char Data[2400];
-unsigned short  Header_read_idx=0,
-                Data_read_idx=0,
-                Data_to_read=0,
-                Header_size=sizeof(msg_head_t),
-                READ_OK=1;
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages entrant sur l'interface fifo du RRC
-        en mode KERNEL
-
-\return NULL
-*/
-static void * thread_recv_msg_fifo (void * p_data )
-{
-  msg_t      *msg_cpy   ;
-  rrm_t      *rrm       ;
-  msg_head_t *Header    ;
-  int         taille    ;
-  int         inst      ;
-  int         bytes_read;
-
-  msg_fifo("[RRM]: RX MSG_FIFOS %d handler starting....\n",RRC2RRM_FIFO);
-
-  while (flag_not_exit) {
-    if(Header_read_idx < Header_size) {
-      bytes_read = read(Rrm_fifos.rrc_2_rrm_fifo,&Data[Header_read_idx],Header_size-Header_read_idx);
-
-      if(bytes_read <0)
-        continue;
-
-      Header_read_idx+=bytes_read;
-      msg_fifo("[RRM]: RX MSG ON FIFOS %d: Header size %d, bytes_read %d\n",RRC2RRM_FIFO,Header_read_idx,bytes_read);
-
-      if(Header_read_idx == Header_size) {
-        Header=(msg_head_t*)Data;
-        Data_to_read=Header->size;
-        Data_read_idx=Header_read_idx;
-        msg_fifo("[RRM]: RX MSG ON FIFOS %d: Header read completed, Data size %d\n",RRC2RRM_FIFO,Data_to_read);
-        Header = (msg_head_t *) Data;
-      } else
-        continue;
-    }
-
-    if (Data_to_read > 0 ) {
-      bytes_read = read (Rrm_fifos.rrc_2_rrm_fifo,&Data[Data_read_idx],Data_to_read);
-
-      if(bytes_read <0)
-        continue;
-
-      Data_to_read-=bytes_read;
-      Data_read_idx+=bytes_read;
-      msg_fifo("[RRM]: RX MSG ON FIFOS %d: data size %d\n",RRC2RRM_FIFO,Data_read_idx-Header_read_idx);
-
-      if(Data_to_read > 0 )
-        continue;
-
-      Header_read_idx= 0 ;
-      Data_read_idx  = 0 ;
-      Data_to_read   = 0 ;
-      taille         = Header->size + sizeof(msg_head_t) ;
-      msg_cpy        = RRM_MALLOC( msg_t, taille ) ;
-      inst           = Header->inst ;
-      rrm            = &rrm_inst[inst];
-
-      memcpy( msg_cpy, Data , taille ) ;
-      msg_fifo("[RRM]: RX MSG ON FIFOS %d: data read completed, Proccess on inst .... %d\n",RRC2RRM_FIFO,inst);
-      put_msg( &(rrm->file_recv_msg), 0, rrm->rrc.s, msg_cpy) ; //mod_lor_10_01_25
-      msg_fifo("[RRM]: RX MSG ON FIFOS %d: data read completed, Proccess on inst done %d\n",RRC2RRM_FIFO,inst);
-    } else {
-      /* Seulement le header */
-      Header_read_idx= 0 ;
-      Data_read_idx  = 0 ;
-      Data_to_read   = 0 ;
-      taille         = sizeof(msg_head_t) ;
-      msg_cpy        = RRM_MALLOC( msg_t, taille ) ;
-      inst           = Header->inst ;
-      rrm            = &rrm_inst[inst];
-
-      memcpy( msg_cpy, Data , taille ) ;
-      put_msg( &(rrm->file_recv_msg), 0, rrm->rrc.s, msg_cpy) ;//mod_lor_10_01_25
-    }
-  }
-
-  return NULL;
-}
-#endif
-/*!
-*******************************************************************************
-\brief  traitement des messages entrant sur l'interface CMM
-
-\return Auncune valeur
-*/
-static void processing_msg_cmm(
-  rrm_t       *rrm        , ///< Donnee relative a une instance du RRM
-  msg_head_t  *header     , ///< Entete du message
-  char        *msg        , ///< Message recu
-  int         len_msg       ///< Longueur du message
-)
-{
-#ifdef TRACE
-
-  if ( header->msg_type < NB_MSG_CMM_RRM )
-    fprintf(cmm2rrm_fd,"%lf CMM->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_cmm_rrm[header->msg_type], header->msg_type,header->Trans_id);
-  else
-    fprintf(cmm2rrm_fd,"%lf CMM->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id);
-
-  fflush(cmm2rrm_fd);
-#endif
-
-  switch ( header->msg_type ) {
-  case CMM_CX_SETUP_REQ: {
-    cmm_cx_setup_req_t *p = (cmm_cx_setup_req_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_CX_SETUP_REQ\n",header->inst);
-
-    if ( cmm_cx_setup_req(header->inst,p->Src,p->Dst,p->QoS_class,header->Trans_id ) ) {
-      /* RB_ID = 0xFFFF => RB error */
-      put_msg( &(rrm->file_send_cmm_msg), 0,
-               rrm->cmm.s, msg_rrm_cx_setup_cnf(header->inst,0xFFFF , header->Trans_id )) ;//mod_lor_10_01_25
-    }
-  }
-  break ;
-
-  case CMM_CX_MODIFY_REQ: {
-    cmm_cx_modify_req_t *p = (cmm_cx_modify_req_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_CX_MODIFY_REQ\n",header->inst);
-    cmm_cx_modify_req(header->inst,p->Rb_id,p->QoS_class,header->Trans_id )  ;
-  }
-  break ;
-
-  case CMM_CX_RELEASE_REQ : {
-    cmm_cx_release_req_t *p = (cmm_cx_release_req_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_CX_RELEASE_REQ\n",header->inst);
-    cmm_cx_release_req(header->inst,p->Rb_id,header->Trans_id )  ;
-  }
-  break ;
-
-  case CMM_CX_RELEASE_ALL_REQ : {
-    //cmm_cx_release_all_req_t *p = (cmm_cx_release_all_req_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_CX_RELEASE_ALL_REQ\n",header->inst);
-  }
-  break ;
-
-  case CMM_ATTACH_CNF : { ///< The thread that allows
-    cmm_attach_cnf_t *p = (cmm_attach_cnf_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_ATTACH_CNF\n",header->inst);
-
-    //mod_lor_10_01_25++
-#ifndef    RRC_EMUL
-
-    if (rrm->ip.s->s == -1) {
-      //mod_lor_10_05_06++
-      unsigned char tmp [4];
-      /*for (int i=0; i<10;i++ )
-          if (memcmp( &(node_info[i].L2_id), &(p->L2_id), sizeof(L2_ID) )){
-              fprintf(stderr,"Inst. to connect with %d\n",i);
-              break;
-          }//memcpy()*/
-
-      //mod_lor_10_05_18++: destination addresses depends on
-      //scenario and on role, they are declared at beginning of file
-      if (SCEN_2_CENTR && rrm->id >= FIRST_SECOND_CLUSTER_USER_ID) { //mod_lor_11_01_06
-        tmp[0]=CH_COLL_L3id[0];
-        tmp[1]=CH_COLL_L3id[1];
-        tmp[2]=CH_COLL_L3id[2];
-        tmp[3]=CH_COLL_L3id[3];
-      } else if (rrm->id == 5) {
-        tmp[0]=BTS_L3id[0];
-        tmp[1]=BTS_L3id[1];
-        tmp[2]=BTS_L3id[2];
-        tmp[3]=BTS_L3id[3];
-      } else {
-        tmp[0]=FC_L3id[0];
-        tmp[1]=FC_L3id[1];
-        tmp[2]=FC_L3id[2];
-        tmp[3]=FC_L3id[3];
-      }//mod_lor_10_05_18--
-
-      //unsigned char tmp [4]={0x0A,0x00,0x01,0x01};
-      /*fprintf(stderr,"IP_addr :");//dbg //mod_lor_10_05_06
-      for (int i=0;i<4;i++)//dbg
-          fprintf(stderr," %X",tmp[i]);//dbg
-      fprintf(stderr,"\n");//dbg*/
-
-      //mod_lor_10_05_06--
-      fprintf(stderr,"IP interface starting inst. %d\n",rrm->id);
-
-      if (rrm->id != 5) {
-        int sock = open_socket_int(rrm->ip.s, p->L3_info, 0, tmp, 0, header->inst);
-
-        if ( sock != -1 ) {
-          fprintf(stderr,"   Ip -> socket =  %d\n", rrm->ip.s->s );
-          fflush(stderr);
-        } else
-          fprintf(stderr," Error in IP socket opening \n");
-      }
-    } else
-      fprintf(stderr," Socket IP for inst %d already opened %d \n",rrm->id,rrm->ip.s->s);
-
-#endif            //mod_lor_10_01_25--*/
-
-    cmm_attach_cnf( header->inst, p->L2_id, p->L3_info_t, p->L3_info, header->Trans_id ) ;
-  }
-  break ;
-
-  case CMM_INIT_MR_REQ : {
-    msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_MR_REQ ????\n",header->inst);
-  }
-  break ;
-
-  case CMM_INIT_CH_REQ : {
-    cmm_init_ch_req_t *p = (cmm_init_ch_req_t *) msg ;
-    //mod_lor_10_03_01++
-
-    struct data_thread_int DataIp;
-
-    DataIp.name = "IP"             ; ///< Nom du thread
-    DataIp.sock_path_local=p->L3_info;///< local IP address for internet socket
-    DataIp.local_port = 7000          ; ///< local IP port for internet socket
-
-    //mod_lor_10_03_01++: setting for topology with FC and BTS on instances 0 and 1
-    //mod_lor_10_05_18++
-    if (rrm->role == FUSIONCENTER) {
-      if (SCEN_1)
-        DataIp.sock_path_dest = BTS_L3id ; ///< dest IP address for internet socket
-      else if (SCEN_2_CENTR)
-        DataIp.sock_path_dest = CH_COLL_L3id ; ///< dest IP address for internet socket
-    } else if (rrm->role == BTS ||rrm->role == CH_COLL) { //mod_lor_10_04_27
-      DataIp.sock_path_dest = FC_L3id  ; ///< dest IP address for internet socket
-    } else
-      fprintf (stderr, "wrong node role %d \n", rrm->role);
-
-    //mod_lor_10_05_18--
-    //mod_lor_10_03_01--
-    DataIp.dest_port = 0          ; ///< dest IP port for internet socket
-    DataIp.s.s = -1      ;
-    DataIp.instance = rrm->id;
-    //fprintf(stderr,"L3_local ");//dbg
-    //print_L3_id( IPv4_ADDR,  rrm->L3_info );
-    //fprintf(stderr,"\n");//dbg
-
-    int ret = pthread_create ( &pthread_recv_int_msg_hnd, NULL, thread_recv_msg_int , &DataIp );
-
-    if (ret) {
-      fprintf (stderr, "%s", strerror (ret));
-      exit(-1) ;
-    }
-
-    sleep(5);
-    //mod_lor_10_03_01--
-    cmm_init_ch_req(header->inst,p->L3_info_t,&(p->L3_info[0]));
-    msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_CH_REQ\n",header->inst);
-
-  }
-  break ;
-
-  case CMM_INIT_SENSING : {
-    cmm_init_sensing_t *p = (cmm_init_sensing_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_SENSING\n",header->inst);
-    rrm->sensing.sens_active=1;//mod_lor_10_05_07
-    //st_fr = p->Start_fr; //mod_lor_10_06_01
-    //end_fr = p->Stop_fr; //mod_lor_10_06_01
-    cmm_init_sensing(header->inst,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf,
-                     p->Nb_channels, p->Overlap,p->Sampl_freq);
-
-  }
-  break ;
-
-  case CMM_INIT_COLL_SENSING : { //add_lor_10_11_08
-    cmm_init_coll_sensing_t *p = (cmm_init_coll_sensing_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_COLL_SENSING\n",header->inst);
-    rrm->sensing.sens_active=1;
-    cmm_init_coll_sensing(header->inst,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf,
-                          p->Nb_channels, p->Overlap,p->Sampl_freq);
-
-  }
-  break ;
-
-  case CMM_STOP_SENSING : {
-    msg_fct( "[CMM]>[RRM]:%d:CMM_STOP_SENSING\n",rrm->id);
-    rrm->sensing.sens_active=0;//mod_lor_10_05_07
-    //print_sens_db(rrm->rrc.pSensEntry);//dbg
-    cmm_stop_sensing(header->inst);
-  }
-  break ;
-
-  case CMM_ASK_FREQ : {
-    msg_fct( "[CMM]>[RRM]:%d:CMM_ASK_FREQ\n",header->inst);
-    cmm_ask_freq(header->inst);
-  }
-  break ;
-
-  case CMM_NEED_TO_TX : { //add_lor_10_10_28
-    cmm_need_to_tx_t *p = (cmm_need_to_tx_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_NEED_TO_TX\n",header->inst);
-    cmm_need_to_tx(header->inst, p->dest,p->QoS_class);
-  }
-  break ;
-
-  case CMM_USER_DISC : { //add_lor_10_11_08
-    msg_fct( "[CMM]>[RRM]:%d:CMM_USER_DISC\n",header->inst);
-    cmm_user_disc(header->inst);
-  }
-  break ;
-
-  case CMM_LINK_DISC : { //add_lor_10_11_09
-    cmm_link_disk_t *p = (cmm_link_disk_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_LINK_DISC with user %d\n",header->inst, p->dest);
-    cmm_link_disc(header->inst, p->dest);
-  }
-  break ;
-
-  default :
-    fprintf(stderr,"CMM:\n") ;
-    printHex(msg,len_msg,1) ;
-  }
-}
-/*!
-*******************************************************************************
-\brief  traitement des messages entrant sur l'interface RRC
-
-\return Aucune valeur
-*/
-static void processing_msg_rrc(
-  rrm_t *rrm          , ///< Donnee relative a une instance du RRM
-  msg_head_t *header  , ///< Entete du message
-  char *msg           , ///< Message recu
-  int len_msg           ///< Longueur du message
-)
-{
-#ifdef TRACE
-
-  if ( header->msg_type < NB_MSG_RRC_RRM )
-    fprintf(rrc2rrm_fd,"%lf RRC->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_rrc_rrm[header->msg_type],header->msg_type,header->Trans_id);
-  else
-    fprintf(rrc2rrm_fd,"%lf RRC->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id);
-
-  fflush(rrc2rrm_fd);
-#endif
-
-  switch ( header->msg_type ) {
-  case RRC_RB_ESTABLISH_RESP: {
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_ESTABLISH_RESP %d \n",header->inst, header->Trans_id );
-    rrc_rb_establish_resp(header->inst,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_RB_ESTABLISH_CFM: {
-    rrc_rb_establish_cfm_t *p = (rrc_rb_establish_cfm_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_ESTABLISH_CFM (%d)  %d \n",header->inst,p->Rb_id, header->Trans_id);
-    rrc_rb_establish_cfm(header->inst,p->Rb_id,p->RB_type,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_RB_MODIFY_RESP: {
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MODIFY_RESP  %d \n",header->inst, header->Trans_id);
-    rrc_rb_modify_resp(header->inst,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_RB_MODIFY_CFM: {
-    rrc_rb_modify_cfm_t *p = (rrc_rb_modify_cfm_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MODIFY_CFM (%d) %d \n",header->inst,p->Rb_id, header->Trans_id);
-    rrc_rb_modify_cfm(header->inst,p->Rb_id,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_RB_RELEASE_RESP: {
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_RELEASE_RESP %d \n",header->inst, header->Trans_id);
-    rrc_rb_release_resp(header->inst,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_MR_ATTACH_IND : {
-    rrc_MR_attach_ind_t *p = (rrc_MR_attach_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_MR_ATTACH_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id);
-    rrc_MR_attach_ind(header->inst,p->L2_id) ;
-  }
-  break ;
-
-  case RRC_SENSING_MEAS_RESP: {
-    msg_fct( "[RRC]>[RRM]:%d:RRC_SENSING_MEAS_RESP %d \n",header->inst, header->Trans_id);
-    rrc_sensing_meas_resp(header->inst,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_CX_ESTABLISH_IND: {
-    rrc_cx_establish_ind_t *p = (rrc_cx_establish_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_CX_ESTABLISH_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id);
-
-    rrc_cx_establish_ind(header->inst,p->L2_id,header->Trans_id,
-                         p->L3_info,p->L3_info_t,
-                         p->DTCH_B_id,p->DTCH_id) ;
-
-    //mod_lor_10_01_25++
-    if (rrm->state == MESHROUTER) {
-      memcpy(rrm->L3_info_corr,p->L3_info, IPv4_ADDR);
-
-    }
-
-    //mod_lor_10_01_25--*/
-  }
-  break ;
-
-  case RRC_PHY_SYNCH_TO_MR_IND : {
-    rrc_phy_synch_to_MR_ind_t *p = (rrc_phy_synch_to_MR_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_MR_IND.... (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id);
-    rrc_phy_synch_to_MR_ind(header->inst,p->L2_id) ;
-    //msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_MR_IND Done\n",header->inst);
-  }
-  break ;
-
-  case RRC_PHY_SYNCH_TO_CH_IND : {
-    rrc_phy_synch_to_CH_ind_t *p = (rrc_phy_synch_to_CH_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_CH_IND.... %d (Node %02d) %d \n",header->inst, p->Ch_index, p->L2_id.L2_id[0], header->Trans_id);
-    rrc_phy_synch_to_CH_ind(header->inst,p->Ch_index,p->L2_id ) ;
-    //msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_CH_IND Done\n",header->inst);
-
-  }
-  break ;
-
-  case RRC_SENSING_MEAS_IND : {
-    rrc_sensing_meas_ind_t *p  = (rrc_sensing_meas_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_SENSING_MEAS_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id);
-    rrc_sensing_meas_ind( header->inst,p->L2_id, p->NB_meas, p->Sensing_meas, header->Trans_id );
-  }
-  break ;
-
-  case RRC_RB_MEAS_IND : {
-    rrc_rb_meas_ind_t *p  = (rrc_rb_meas_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MEAS_IND (Noede %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id);
-    rrc_rb_meas_ind( header->inst, p->Rb_id, p->L2_id, p->Meas_mode, p->Mac_rlc_meas, header->Trans_id );
-  }
-  break ;
-
-
-  case RRC_INIT_SCAN_REQ : {
-    rrc_init_scan_req_t *p  = (rrc_init_scan_req_t *) msg ;
-    //  fprintf(stdout,"sens_database before:\n");//dbg
-    //  print_sens_db( rrm->rrc.pSensEntry );//dbg
-    msg_fct( "[RRC]>[RRM]:%d:RRC_INIT_SCAN_REQ  %d \n",header->inst, header->Trans_id);
-    rrm->sensing.sens_active=1;//mod_lor_10_04_21
-
-    rrc_init_scan_req( header->inst, p->L2_id, p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf,
-                       p->Nb_channels, p->Overlap,p->Sampl_freq, header->Trans_id );
-
-    //    fprintf(stdout,"sens_database:\n");//dbg
-    //    print_sens_db( rrm->rrc.pSensEntry );//dbg
-
-  }
-  break ;
-
-  case RRC_END_SCAN_CONF : {
-    rrc_end_scan_conf_t *p  = (rrc_end_scan_conf_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_END_SCAN_CONF  %d (Node ",header->inst, header->Trans_id);
-
-    for ( int i=0; i<8; i++)
-      msg_fct("%02X", p->L2_id.L2_id[i]);
-
-    msg_fct( ")\n");
-    rrc_end_scan_conf( header->inst, p->L2_id, header->Trans_id );
-  }
-  break ;
-
-  case RRC_END_SCAN_REQ : {
-    rrc_end_scan_req_t *p  = (rrc_end_scan_req_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_END_SCAN_REQ %d \n",header->inst, header->Trans_id);
-    rrm->sensing.sens_active=0;//mod_lor_10_04_21
-    rrc_end_scan_req( header->inst, p->L2_id, header->Trans_id );
-  }
-  break ;
-
-  case RRC_INIT_MON_REQ : {
-    rrc_init_mon_req_t *p  = (rrc_init_mon_req_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_INIT_MON_REQ %d (Node ",header->inst, header->Trans_id);
-
-    for ( int i=0; i<8; i++)
-      msg_fct("%02X", p->L2_id.L2_id[i]);
-
-    msg_fct( ")\n");
-    rrc_init_mon_req( header->inst, p->L2_id, p->ch_to_scan, p->NB_chan, p->interval, header->Trans_id );
-  }
-  break ;
-
-  //mod_lor_10_06_04++
-  case RRC_UP_FREQ_ASS : {
-    //rrm_up_freq_ass_t *p  = (rrm_up_freq_ass_t *) msg ;
-    //int i;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_UP_FREQ_ASS \n",header->inst);
-
-  }
-  break;
-
-  //mod_lor_10_06_04--
-  //mod_lor_10_11_05++
-  case RRC_UP_FREQ_ASS_SEC : {
-    rrm_up_freq_ass_sec_t *p  = (rrm_up_freq_ass_sec_t *) msg ;
-    int i;
-    unsigned int chann_start[NB_SENS_MAX];
-    unsigned int chann_end[NB_SENS_MAX];
-    unsigned int tx[NB_SENS_MAX];
-    unsigned int tot_ch = 0;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_UP_FREQ_ASS_SEC ch %d\n",header->inst,p->NB_all);
-
-    for (i=0; i<p->NB_all; i++) {
-      if (memcmp( &(p->L2_id[i]), &(rrm->L2_id), sizeof(L2_ID) )==0) {
-        printf("USER:%d:Transmission on channel %d from %d to %d\n\n",header->inst,p->ass_channels[i].Ch_id, p->ass_channels[i].Start_f, p->ass_channels[i].Final_f);
-        chann_start[tot_ch] = p->ass_channels[i].Start_f;
-        chann_end[tot_ch]   = p->ass_channels[i].Final_f;
-        tx[tot_ch]          = 1;
-        tot_ch++;
-      }
-
-      if (memcmp( &(p->L2_id_dest[i]), &(rrm->L2_id), sizeof(L2_ID) )==0) {
-        printf("USER:%d:Ready to receive on channel %d from %d to %d\n\n",header->inst,p->ass_channels[i].Ch_id, p->ass_channels[i].Start_f, p->ass_channels[i].Final_f);
-        chann_start[tot_ch] = p->ass_channels[i].Start_f;
-        chann_end[tot_ch]   = p->ass_channels[i].Final_f;
-        tx[tot_ch]          = 0;
-        tot_ch++;
-      }
-    }
-
-    plot_all_chann_scen_2(tx, chann_start, chann_end, tot_ch, header->inst-FIRST_SENSOR_ID+1);
-
-
-  }
-  break;
-  //mod_lor_10_11_05--
-
-  default :
-    fprintf(stderr,"RRC:\n") ;
-    printHex(msg,len_msg,1) ;
-  }
-
-}
-
-static void processing_msg_sensing(
-  rrm_t       *rrm        , ///< Donnee relative a une instance du RRM
-  msg_head_t  *header     , ///< Entete du message
-  char        *msg        , ///< Message recu
-  int         len_msg       ///< Longueur du message
-)
-{
-
-#ifdef TRACE
-
-  if ( header->msg_type < NB_MSG_SENSING_RRM )
-    fprintf(sensing2rrm_fd,"%lf SENSING->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_sensing_rrm[header->msg_type],header->msg_type,header->Trans_id);
-  else
-    fprintf(sensing2rrm_fd,"%lf SENSING->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id);
-
-  fflush(sensing2rrm_fd);
-#endif
-
-  switch ( (MSG_SENSING_RRM_T)header->msg_type ) {
-
-  case SNS_UPDATE_SENS : {
-    rrc_update_sens_t *p  = (rrc_update_sens_t *) msg ;
-
-    if (rrm->sensing.sens_active) {//mod_lor_10_05_07
-      msg_fct( "[SENSING]>[RRM]:%d:SNS_UPDATE_SENS \n",header->inst);
-
-      if (SCEN_1)
-        plot_spectra(p->Sens_meas, p->NB_info,  header->inst-FIRST_SENSOR_ID+1);
-      //mod_lor_10_11_04++
-      else if (SCEN_2_CENTR && !COLL_CLUST)
-        plot_spectra_CH1(p->Sens_meas, p->NB_info,  header->inst-FIRST_SENSOR_ID+1);
-      else if (SCEN_2_CENTR && COLL_CLUST)
-        plot_spectra_CH2(p->Sens_meas, p->NB_info,  header->inst-FIRST_SENSOR_ID+1);
-
-      //mod_lor_10_11_04--
-
-      rrc_update_sens( header->inst, rrm->L2_id, p->NB_info, p->Sens_meas, p->info_time );  //fix info_time & understand trans_id
-    }//mod_lor_10_05_07
-  }
-  break ;
-
-  //mod_lor_10_04_14++
-  case SNS_END_SCAN_CONF : {
-
-    msg_fct( "[SENSING]>[RRM]:%d:SNS_END_SCAN_CONF\n",header->inst);
-
-    sns_end_scan_conf( header->inst );
-  }
-  break ;
-
-  default :
-    fprintf(stderr,"SENSING:%d:\n",header->msg_type) ;
-    printHex(msg,len_msg,1) ;
-  }//mod_lor_10_04_14--
-}
-
-
-/*!
-*******************************************************************************
-\brief  traitement des messages entrant sur l'interface PUSU
-
-\return Aucune valeur
-*/
-static void processing_msg_pusu(
-  rrm_t *rrm          , ///< Donnee relative a une instance du RRM
-  msg_head_t *header  , ///< Entete du message
-  char *msg           , ///< Message recu
-  int len_msg           ///< Longueur du message
-)
-{
-  transact_t *pTransact ;
-
-  pthread_mutex_lock( &( rrm->pusu.exclu ) ) ;
-  pTransact = get_item_transact(rrm->pusu.transaction,header->Trans_id ) ;
-
-  if ( pTransact == NULL ) {
-    fprintf(stderr,"[RRM] %d PUSU Response (%d): unknown transaction\n",header->msg_type,header->Trans_id);
-  } else {
-    del_item_transact( &(rrm->pusu.transaction),header->Trans_id ) ;
-  }
-
-  pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ;
-
-#ifdef TRACE
-
-  if ( header->msg_type < NB_MSG_RRM_PUSU )
-    fprintf(pusu2rrm_fd,"%lf PUSU->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_pusu_rrm[header->msg_type],header->msg_type,header->Trans_id);
-  else
-    fprintf(pusu2rrm_fd,"%lf PUSU->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id);
-
-  fflush(pusu2rrm_fd);
-#endif
-
-  switch ( header->msg_type ) {
-  case PUSU_PUBLISH_RESP: {
-    msg_fct( "[PUSU]>[RRM]:%d:PUSU_PUBLISH_RESP\n",header->inst );
-  }
-  break ;
-
-  case PUSU_UNPUBLISH_RESP: {
-    msg_fct( "[PUSU]>[RRM]:%d:PUSU_UNPUBLISH_RESP\n",header->inst );
-  }
-  break ;
-
-  case PUSU_LINK_INFO_RESP: {
-    msg_fct( "[PUSU]>[RRM]:%d:PUSU_LINK_INFO_RESP\n",header->inst );
-  }
-  break ;
-
-  case PUSU_SENSING_INFO_RESP: {
-    msg_fct( "[PUSU]>[RRM]:%d:PUSU_SENSING_INFO_RESP\n",header->inst );
-  }
-  break ;
-
-  case PUSU_CH_LOAD_RESP: {
-    msg_fct( "[PUSU]>[RRM]:%d:PUSU_CH_LOAD_RESP\n",header->inst );
-  }
-  break ;
-
-  default :
-    fprintf(stderr,"PUSU:%d:\n",header->msg_type) ;
-    printHex(msg,len_msg,1) ;
-  }
-
-}
-
-//mod_lor_10_01_25++
-/*!
-*******************************************************************************
-\brief  traitement des messages entrant via IP
-
-\return Auncune valeur
-*/
-static void processing_msg_ip(
-  rrm_t       *rrm        , ///< Donnee relative a une instance du RRM
-  msg_head_t  *header     , ///< Entete du message
-  char        *msg        , ///< Message recu
-  int         len_msg       ///< Longueur du message
-)
-{
-#ifdef TRACE
-
-  //mod_lor_10_04_27++
-  /*if ( header->msg_type < NB_MSG_RRC_RRM )
-  fprintf(ip2rrm_fd,"%lf IP->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_rrc_rrm[header->msg_type], header->msg_type,header->Trans_id);
-  else
-  fprintf(ip2rrm_fd,"%lf CMM->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id);
-  fflush(ip2rrm_fd);*/
-  if ( header->msg_type < NB_MSG_IP )//mod_lor_10_04_27
-    fprintf(ip2rrm_fd,"%lf IP->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_ip[header->msg_type], header->msg_type,header->Trans_id);
-  else
-    fprintf(ip2rrm_fd,"%lf IP->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id);
-
-  fflush(ip2rrm_fd);
-  //mod_lor_10_04_27--
-#endif
-
-  switch ( header->msg_type ) {
-  case UPDATE_SENS_RESULTS_3 : {
-    //fprintf(stderr,"1node entry  @%p \n", rrm->rrc.pSensEntry);//dbg
-    rrm_update_sens_t *p = (rrm_update_sens_t *) msg ;
-
-    //fprintf(stdout,"Ip dest in FC before update%X\n",rrm_inst[0].ip.s->in_dest_addr.sin_addr.s_addr); //dbg
-    if (rrm->sensing.sens_active) { //mod_lor_10_05_07
-      msg_fct( "[IP]>[RRM]:%d:UPDATE_SENS_RESULTS_3 from %d \n",rrm->id, header->inst);
-
-      if (SCEN_1) {
-        if(update_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time)||SN_waiting == 1) //mod_lor_10_06_02
-          if ((open_freq_query(rrm->id, rrm->L2_id, 0, 1)>0) && SN_waiting)   //mod_lor_10_06_02
-            SN_waiting=0; //mod_lor_10_06_02
-      } else if (SCEN_2_CENTR) { //add_lor_10_11_03
-        update_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time);
-      }
-
-    } //mod_lor_10_05_07
-
-    //fprintf(stdout,"Ip dest in FC after update%X\n",rrm_inst[0].ip.s->in_dest_addr.sin_addr.s_addr); //dbg
-    //fprintf(stderr,"2node entry  @%p \n", rrm->rrc.pSensEntry);//dbg
-
-  }
-  break ;
-
-  //mod_lor_10_05_07++
-  case UP_CLUST_SENS_RESULTS : {
-    update_coll_sens_t *p = (update_coll_sens_t *) msg ;
-
-    if (rrm->sensing.sens_active) {
-      msg_fct( "[IP]>[RRM]:%d:UP_CLUST_SENS_RESULTS from %d \n",rrm->id, header->inst);
-
-      if (SCEN_2_CENTR && !COLL_CLUST)
-        plot_spectra_CH1(p->Sens_meas, p->NB_info,  -1);
-      else
-        printf("Error!!! this message should be received by Cluster 1\n");
-
-      up_coll_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time);
-    }
-  }
-  break ;
-
-  //mod_lor_10_05_07--
-  case OPEN_FREQ_QUERY_4 : {
-    open_freq_query_t *p = (open_freq_query_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:OPEN_FREQ_QUERY_4 from %d\n",rrm->id, header->inst);
-    open_freq_query( rrm->id, p->L2_id, p->QoS, header->Trans_id );
-
-  }
-  break ;
-
-  case ASK_FREQ_TO_CH_3 : { //add_lor_10_11_03
-    ask_freq_to_CH_t *p = (ask_freq_to_CH_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:ASK_FREQ_TO_CH_3 from %d\n",rrm->id, header->inst);
-
-    if (ask_freq_to_CH( rrm->id, &(p->L2_id), &(p->L2_id_dest), 1, header->Trans_id )!=0) {
-      printf ("Not available channels... Waiting for a channel...\n");
-      pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-      memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0].L2_id,p->L2_id.L2_id, sizeof(L2_ID));
-      memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1].L2_id,p->L2_id_dest.L2_id, sizeof(L2_ID));
-      rrm->ip.users_waiting_update++;
-      printf ("N4 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
-      pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-    }
-  }
-  break ;
-
-  case UPDATE_OPEN_FREQ_7 : {
-    update_open_freq_t *p = (update_open_freq_t *) msg ;
-    unsigned int occ_channels[p->NB_chan]; //mod_lor_10_05_18: occ_channels passed as parameter to update open freq.
-    msg_fct( "[IP]>[RRM]:%d:UPDATE_OPEN_FREQ_7 from %d\n",rrm->id, header->inst);
-    unsigned int NB_occ = update_open_freq( rrm->id, p->L2_id, p->NB_chan, occ_channels, p->channels, header->Trans_id );
-
-    if (SCEN_1)
-      plot_SN_channels(rrm->rrc.pChannelsEntry,NB_occ,occ_channels,rrm->id);//mod_lor_10_06_01
-  }
-  break ;
-
-  case UPDATE_SN_OCC_FREQ_5 : {
-    sleep (2); //mod_lor_10_06_02
-    update_SN_occ_freq_t *p = (update_SN_occ_freq_t *) msg ;
-
-    if (p->NB_chan<CH_NEEDED_FOR_SN)    //mod_lor_10_06_02
-      SN_waiting = 1;                 //mod_lor_10_06_02
-    else                                //mod_lor_10_06_02
-      SN_waiting = 0;                 //mod_lor_10_06_02
-
-    msg_fct( "[IP]>[RRM]:%d:UPDATE_SN_OCC_FREQ_5 from %d \n",rrm->id, header->inst);
-
-    if (SCEN_1)
-      plot_SN_channels(rrm->rrc.pChannelsEntry, p->NB_chan, p->occ_channels, rrm->id);//mod_lor_10_06_01
-
-    if(update_SN_occ_freq( rrm->id, p->L2_id, p->NB_chan, p->occ_channels, header->Trans_id )) //mod_lor_10_05_18
-      open_freq_query( rrm->id, p->L2_id, 0, header->Trans_id ); //mod_lor_10_05_18
-
-  }
-  break ;
-
-  //mod_lor_10_05_05++
-  case INIT_COLL_SENS_REQ : {
-    init_coll_sens_req_t *p = (init_coll_sens_req_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:INIT_COLL_SENS_REQ from %d\n",rrm->id, header->inst);
-    rrm->sensing.sens_active=1;//mod_lor_10_05_07
-    memcpy( rrm->L2_id_FC.L2_id, p->L2_id.L2_id, sizeof(L2_ID) );
-    cmm_init_sensing(rrm->id,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf,
-                     p->Nb_channels, p->Overlap,p->Sampl_freq);
-
-  }
-  break ;
-
-  //mod_lor_10_05_05--
-  //mod_lor_10_05_06++
-  case STOP_COLL_SENS : {
-    //init_coll_sens_req_t *p = (init_coll_sens_req_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:STOP_COLL_SENS from %d\n",rrm->id, header->inst);
-    //memcpy( rrm->L2_id_FC.L2_id, p->L2_id.L2_id, sizeof(L2_ID) );
-    rrm->sensing.sens_active=0;//mod_lor_10_05_07
-    cmm_stop_sensing(rrm->id);
-
-  }
-  break ;
-
-  //mod_lor_10_05_06--
-  //mod_lor_10_05_12++
-  case STOP_COLL_SENS_CONF : {
-    stop_coll_sens_conf_t *p = (stop_coll_sens_conf_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:STOP_COLL_SENS_CONF from %d\n",rrm->id, header->inst);
-    rrc_end_scan_conf( header->inst, p->L2_id, header->Trans_id ); //AAA:to_check
-
-  }
-  break ;
-
-  //mod_lor_10_05_12--
-  case USER_DISCONNECT_9 : { //add_lor_10_11_09
-    user_disconnect_t *p = (user_disconnect_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:USER_DISCONNECT from %d\n",rrm->id, header->inst);
-    disconnect_user( rrm->id, p->L2_id );
-
-  }
-  break ;
-
-  case CLOSE_LINK : { //add_lor_10_11_09
-    close_link_t *p = (close_link_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:CLOSE_LINK from %d\n",rrm->id, header->inst);
-    close_active_link( rrm->id, p->L2_id, p->L2_id_dest );
-
-  }
-  break ;
-
-  default :
-    fprintf(stderr,"IP:\n") ;
-    printHex(msg,len_msg,1) ;
-  }
-}
-//mod_lor_10_01_25--
-
-
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages sortants sur les sockets
-        (rrc ou cmm).
-\return none
-*/
-static void rrm_scheduler ( )
-{
-  int ii ;
-  int no_msg ;
-  fprintf(stderr,"RRM Scheduler: starting ... \n");
-  fflush(stderr);
-  file_msg_t *pItem ;
-  //mod_lor_10_04_22++
-  unsigned int priority = 0; ///< to guarantee priority to one rrm (fusion center) during sensing period
-  unsigned int pr_ii = 0; ///< id of the rrm with priority
-  rrm_t      *rrm ;
-
-  //mod_lor_10_04_22--
-  while ( flag_not_exit) {
-    no_msg = 0  ;
-
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      //mod_lor_10_04_22++
-      if (priority) {
-        rrm = &rrm_inst[pr_ii] ;
-        ii--;
-        priority = 0;
-      }
-
-      else {
-        rrm = &rrm_inst[ii] ;
-
-        if (ii > 0 && rrm->sensing.sens_active)
-          priority = 1;
-      }
-
-      //mod_lor_10_04_22--
-      // rrm = &rrm_inst[ii] ;
-      pItem=NULL;
-
-      pItem = get_msg( &(rrm->file_recv_msg)) ;
-
-      if ( pItem == NULL )
-        no_msg++;
-      else {
-        msg_head_t *header = (msg_head_t *) pItem->msg;
-        char *msg = NULL ;
-
-        if ( header != NULL ) {
-          if ( header->size > 0 ) {
-            msg = (char *) (header +1) ;
-          }
-
-          //mod_lor_10_01_25
-          if (pItem->s_type==0) {
-            if ( pItem->s->s == rrm->cmm.s->s )
-              processing_msg_cmm( rrm , header , msg , header->size ) ;
-            else if ( pItem->s->s == rrm->rrc.s->s ) {
-              processing_msg_rrc( rrm , header , msg , header->size ) ;
-            } else if ( pItem->s->s == rrm->sensing.s->s) {
-              processing_msg_sensing( rrm , header , msg , header->size ) ;
-              //fprintf(stderr,"RRM Scheduler: sensing message ... \n"); //dbg
-            } else
-              processing_msg_pusu( rrm , header , msg , header->size ) ;
-          } else {
-            //fprintf(stderr,"RRM Scheduler: ip message ... \n"); //dbg
-            processing_msg_ip( rrm , header , msg , header->size ) ;
-
-          }
-
-          RRM_FREE( pItem->msg) ;
-        }
-
-        RRM_FREE( pItem ) ;
-      }
-    }
-
-    if ( no_msg == nb_inst )
-      usleep(1000);
-
-
-
-  }
-
-  fprintf(stderr,"... stopped RRM Scheduler\n");
-  fflush(stderr);
-}
-/*!
-*******************************************************************************
-\brief This function reads the configuration node file
-*/
-static void get_config_file(char *filename )
-{
-  FILE *fd = fopen( filename , "r" );
-  char buf_line[128] ;
-  int adresse[LENGTH_L2_ID] ;
-  int ii = 0 ;
-
-
-  if ( fd == NULL )
-    return ;
-
-  while ( 1 ) {
-    fgets( buf_line, 127, fd ) ;
-
-    if (feof(fd))
-      break ;
-
-    if ( buf_line[0] == '#' )
-      continue ;
-
-    if ( buf_line[0] == ' ' )
-      continue ;
-
-    if ( buf_line[0] == '\t' )
-      continue ;
-
-    if ( buf_line[0] == '\n' )
-      continue ;
-
-    sscanf( buf_line, "%x %x %x %x %x %x %x %x",
-            &adresse[0],&adresse[1],&adresse[2],&adresse[3],
-            &adresse[4],&adresse[5],&adresse[6],&adresse[7]);
-
-    rrm_inst[ii].id                 = ii ;
-    rrm_inst[ii].L2_id.L2_id[0]     = adresse[0] &  0xFF ;
-    rrm_inst[ii].L2_id.L2_id[1]     = adresse[1] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[2]     = adresse[2] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[3]     = adresse[3] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[4]     = adresse[4] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[5]     = adresse[5] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[6]     = adresse[6] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[7]     = adresse[7] &  0xFF;
-
-    print_L2_id( &rrm_inst[ii].L2_id ) ;
-    fprintf(stderr," (%d) %d \n", ii, buf_line[0] );
-
-    ii++ ;
-
-    adresse[0]=adresse[1]=adresse[2]=adresse[3]=adresse[4]=adresse[5]=adresse[6]=adresse[7]=0;
-    buf_line[0] = 0;
-  }
-
-  nb_inst = ii ;
-
-  fclose(fd) ;
-}
-/*!
-*******************************************************************************
-\brief This function displays the help message (syntax)
-*/
-static void help()
-{
-  fprintf(stderr,"syntax: rrm -i <nombre instance> \n" );
-  fprintf(stderr,"        rrm -f <config file> \n" );
-}
-
-/*!
-*******************************************************************************
-\brief programme principale du RRM
-*/
-int main( int argc , char **argv )
-{
-
-  int ii;
-  int c           =  0;
-  int ret         =  0;
-  int flag_cfg    =  0 ;
-  struct data_thread DataRrc;
-  struct data_thread DataCmm;
-  struct data_thread DataPusu;
-  struct data_thread DataSensing;
-
-  sock_rrm_int_t  DataIpS[MAX_RRM]; //mod_lor_10_01_25
-  pthread_attr_t attr ;
-
-
-
-  /* Vérification des arguments */
-  while ((c = getopt(argc,argv,"i:f:h")) != -1)
-    switch (c) {
-    case 'i':
-      nb_inst=atoi(optarg);
-      break;
-
-    case 'f':
-      get_config_file(optarg);
-      flag_cfg = 1 ;
-      break;
-
-    case 'h':
-      help();
-      exit(0);
-      break;
-
-    default:
-      help();
-      exit(0);
-    }
-
-  if (nb_inst <= 0 ) {
-    fprintf(stderr,"[RRM] Provide a node id\n");
-    exit(-1);
-  }
-
-  if (nb_inst >= MAX_RRM) {
-    fprintf(stderr,"[RRM] the instance number (%d) is upper than MAX_RRM (%d)\n", nb_inst, MAX_RRM);
-    exit(-1);
-  }
-
-#ifdef RRC_KERNEL_MODE
-  msg("RRM INIT :open fifos\n");
-
-  while (( Rrm_fifos.rrc_2_rrm_fifo= open ("/dev/rtf14", O_RDONLY )) < 0) {
-    printf("[RRM][INIT] open fifo  /dev/rtf14 returned %d\n", Rrm_fifos.rrc_2_rrm_fifo);
-    usleep(100);
-  }
-
-  printf ("[RRM][INIT] open fifo  /dev/rtf14 returned %d\n", Rrm_fifos.rrc_2_rrm_fifo);
-
-  while (( Rrm_fifos.rrm_2_rrc_fifo= open ("/dev/rtf15", O_WRONLY |O_NONBLOCK  | O_NDELAY)) < 0) {
-    //| O_BLOCK
-    printf("[RRM][INIT] open fifo  /dev/rtf15 returned %d\n", Rrm_fifos.rrm_2_rrc_fifo);
-    usleep(100);
-  }
-
-  printf("[RRM][INIT] open fifo  /dev/rtf15 returned %d\n", Rrm_fifos.rrm_2_rrc_fifo);
-#endif /* RRC_KERNEL_MODE */
-
-  /* ***** MUTEX ***** */
-  // initialise les attributs des threads
-  pthread_attr_init( &attr ) ;
-  pthread_attr_setschedpolicy( &attr, SCHED_RR ) ;
-
-  DataRrc.name        = "RRC" ;
-  DataRrc.sock_path_local = RRM_RRC_SOCK_PATH ;
-  DataRrc.sock_path_dest  = RRC_RRM_SOCK_PATH ;
-  DataRrc.s.s             = -1 ;
-
-  DataCmm.name        = "CMM" ;
-  DataCmm.sock_path_local = RRM_CMM_SOCK_PATH ;
-  DataCmm.sock_path_dest  = CMM_RRM_SOCK_PATH ;
-  DataCmm.s.s             = -1 ;
-
-  DataPusu.name           = "PUSU" ;
-  DataPusu.sock_path_local= RRM_PUSU_SOCK_PATH ;
-  DataPusu.sock_path_dest = PUSU_RRM_SOCK_PATH ;
-  DataPusu.s.s            = -1 ;
-
-  DataSensing.name           = "SENSING" ;
-  DataSensing.sock_path_local= RRM_SENSING_SOCK_PATH ;
-  DataSensing.sock_path_dest = SENSING_RRM_SOCK_PATH ;
-  DataSensing.s.s            = -1 ;
-
-#ifdef TRACE
-  cmm2rrm_fd  = fopen( "VCD/cmm2rrm.txt" , "w") ;
-  PNULL(cmm2rrm_fd) ;
-
-  rrc2rrm_fd  = fopen( "VCD/rrc2rrm.txt", "w") ;
-  PNULL(rrc2rrm_fd) ;
-
-  pusu2rrm_fd = fopen( "VCD/pusu2rrm.txt", "w") ;
-  PNULL(pusu2rrm_fd) ;
-
-  ip2rrm_fd = fopen( "VCD/ip2rrm.txt", "w") ;
-  PNULL(ip2rrm_fd) ;
-
-  sensing2rrm_fd = fopen( "VCD/sensing2rrm.txt", "w") ;
-  PNULL(sensing2rrm_fd) ;
-
-#endif
-  output_2 = fopen( "VCD/output_2.txt", "w") ; //mod_lor_10_04_20
-  PNULL(output_2) ; //mod_lor_10_04_20
-
-  for ( ii = 0 ; ii < nb_inst ; ii++ ) {
-    DataIpS[ii].s               = -1 ;    //mod_lor_10_01_25
-
-    if ( !flag_cfg ) {
-      rrm_inst[ii].id                 = ii ;
-      rrm_inst[ii].L2_id.L2_id[0]     = ii;
-      rrm_inst[ii].L2_id.L2_id[1]     = 0x00;
-      rrm_inst[ii].L2_id.L2_id[2]     = 0x00;
-      rrm_inst[ii].L2_id.L2_id[3]     = 0xDE;
-      rrm_inst[ii].L2_id.L2_id[4]     = 0xAD;
-      rrm_inst[ii].L2_id.L2_id[5]     = 0xBE;
-      rrm_inst[ii].L2_id.L2_id[6]     = 0xAF;
-      rrm_inst[ii].L2_id.L2_id[7]     = 0x00;
-    }
-
-    pthread_mutex_init( &( rrm_inst[ii].rrc.exclu ), NULL ) ;
-    pthread_mutex_init( &( rrm_inst[ii].cmm.exclu ), NULL ) ;
-    pthread_mutex_init( &( rrm_inst[ii].pusu.exclu ), NULL ) ;
-    pthread_mutex_init( &( rrm_inst[ii].sensing.exclu ), NULL ) ;
-    pthread_mutex_init( &( rrm_inst[ii].ip.exclu ), NULL ) ; //mod_lor_10_01_25
-
-    init_file_msg( &(rrm_inst[ii].file_recv_msg), 1 ) ;
-    init_file_msg( &(rrm_inst[ii].file_send_cmm_msg), 2 ) ;
-    init_file_msg( &(rrm_inst[ii].file_send_rrc_msg), 3 ) ;
-    init_file_msg( &(rrm_inst[ii].file_send_ip_msg), 4 ) ; //mod_lor_10_01_25
-    init_file_msg( &(rrm_inst[ii].file_send_sensing_msg), 5 ) ;
-
-
-    rrm_inst[ii].state              = ISOLATEDNODE ;
-    rrm_inst[ii].role               = NOROLE ;
-    rrm_inst[ii].cmm.trans_cnt      =  1024;
-    rrm_inst[ii].rrc.trans_cnt      =  2048;
-    rrm_inst[ii].pusu.trans_cnt     =  3072;
-    rrm_inst[ii].ip.trans_cnt       =  4096; //mod_lor_10_01_25
-    rrm_inst[ii].sensing.trans_cnt  =  5120; //mod_lor_10_01_25
-
-    rrm_inst[ii].rrc.s              = &DataRrc.s;
-    rrm_inst[ii].cmm.s              = &DataCmm.s;
-    rrm_inst[ii].pusu.s             = &DataPusu.s;
-    rrm_inst[ii].sensing.s          = &DataSensing.s;
-    rrm_inst[ii].ip.s               = &DataIpS[ii]; //mod_lor_10_01_25
-
-    rrm_inst[ii].rrc.transaction    = NULL ;
-    rrm_inst[ii].cmm.transaction    = NULL ;
-    rrm_inst[ii].pusu.transaction   = NULL ;
-    rrm_inst[ii].sensing.transaction= NULL ;
-
-    rrm_inst[ii].sensing.sens_active= 0;        //mod_lor_10_04_21
-    rrm_inst[ii].ip.users_waiting_update=0;     //add_lor_10_11_08
-    rrm_inst[ii].rrc.pNeighborEntry = NULL ;
-    rrm_inst[ii].rrc.pRbEntry       = NULL ;
-    rrm_inst[ii].rrc.pSensEntry     = NULL ;
-    rrm_inst[ii].rrc.pChannelsEntry = NULL ;
-
-  }
-
-
-
-  //open_socket( &DataRrc.s,  DataRrc.sock_path_local, DataRrc.sock_path_dest ,0 );
-
-  /* Creation du thread de reception des messages RRC*/
-  fprintf(stderr,"Creation du thread RRC : %d\n", nb_inst);
-#ifdef RRC_KERNEL_MODE
-  ret = pthread_create ( &pthread_recv_rrc_msg_hnd, NULL, thread_recv_msg_fifo , &DataRrc );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-#else
-  ret = pthread_create ( &pthread_recv_rrc_msg_hnd, NULL, thread_recv_msg , &DataRrc );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-#endif
-  /* Creation du thread de reception des messages CMM */
-  ret = pthread_create (&pthread_recv_cmm_msg_hnd , NULL, thread_recv_msg, &DataCmm );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  /* Creation du thread CMM d'envoi des messages */
-  ret = pthread_create (&pthread_send_cmm_msg_hnd, NULL, thread_send_msg_cmm, NULL );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  /* Creation du thread de reception des messages PUSU */
-  ret = pthread_create (&pthread_recv_pusu_msg_hnd , NULL, thread_recv_msg, &DataPusu );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  /* Creation du thread de reception des messages SENSING */
-  ret = pthread_create (&pthread_recv_sensing_msg_hnd , NULL, thread_recv_msg, &DataSensing );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  /* Creation du thread SENSING d'envoi des messages */
-  ret = pthread_create (&pthread_send_sensing_msg_hnd, NULL, thread_send_msg_sensing, NULL );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  /* Creation du thread RRC d'envoi des messages */
-  ret = pthread_create (&pthread_send_rrc_msg_hnd, NULL, thread_send_msg_rrc, NULL );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  //mod_lor_10_01_25++
-
-  /* Creation du thread IP d'envoi des messages */
-  ret = pthread_create (&pthread_send_ip_msg_hnd, NULL, thread_send_msg_ip, NULL );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  //mod_lor_10_01_25--*/
-
-  /* Creation du thread TTL */
-  ret = pthread_create (&pthread_ttl_hnd , NULL, thread_processing_ttl, NULL);
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  //mod_eure_lor++
-  if (FC_ID>=0 && SCEN_1) { //mod_lor_10_11_04
-    fl_initialize(&argc, argv, "SWN Spectral Measurements", 0, 0);
-    form = create_form_sensing_form();
-    fl_show_form(form->sensing_form,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Spectral Measurements");
-    fl_check_forms();
-  }
-
-  //mod_eure_lor--
-
-  //mod_lor_10_06_01++
-  if (BTS_ID>=0 && SCEN_1) { //mod_lor_10_11_04
-    //fl_initialize(&argc, argv, "Secondary Network Frequencies", 0, 0);
-    SN_form = create_form_Secondary_Network_frequencies();
-    fl_show_form(SN_form->Secondary_Network_frequencies,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Secondary Network Frequencies");
-    fl_check_forms();
-  }
-
-  //mod_lor_10_06_01--
-  //mod_lor_10_11_04++
-  if (SCEN_2_CENTR && COLL_CLUST) {
-    fl_initialize(&argc, argv, "Cluster 2", 0, 0);
-    Sens_form_CH2 = create_form_sens_scen_2();
-    fl_show_form(Sens_form_CH2->sens_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 2: Sensing");
-    fl_check_forms();
-  }
-
-  if (SCEN_2_CENTR && !COLL_CLUST) {
-    fl_initialize(&argc, argv, "Cluster 1", 0, 0);
-    Sens_form_CH1 = create_form_sens_CH1_scen_2();
-    fl_show_form(Sens_form_CH1->sens_CH1_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Sensing");
-    fl_check_forms();
-
-    Chann_form = create_form_all_freq_to_users();
-    fl_show_form(Chann_form->all_freq_to_users,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Used channels");
-    fl_check_forms();
-  }
-
-  //mod_lor_10_11_04--
-
-  /* main loop */
-  rrm_scheduler( ) ;
-
-  /* Attente de la fin des threads. */
-  pthread_join (pthread_recv_cmm_msg_hnd, NULL);
-  pthread_join (pthread_recv_rrc_msg_hnd, NULL);
-  pthread_join (pthread_recv_pusu_msg_hnd, NULL);
-  pthread_join (pthread_recv_sensing_msg_hnd, NULL);
-  pthread_join (pthread_send_cmm_msg_hnd, NULL);
-  pthread_join (pthread_send_rrc_msg_hnd, NULL);
-  pthread_join (pthread_send_sensing_msg_hnd, NULL);
-  pthread_join (pthread_send_ip_msg_hnd, NULL);
-  pthread_join (pthread_ttl_hnd, NULL);
-
-
-#ifdef TRACE
-  fclose(cmm2rrm_fd ) ;
-  fclose(rrc2rrm_fd ) ;
-  fclose(pusu2rrm_fd ) ;
-  fclose(sensing2rrm_fd ) ;
-
-#endif
-  fclose(output_2 ) ; //mod_lor_10_04_20
-
-  return 0 ;
-}
-
diff --git a/openair3/MESH/RRM/rrm.cfg b/openair3/MESH/RRM/rrm.cfg
deleted file mode 100644
index 255f3b195a61ee4b60d339f068879ab6f132dd94..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-# L2_ID  des noeuds
-0xAA 0x55 0x77 0x33 0xCC 0xFF 0xDD 0xBB
diff --git a/openair3/MESH/RRM/rrm.h b/openair3/MESH/RRM/rrm.h
deleted file mode 100644
index 56e84ded8a38b1c9683655a77da3256011a4acab..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrm.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-et des fonctions relatives aux fonctions du RRM (Radio Resource Management ).
-
-\author     BURLOT Pascal
-
-\date       15/07/08
-
-
-\par     Historique:
-P.BURLOT 2009-01-20
-+ separation de la file de message CMM/RRM a envoyer en 2 files
-distinctes ( file_send_cmm_msg, file_send_rrc_msg)
-L.IACOBELLI 2009-10-19
-+ sensing database
-+ Fusion centre and BTS role
-
-*******************************************************************************
-*/
-
-#ifndef RRM_H
-#define RRM_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*!
-*******************************************************************************
-\brief Nombre max. d'instance de RRM (Emulation)
-*/
-#define MAX_RRM     10
-
-
-/*!
-*******************************************************************************
-\brief Structure definissant une instance RRM
-*/
-
-
-typedef struct {
-  int  id                                 ; ///< identification de l'instance RRM
-  enum {
-    ISOLATEDNODE=0   , ///< Node is in a isolated State
-    CLUSTERHEAD_INIT0, ///< Node is in a Cluster Head initialization State
-    CLUSTERHEAD_INIT1, ///< Node is in a Cluster Head initialization State
-    CLUSTERHEAD      , ///< Node is in a Cluster Head State
-    MESHROUTER       , ///< Node is in a Mesh Router State
-  } state                             ; ///< etat de l'instance
-  enum {
-    NOROLE=0         , ///< Node has not a specific role
-    FUSIONCENTER     , ///< Node acts as Fusion Center
-    BTS              , ///< Node acts as BTS
-    CH_COLL            ///< Node acts as Cluster Head collaborating with the CH at the address L2_id_FC
-  } role                              ; ///< role of the node
-
-  L2_ID               L2_id               ; ///< identification de niveau L2
-  L2_ID               L2_id_FC            ; ///< Fusion Centre or Cluster Head address. In CH1 of sendora scenario 2 centralized it is the address of the other CH
-  L3_INFO_T           L3_info_t           ; ///< type de l'identification de niveau L3
-
-  unsigned char       L3_info[MAX_L3_INFO]; ///< identification de niveau L3
-  //mod_lor_10_01_25
-  unsigned char       L3_info_corr[MAX_L3_INFO]; ///< identification de niveau L3 du correspondant: FC si le noeud est un senseur ou la BS, BS si le noeud est le FC, CH1 for CH2, CH2 for CH1
-
-  file_head_t         file_send_cmm_msg   ; ///< File des messages en emission
-  file_head_t         file_send_rrc_msg   ; ///< File des messages en emission
-  file_head_t         file_send_sensing_msg   ; ///< File des messages en emission
-  file_head_t         file_send_ip_msg    ; ///< File des messages en emission //mod_lor_10_01_25
-  file_head_t         file_recv_msg       ; ///< File des messages en reception
-
-  struct {
-    sock_rrm_t      *s                  ; ///< Socket associé a l'interface CMM
-    unsigned int    trans_cnt           ; ///< Compteur de transaction avec l'interface CMM
-    transact_t     *transaction         ; ///< liste des transactions non terminees
-    pthread_mutex_t exclu               ; ///< mutex pour le partage de structure
-
-
-  } cmm                 ; ///<  info relatif a l'interface CMM
-
-  struct {
-#ifdef TRACE
-    FILE *fd              ; ///< Fichier pour trace de debug : action RRM->RRC
-#endif
-    sock_rrm_t    *s          ; ///< Socket associé a l'interface RRC
-    unsigned int  trans_cnt       ; ///< Compteur de transaction avec l'interface RRC
-    transact_t  *transaction    ; ///< liste des transactions non terminees
-    pthread_mutex_t exclu       ; ///< mutex pour le partage de structure
-
-    neighbor_desc_t *pNeighborEntry   ; ///< Descripteur sur le voisinage
-    RB_desc_t     *pRbEntry       ; ///< Descripteur sur les RB (radio bearer) ouverts
-    Sens_node_t     *pSensEntry       ; ///< Desrcipteur sur les info du sensing
-    CHANNELS_DB_T   *pChannelsEntry   ; ///< Desrcipteur sur les info des canaux
-  } rrc                 ; ///<  info relatif a l'interface rrc
-
-  struct {
-    sock_rrm_t      *s                  ; ///< Socket associé a l'interface PUSU
-    unsigned int    trans_cnt           ; ///< Compteur de transaction avec l'interface PUSU
-    transact_t      *transaction        ; ///< liste des transactions non terminees
-    pthread_mutex_t exclu               ; ///< mutex pour le partage de structure
-  } pusu                                ; ///<  info relatif a l'interface pusu
-
-  struct {
-    sock_rrm_t      *s                  ; ///< Socket associé a l'interface SENSING
-    unsigned int    trans_cnt           ; ///< Compteur de transaction avec l'interface SENSING
-    transact_t      *transaction        ; ///< liste des transactions non terminees
-    unsigned int    sens_active         ; ///< flag to determine if node is performing sensing //mod_lor_10_04_21
-    pthread_mutex_t exclu               ; ///< mutex pour le partage de structure
-  } sensing                           ; ///<  info relatif a l'interface SENSING
-
-  //mod_lor_10_04_20++
-  struct {
-    sock_rrm_t      *s                  ; ///< Socket associé a l'interface SENSING
-    pthread_mutex_t exclu               ; ///< mutex pour le partage de structure
-  } graph ;
-  //mod_lor_10_04_20--
-
-  //mod_lor_10_01_25++
-  struct {
-    sock_rrm_int_t  *s                                ; ///< Socket associé a l'IP
-    unsigned int    trans_cnt                         ; ///< Compteur de transaction avec l'interface IP
-    transact_t      *transaction                      ; ///< liste des transactions non terminees
-    unsigned int    waiting_SN_update                 ; ///< flag to know if an update is expected from SN about frequencies in use //mod_lor_10_05_18
-    unsigned int    users_waiting_update              ; ///< flag to know if there are users that wait for channels //add_lor_10_11_08
-    L2_ID           L2_id_wait_users[NB_SENS_MAX][2]  ; ///< vector of users waiting for channels //add_lor_10_11_08
-    pthread_mutex_t exclu                             ; ///< mutex pour le partage de structure
-  } ip                                  ; ///<  info relatif a l'interface IP
-  //mod_lor_10_01_25--
-
-} rrm_t ;
-
-extern rrm_t rrm_inst[MAX_RRM] ;
-extern int   nb_inst ;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RRM_H */
diff --git a/openair3/MESH/RRM/rrm.sh b/openair3/MESH/RRM/rrm.sh
deleted file mode 100644
index 7f5133216b7304fe0ea0d4859bf441c4e7ab460c..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-killall emul_int
-killall rrm
-
-xterm -T CMM -hold -e ./emul_int  &
-sleep 2
-./rrm -i 6  #2> log.txt
-#sleep 1
-#./emul_int
-
diff --git a/openair3/MESH/RRM/rrm_2_rrc_msg.c b/openair3/MESH/RRM/rrm_2_rrc_msg.c
deleted file mode 100644
index 245c73f58f174bbdd519b25689b0ead7a647ceee..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_2_rrc_msg.c
+++ /dev/null
@@ -1,838 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrm_2_rrc_msg.c
-
-\brief      Fonctions permettant le formattage des donnees pour l'envoi d'un
-            message sur le socket entre le  RRC et le RRM
-
-\author     BURLOT Pascal
-
-\date       16/07/08
-
-
-\par     Historique:
-        P.BURLOT 2009-01-20
-            + L2_id: ajout de memcpy() dans msg_rrci_cx_establish_resp()
-
-        L. IACOBELLI 2010-01-05
-            + new messages for sensing
-            + messages sent via ip
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include "L3_rrc_defs.h"
-#include "rrm_sock.h"
-#include "L3_rrc_interface.h"
-#include "rrc_rrm_msg.h"
-#include "rrm_util.h"
-
-#ifdef TRACE
-//! Macro creant la chaine a partir du nom de la variable
-#define STRINGIZER(x) #x
-//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
-const char *Str_msg_rrc_rrm[NB_MSG_RRC_RRM] = {
-  STRINGIZER(RRM_RB_ESTABLISH_REQ     ),
-  STRINGIZER(RRC_RB_ESTABLISH_RESP    ),
-  STRINGIZER(RRC_RB_ESTABLISH_CFM     ),
-  STRINGIZER(RRM_RB_MODIFY_REQ        ),
-  STRINGIZER(RRC_RB_MODIFY_RESP       ),
-  STRINGIZER(RRC_RB_MODIFY_CFM        ),
-  STRINGIZER(RRM_RB_RELEASE_REQ       ),
-  STRINGIZER(RRC_RB_RELEASE_RESP      ),
-  STRINGIZER(RRC_MR_ATTACH_IND        ),
-  STRINGIZER(RRM_SENSING_MEAS_REQ     ),
-  STRINGIZER(RRC_SENSING_MEAS_RESP    ),
-  STRINGIZER(RRC_CX_ESTABLISH_IND     ),
-  STRINGIZER(RRC_PHY_SYNCH_TO_MR_IND  ),
-  STRINGIZER(RRC_PHY_SYNCH_TO_CH_IND  ),
-  STRINGIZER(RRCI_CX_ESTABLISH_RESP   ),
-  STRINGIZER(RRC_SENSING_MEAS_IND     ),
-  STRINGIZER(RRM_SENSING_MEAS_RESP    ),
-  STRINGIZER(RRC_RB_MEAS_IND          ),
-  STRINGIZER(RRM_RB_MEAS_RESP         ),
-  STRINGIZER(RRM_INIT_CH_REQ          ),
-  STRINGIZER(RRM_INIT_MR_REQ          ),
-  STRINGIZER(RRM_INIT_MON_REQ         ),
-  STRINGIZER(RRM_INIT_SCAN_REQ        ),
-  STRINGIZER(RRC_INIT_SCAN_REQ        ),
-  STRINGIZER(UPDATE_SENS_RESULTS_3    ), //mod_lor_10_01_25
-  STRINGIZER(RRM_END_SCAN_REQ         ),
-  STRINGIZER(RRC_END_SCAN_REQ         ),
-  STRINGIZER(RRC_END_SCAN_CONF        ),
-  STRINGIZER(RRC_INIT_MON_REQ         ),
-  STRINGIZER(OPEN_FREQ_QUERY_4        ),
-  STRINGIZER(UPDATE_OPEN_FREQ_7       ),
-  STRINGIZER(UPDATE_SN_OCC_FREQ_5     ),
-  STRINGIZER(RRM_UP_FREQ_ASS          ),
-  STRINGIZER(RRM_END_SCAN_CONF        ),
-  STRINGIZER(RRC_UP_FREQ_ASS          ),//add_lor_10_11_05
-  STRINGIZER(RRM_UP_FREQ_ASS_SEC      ),//add_lor_10_11_05
-  STRINGIZER(RRC_UP_FREQ_ASS_SEC      )/*,//add_lor_10_11_05
-    STRINGIZER(RRM_OPEN_FREQ            ),
-    STRINGIZER(RRM_UPDATE_SN_FREQ       ),
-    STRINGIZER(RRC_UPDATE_SN_FREQ       ),
-    STRINGIZER(RRM_CLUST_SCAN_REQ       ),
-    STRINGIZER(RRC_CLUST_SCAN_REQ       ),
-    STRINGIZER(RRM_CLUST_SCAN_CONF      ),
-    STRINGIZER(RRM_CLUST_MON_REQ        ),
-    STRINGIZER(RRC_CLUST_MON_REQ        ),
-    STRINGIZER(RRM_CLUST_MON_CONF       ),
-    STRINGIZER(RRM_END_SCAN_CONF        ),
-    STRINGIZER(RRM_INIT_CONN_REQ        ),
-    STRINGIZER(RRC_INIT_CONN_CONF       ),
-    STRINGIZER(RRM_FREQ_ALL_PROP        ),
-    STRINGIZER(RRC_FREQ_ALL_PROP_CONF   ),
-    STRINGIZER(RRM_REP_FREQ_ALL         ),
-    STRINGIZER(RRC_REP_FREQ_ACK         ),
-    STRINGIZER(RRC_INIT_CONN_REQ        ),
-    STRINGIZER(RRM_CONN_SET             ),
-    STRINGIZER(RRC_FREQ_ALL_PROP        ),
-    STRINGIZER(RRM_FREQ_ALL_PROP_CONF   ),
-    STRINGIZER(RRC_REP_FREQ_ALL         ),
-    STRINGIZER(RRM_REP_FREQ_ACK         )  */
-
-} ;
-#endif
-
-/*!
-*******************************************************************************
-\brief  This function initialize the message header
-\return any return value
-*/
-static void init_rrc_msg_head(
-  msg_head_t    *msg_head , //!< message header to initialize
-  Instance_t     inst     , //!< instance ID
-  MSG_RRC_RRM_T  msg_type , //!< type of message to initialize
-  unsigned int   size     , //!< size of message
-  Transaction_t  Trans_id   //!< transaction id associated to this message
-)
-{
-  if ( msg_head != NULL ) {
-    msg_head->start    = START_MSG ;
-    msg_head->msg_type = 0xFF & msg_type ;
-    msg_head->inst     = inst  ;
-    msg_head->Trans_id = Trans_id  ;
-    msg_head->size     = size;
-  }
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_rb_establish_req().
-\return message formate
-*/
-msg_t *msg_rrm_rb_establish_req(
-  Instance_t               inst              , //!< instance ID
-  const LCHAN_DESC        *Lchan_desc        , //!< Logical Channel Descriptor Array
-  const MAC_RLC_MEAS_DESC *Mac_rlc_meas_desc , //!< MAC/RLC Measurement descriptors for RB
-  L2_ID                   *L2_id             , //!< Layer 2 (MAC) IDs for link
-  Transaction_t            Trans_id          , //!< Transaction ID
-  unsigned char           *L3_info           , //!< Optional L3 Information
-  L3_INFO_T                L3_info_t           //!< Type of L3 Information
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrm_rb_establish_req_t *p = RRM_CALLOC(rrm_rb_establish_req_t ,1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRM_RB_ESTABLISH_REQ, sizeof( rrm_rb_establish_req_t) ,Trans_id);
-
-      memcpy(&(p->Lchan_desc), Lchan_desc, sizeof(LCHAN_DESC) );
-      memcpy(&(p->Mac_rlc_meas_desc), Mac_rlc_meas_desc, sizeof(MAC_RLC_MEAS_DESC) );
-      memcpy(&(p->L2_id[0]), L2_id, 2*sizeof(L2_ID) ); // SRC+DST
-      p->L3_info_t    = L3_info_t ;
-
-      if ( L3_info_t != NONE_L3 )
-        memcpy( p->L3_info, L3_info, L3_info_t );
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_rb_modify_req().
-\return message formate
-*/
-msg_t *msg_rrm_rb_modify_req(
-  Instance_t               inst          , //!< instance ID
-  const LCHAN_DESC        *Lchan_desc    , //!< Logical Channel Descriptor Array
-  const MAC_RLC_MEAS_DESC *Mac_meas_desc , //!< MAC/RLC Measurement descriptors for RB
-  RB_ID                    Rb_id         , //!< Radio Bearer ID
-  Transaction_t            Trans_id        //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrm_rb_modify_req_t *p = RRM_CALLOC(rrm_rb_modify_req_t , 1) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRM_RB_MODIFY_REQ, sizeof( rrm_rb_modify_req_t) ,Trans_id);
-
-      memcpy(&(p->Lchan_desc), Lchan_desc, sizeof(LCHAN_DESC) );
-      memcpy(&(p->Mac_meas_desc), Mac_meas_desc, sizeof(MAC_RLC_MEAS_DESC) );
-
-      p->Rb_id    = Rb_id ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_rb_release_req().
-\return message formate
-*/
-msg_t *msg_rrm_rb_release_req(
-  Instance_t    inst     , //!< instance ID
-  RB_ID         Rb_id    , //!< Radio Bearer ID
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrm_rb_release_req_t *p = RRM_CALLOC(rrm_rb_release_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRM_RB_RELEASE_REQ, sizeof( rrm_rb_release_req_t) ,Trans_id);
-
-      p->Rb_id    = Rb_id ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_sensing_meas_req().
-\return message formate
-*/
-msg_t *msg_rrm_sensing_meas_req(
-  Instance_t          inst              , //!< instance ID
-  L2_ID               L2_id             , //!< Layer 2 (MAC) ID
-  SENSING_MEAS_DESC   Sensing_meas_desc , //!< Sensing Measurement Descriptor
-  Transaction_t       Trans_id            //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrm_sensing_meas_req_t *p = RRM_CALLOC(rrm_sensing_meas_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRM_SENSING_MEAS_REQ, sizeof( rrm_sensing_meas_req_t) ,Trans_id);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      memcpy(&(p->Sensing_meas_desc), &Sensing_meas_desc, sizeof(SENSING_MEAS_DESC)) ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-          rrci_cx_establish_resp().
-\return message formate
-*/
-msg_t * msg_rrci_cx_establish_resp(
-  Instance_t     inst      , //!< instance ID
-  Transaction_t  Trans_id  , //!< Transaction ID
-  L2_ID          L2_id     , //!< Layer 2 (MAC) ID
-  unsigned char *L3_info   , //!< Optional L3 Information
-  L3_INFO_T      L3_info_t   //!< Type of L3 Information
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrci_cx_establish_resp_t *p = RRM_CALLOC(rrci_cx_establish_resp_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRCI_CX_ESTABLISH_RESP, sizeof( rrci_cx_establish_resp_t ) ,Trans_id);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      p->L3_info_t    = L3_info_t     ;
-
-      if ( L3_info_t != NONE_L3 )
-        memcpy( p->L3_info, L3_info, L3_info_t );
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message generique de reponse pour les
-          fonctions :
-            - msg_rrm_sensing_meas_resp(),  msg_rrm_rb_meas_resp().
-\return message formate
-*/
-static msg_t *msg_rrm_generic_resp(
-  Instance_t    inst     , //!< instance ID
-  MSG_RRC_RRM_T msg_type , //!< type of message
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    init_rrc_msg_head(&(msg->head),inst,msg_type, 0, Trans_id);
-    msg->data = NULL ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_sensing_meas_resp().
-\return message formate
-*/
-msg_t * msg_rrm_sensing_meas_resp(
-  Instance_t    inst     , //!< instance ID
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  return msg_rrm_generic_resp( inst,RRM_SENSING_MEAS_RESP, Trans_id) ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_rb_meas_resp().
-\return message formate
-*/
-msg_t * msg_rrm_rb_meas_resp(
-  Instance_t    inst     , //!< instance ID
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  return msg_rrm_generic_resp( inst,RRM_RB_MEAS_RESP, Trans_id) ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_init_ch_req().
-\return message formate
-*/
-msg_t *msg_rrm_init_ch_req(
-  Instance_t        inst            , //!< instance ID
-  Transaction_t     Trans_id        , //!< Transaction ID
-  const LCHAN_DESC *Lchan_desc_srb0 , //!< Logical Channel Descriptor - SRB0
-  const LCHAN_DESC *Lchan_desc_srb1 , //!< Logical Channel Descriptor - SRB1
-  L2_ID             L2_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrm_init_ch_req_t *p = RRM_CALLOC(rrm_init_ch_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRM_INIT_CH_REQ, sizeof( rrm_init_ch_req_t ) ,Trans_id);
-
-      memcpy(&(p->Lchan_desc_srb0), Lchan_desc_srb0, sizeof(LCHAN_DESC) );
-      memcpy(&(p->Lchan_desc_srb1), Lchan_desc_srb1, sizeof(LCHAN_DESC) );
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_init_mr_req().
-\return message formate
-*/
-
-msg_t *msg_rrci_init_mr_req(
-  Instance_t        inst            , //!< instance ID
-  Transaction_t     Trans_id        , //!< Transaction ID
-  const LCHAN_DESC *Lchan_desc_srb0 , //!< Logical Channel Descriptor - SRB0
-  const LCHAN_DESC *Lchan_desc_srb1 , //!< Logical Channel Descriptor - SRB1
-  unsigned char     CH_index          //!< index to identify the CH
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrci_init_mr_req_t *p = RRM_CALLOC(rrci_init_mr_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRCI_INIT_MR_REQ, sizeof( rrci_init_mr_req_t ) ,Trans_id);
-
-      memcpy(&(p->Lchan_desc_srb0), Lchan_desc_srb0, sizeof(LCHAN_DESC) );
-      memcpy(&(p->Lchan_desc_srb1), Lchan_desc_srb1, sizeof(LCHAN_DESC) );
-      p->CH_index = CH_index ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_init_mon_req().
-\return message formate
-*/
-
-msg_t *msg_rrm_init_mon_req(
-  Instance_t        inst            , //!< instance ID
-  L2_ID             L2_id           ,
-  unsigned int      NB_chan         ,
-  unsigned int      interval        ,
-  unsigned int      *ch_to_scan     ,
-  Transaction_t     Trans_id          //!< Transaction ID
-
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof( rrm_init_mon_req_t ) + (NB_chan-1) * sizeof(unsigned int) ;
-
-    rrm_init_mon_req_t *p = RRM_CALLOC2(rrm_init_mon_req_t , size ) ;
-
-    if ( p != NULL ) {
-
-      //for (int i=0; i<NB_chan; i++)
-      //  fprintf(stdout,"msg_rrm_init_mon_req(), chan: %d\n", ch_to_scan[i]); //dbg
-      init_rrc_msg_head(&(msg->head),inst,RRM_INIT_MON_REQ, size ,Trans_id);
-
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      p->NB_chan = NB_chan;
-      p->interval = interval;
-
-      if ( NB_chan != 0 )
-        memcpy( p->ch_to_scan, ch_to_scan, NB_chan*sizeof(unsigned int) );
-
-
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_init_scan_req().
-\return message formate
-*/
-
-msg_t *msg_rrm_init_scan_req(
-  Instance_t       inst            , //!< instance ID
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq,
-  Transaction_t    Trans_id          //!< Transaction ID
-
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrm_init_scan_req_t *p = RRM_CALLOC(rrm_init_scan_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRM_INIT_SCAN_REQ, sizeof( rrm_init_scan_req_t ) ,Trans_id);
-
-      //mod_lor_10_03_12++
-      p->Start_fr     = Start_fr;
-      p->Stop_fr      = Stop_fr;
-      p->Meas_band    = Meas_band;
-      p->Meas_tpf     = Meas_tpf;
-      p->Nb_channels  = Nb_channels;
-      p->Overlap      = Overlap;
-      p->Sampl_freq   = Sampl_freq;
-      //mod_lor_10_03_12--
-
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_end_scan_req().
-\return message formate
-*/
-
-msg_t *msg_rrm_end_scan_req(
-  Instance_t    inst,
-  L2_ID         L2_id           ,
-  Transaction_t Trans_id
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    rrm_end_scan_req_t *p = RRM_CALLOC(rrm_end_scan_req_t , 1 ) ;
-
-    if ( p != NULL ) {
-      init_rrc_msg_head(&(msg->head),inst,RRM_END_SCAN_REQ, sizeof( rrm_end_scan_req_t ) ,Trans_id);
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-/*!//add_lor_10_11_05
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_up_freq_ass_sec().
-\return message formate
-*/
-
-msg_t *msg_rrm_up_freq_ass_sec(
-  Instance_t inst             , //!< instance ID
-  L2_ID *L2_id                , //!< Layer 2 (MAC) ID vector of SUs starting tx
-  L2_ID *L2_id_dest           , //!< Layer 2 (MAC) ID vector of SUs receiving tx
-  unsigned int NB_all         , //!< Number of allocated links
-  CHANNEL_T *ass_channels       //!< Vector of allocated links
-)
-
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-  int i;
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof(  rrm_up_freq_ass_sec_t );
-    //printf ("size rrm_up_freq_ass_t %d\n", size);//dbg
-    rrm_up_freq_ass_sec_t *p = RRM_CALLOC2( rrm_up_freq_ass_sec_t , size ) ;
-
-
-    if ( p != NULL ) {
-
-
-      init_rrc_msg_head(&(msg->head),inst,RRM_UP_FREQ_ASS_SEC, size,0);
-      p->NB_all = NB_all;
-
-      for (i=0; i<NB_all; i++) {
-        memcpy( p->L2_id[i].L2_id, L2_id[i].L2_id, sizeof(L2_ID) )  ;
-        memcpy( p->L2_id_dest[i].L2_id, L2_id_dest[i].L2_id, sizeof(L2_ID) )  ;
-      }
-
-      memcpy( p->ass_channels, ass_channels, NB_all*sizeof(CHANNEL_T) );
-
-    }
-
-    msg->data = (char *) p ;
-
-  }
-
-  return msg ;
-}
-
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_up_freq_ass().
-\return message formate
-*/
-
-msg_t *msg_rrm_up_freq_ass(
-  Instance_t inst             , //!< instance ID
-  L2_ID L2_id                 , //!< Layer 2 (MAC) ID of SU
-  unsigned int NB_chan        ,
-  CHANNEL_T *ass_channels
-)
-
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof(  rrm_up_freq_ass_t );// + (NB_chan-1) * sizeof(CHANNEL_T) ;//mod_lor_10_04_23
-    rrm_up_freq_ass_t *p = RRM_CALLOC2( rrm_up_freq_ass_t , size ) ;
-
-
-    if ( p != NULL ) {
-
-
-      init_rrc_msg_head(&(msg->head),inst,RRM_UP_FREQ_ASS, size,0);
-      p->NB_chan = NB_chan;
-      memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-      memcpy( p->ass_channels, ass_channels, NB_chan*sizeof(CHANNEL_T) );
-
-    }
-
-    msg->data = (char *) p ;
-
-  }
-
-  return msg ;
-}
-
-
-///! MESSAGES SENT VIA IP
-//mod_lor_10_04_27++
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        update_sens_results_3().
-\return message formate
-*/
-/*msg_t *msg_update_sens_results_3(
-    Instance_t inst,
-    L2_ID L2_id,                //!< FC L2_id
-    unsigned int NB_info,
-    Sens_ch_t *Sens_meas,
-    Transaction_t Trans_id
-    )
-{
-    msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-    if ( msg != NULL )
-    {
-        unsigned int size = sizeof( rrm_update_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ; //mod_lor_10_04_23
-
-        rrm_update_sens_t *p = RRM_CALLOC2(rrm_update_sens_t , size ) ;
-
-        if ( p != NULL )
-        {
-            //fprintf(stderr,"rrmUSR 1 \n");//dbg
-            init_rrc_msg_head(&(msg->head),inst, UPDATE_SENS_RESULTS_3, size ,Trans_id);
-
-            memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-            p->NB_info       = NB_info    ;
-            p->info_time     = 0 ;
-
-            if ( NB_info > 0 )
-            {
-                memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) )  ;
-            }
-            //fprintf(stdout,"msg_rrm_update_sens()2 : NB_chan %d\n", p->NB_info);//dbg
-            //fprintf(stdout,"NB_chan %d\n", p->NB_info);
-              //  for (int i=0; i<NB_info; i++)
-               // Sens_ch_t *ch = p->Sens_meas; ch!=NULL; ch=ch->next)
-            //fprintf(stdout,"channel in msg arr: %d\n", ch->Ch_id); //dbg
-
-        }
-        //fprintf(stderr,"rrmUSR end \n");//dbg
-        msg->data = (char *) p ;
-    }
-
-    return msg ;
-
-}*/
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        open_freq_query_4().
-\return message formate
-*//*
-msg_t *msg_open_freq_query_4(
-    Instance_t    inst,
-    L2_ID         L2_id           ,
-    QOS_CLASS_T   QoS             ,
-    Transaction_t Trans_id
-    )
-{
-    msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-    if ( msg != NULL )
-    {
-        open_freq_query_t *p = RRM_CALLOC(open_freq_query_t , 1 ) ;
-
-        if ( p != NULL )
-        {
-            init_rrc_msg_head(&(msg->head),inst,OPEN_FREQ_QUERY_4, sizeof( open_freq_query_t ) ,Trans_id);
-            memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-            p->QoS = QoS;
-        }
-        msg->data = (char *) p ;
-    }
-    return msg ;
-}*/
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_open_freq().
-\return message formate
-*//*
-msg_t *msg_update_open_freq_7(
-    Instance_t    inst,
-    L2_ID         L2_id           ,
-    unsigned int NB_free_ch,
-    CHANNEL_T *fr_channels,
-    Transaction_t Trans_id
-    )
-{
-    msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-    if ( msg != NULL )
-    {
-        unsigned int size = sizeof( update_open_freq_t );// + (NB_free_ch-1) * sizeof(CHANNEL_T) ;//mod_lor_10_04_23
-
-        update_open_freq_t *p = RRM_CALLOC2(update_open_freq_t , size ) ;
-
-        if ( p != NULL )
-        {
-            init_rrc_msg_head(&(msg->head),inst,UPDATE_OPEN_FREQ_7, size ,Trans_id);
-            memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-            p->NB_chan       = NB_free_ch    ;
-
-            if ( NB_free_ch > 0 )
-            {
-                memcpy( p->fr_channels , fr_channels, NB_free_ch * sizeof(CHANNEL_T) )  ;
-            }
-        }
-        msg->data = (char *) p ;
-    }
-    return msg ;
-}*/
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_update_SN_freq().
-\return message formate
-*/
-/*
-msg_t *msg_update_SN_occ_freq_5(
-        Instance_t inst             , //!< instance ID
-        L2_ID L2_id                 , //!< Layer 2 (MAC) ID of FC
-        unsigned int NB_chan        ,
-        unsigned int *occ_channels      ,
-        Transaction_t Trans_id        //!< Transaction ID
-        )
-
-{
-    msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-    //fprintf(stdout,"rrc_end_scan_ord() cp1\n"); //dbg
-
-    if ( msg != NULL )
-    {
-        unsigned int size = sizeof( update_SN_occ_freq_t );// + (NB_chan-1) * sizeof(unsigned int) ;//mod_lor_10_04_23
-        update_SN_occ_freq_t *p = RRM_CALLOC2(update_SN_occ_freq_t , size ) ;
-
-        if ( p != NULL )
-        {
-
-
-            init_rrc_msg_head(&(msg->head),inst,UPDATE_SN_OCC_FREQ_5, size,Trans_id);
-
-            memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-
-            p->NB_chan = NB_chan;
-            if ( NB_chan != 0 ){
-
-                memcpy( p->occ_channels, occ_channels, NB_chan*sizeof(unsigned int) );
-
-            }
-
-
-        }
-        msg->data = (char *) p ;
-
-    }
-    return msg ;
-}
-//mod_lor_10_04_27--*/
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        sns_end_scan_conf(). It sends confirmation of sensing interruprion to
-        the RRC that will informe the fusion center about it
-\return message formate
-*/
-msg_t * msg_rrm_end_scan_conf(
-  Instance_t    inst     , //!< instance ID
-  Transaction_t Trans_id   //!< Transaction ID
-)
-{
-  return msg_rrm_generic_resp( inst,RRM_END_SCAN_CONF, Trans_id) ;
-}
diff --git a/openair3/MESH/RRM/rrm_2_sensing_msg.c b/openair3/MESH/RRM/rrm_2_sensing_msg.c
deleted file mode 100644
index 5cd1d331334f687cd08036417ae4da69dc568db2..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_2_sensing_msg.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrm_2_rrc_msg.c
-
-\brief      Fonctions permettant le formattage des donnees pour l'envoi d'un
-            message sur le socket entre le  RRC et le RRM
-
-\author     BURLOT Pascal
-
-\date       16/07/08
-
-
-\par     Historique:
-        P.BURLOT 2009-01-20
-            + L2_id: ajout de memcpy() dans msg_rrci_cx_establish_resp()
-
-        L. IACOBELLI 2010-01-05
-            + new messages for sensing
-            + messages sent via ip
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include "L3_rrc_defs.h"
-//#include "rrm_sock.h"
-//#include "L3_rrc_interface.h"
-#include "sensing_rrm_msg.h"
-#include "rrm_util.h"
-
-#ifdef TRACE
-//! Macro creant la chaine a partir du nom de la variable
-#define STRINGIZER(x) #x
-//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
-const char *Str_msg_sns_rrm[NB_MSG_SNS_RRM] = {
-  STRINGIZER(SNS_UPDATE_SENS          ),
-  STRINGIZER(RRM_SCAN_ORD             ),
-  STRINGIZER(RRM_END_SCAN_ORD         ),
-  STRINGIZER(SNS_END_SCAN_CONF        )
-} ;
-#endif
-
-/*!
-*******************************************************************************
-\brief  This function initialize the message header
-\return any return value
-*/
-static void init_sensing_msg_head(
-  msg_head_t    *msg_head , //!< message header to initialize
-  Instance_t     inst     , //!< instance ID
-  MSG_SENSING_RRM_T  msg_type , //!< type of message to initialize
-  unsigned int   size     , //!< size of message
-  Transaction_t  Trans_id   //!< transaction id associated to this message
-)
-{
-  if ( msg_head != NULL ) {
-    msg_head->start    = START_MSG ;
-    msg_head->msg_type = 0xFF & msg_type ;
-    msg_head->inst     = inst  ;
-    msg_head->Trans_id = Trans_id  ;
-    msg_head->size     = size;
-  }
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_scan_ord().
-\return message formate
-*/
-
-msg_t *msg_rrm_scan_ord(
-  Instance_t inst             , ///< instance ID
-  unsigned int NB_chan        , ///< Number of channels to sens
-  unsigned int Meas_tpf       , ///< time on each carrier           //mod_lor_10_02_19
-  unsigned int Overlap        , ///< overlap factor (percentage)    //mod_lor_10_02_19
-  unsigned int Sampl_nb       , ///< number of samples per sub-band //mod_lor_10_04_01
-  Sens_ch_t    *ch_to_scan    , ///< Vector of channels to scan     //mod_lor_10_02_19
-  Transaction_t Trans_id        ///< Transaction ID
-
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    unsigned int size;
-    /*if ( NB_chan != 0 ){
-        size = sizeof( rrm_scan_ord_t ) + (NB_chan-1) * sizeof(unsigned int) ;
-
-    }else*/
-    size =  sizeof( rrm_scan_ord_t );
-    rrm_scan_ord_t *p = RRM_CALLOC2(rrm_scan_ord_t , size ) ;
-
-
-    if ( p != NULL ) {
-      init_sensing_msg_head(&(msg->head),inst,RRM_SCAN_ORD, size ,Trans_id);
-
-      p->Meas_tpf = Meas_tpf;     //mod_lor_10_02_19
-      p->Overlap = Overlap;       //mod_lor_10_02_19
-      p->Sampl_nb = Sampl_nb; //mod_lor_10_02_19
-      p->NB_chan = NB_chan;
-
-
-      if ( NB_chan != 0 ) {
-
-        memcpy( p->ch_to_scan, ch_to_scan, NB_chan*sizeof(Sens_ch_t) );
-
-      }
-
-      for (int i=0; i<NB_chan; i++)
-        printf("scan_ord i :%d, start %d, end %d sampl %d\n",i,p->ch_to_scan[i].Start_f,p->ch_to_scan[i].Final_f,Sampl_nb);
-
-    }
-
-    msg->data = (char *) p ;
-  }
-
-  return msg ;
-}
-
-
-
-/*!
-*******************************************************************************
-\brief  La fonction formate en un message les parametres de la fonction
-        rrm_end_scan_ord().
-\return message formate
-*/
-
-msg_t *msg_rrm_end_scan_ord(
-  Instance_t inst             , //!< instance ID
-  unsigned int NB_chan        ,
-  unsigned int *channels      ,
-  Transaction_t Trans_id        //!< Transaction ID
-)
-
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-  //fprintf(stdout,"rrc_end_scan_ord() cp1\n"); //dbg
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof( rrm_end_scan_ord_t ); //+ (NB_chan-1) * sizeof(unsigned int) ;
-    rrm_end_scan_ord_t *p = RRM_CALLOC2(rrm_end_scan_ord_t , size ) ;
-
-    if ( p != NULL ) {
-
-
-      init_sensing_msg_head(&(msg->head),inst,RRM_END_SCAN_ORD, size,Trans_id);
-
-
-      p->NB_chan = NB_chan;
-
-      if ( NB_chan != 0 ) {
-
-        memcpy( p->channels, channels, NB_chan*sizeof(unsigned int) );
-
-      }
-
-
-    }
-
-    msg->data = (char *) p ;
-
-  }
-
-  return msg ;
-}
-
diff --git a/openair3/MESH/RRM/rrm_5nodes.sh b/openair3/MESH/RRM/rrm_5nodes.sh
deleted file mode 100755
index 8fefb0643985320452be40f1b7d8feb0e140ed7d..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_5nodes.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-killall emul_int
-killall rrm
-
-xterm -T CMM -hold -e ./emul_int  &
-sleep 2
-./rrm -i 5  #2> log.txt
-#sleep 1
-#./emul_int
-
diff --git a/openair3/MESH/RRM/rrm_SENS.sh b/openair3/MESH/RRM/rrm_SENS.sh
deleted file mode 100644
index e9041b120e3e569f4447010f10043cd7bc759aba..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_SENS.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-killall emul_int
-killall graph
-killall rrm
-
-xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int  &
-
-sleep 2
-
-#xterm -T RRM1 -hold -e 
-./rrm -i 1 #2> log.txt
-
-#sleep 1
-#./emul_int  &
-
-
diff --git a/openair3/MESH/RRM/rrm_SS2_CH1.sh b/openair3/MESH/RRM/rrm_SS2_CH1.sh
deleted file mode 100644
index 29da1e5968bc4b562ddbf43e1548f107799a774f..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_SS2_CH1.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-killall emul_int
-killall graph
-killall rrm
-
-xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int  &
-sleep 2
-./rrm -i 4  #2> log.txt
-#sleep 1
-#./emul_int
-
diff --git a/openair3/MESH/RRM/rrm_SS2_global.sh b/openair3/MESH/RRM/rrm_SS2_global.sh
deleted file mode 100644
index df316762ff2c5f3f2fd0864e53458c1417c42d6a..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_SS2_global.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-killall emul_int
-killall graph
-killall rrm
-
-xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int  &
-
-sleep 2
-
-#xterm -T RRM1 -hold -e 
-./rrm -i 7 #2> log.txt
-
-#sleep 1
-#./emul_int  &
-
-
diff --git a/openair3/MESH/RRM/rrm_constant.c b/openair3/MESH/RRM/rrm_constant.c
deleted file mode 100644
index c0d6fbedf845c08d3eba0198d8cdd83cc2d18ce1..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_constant.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrm_constant.c
-
-\brief      Il contient les declarations des constantes et tables relative aux
-            fonctions du RRM (Radio Resource Management ).
-
-\author     BURLOT Pascal
-
-\date       17/07/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-
-#include "L3_rrc_defs.h"
-
-#include "rrm_constant.h"
-
-#ifdef OPENAIR2
-#include "platform_constants.h"
-#else
-
-//Always synchronize with value in openair2/LAYER2/MAC/defs.h
-#define BCCH_PAYLOAD_SIZE_MAX 20
-#define CCCH_PAYLOAD_SIZE_MAX 28
-
-#endif
-
-/*! \todo a definir les valeurs par defaut */
-
-//! \brief descripteur de canal logique en fonction de la QoS
-const  LCHAN_DESC        Lchan_desc[MAX_QOS_CLASS] = {
-  //  Transport    Max    Guaranteed  Max  Delay Target  LCHAN_t
-  //    Block   Transport    Bit      Bit  Class  BLER
-  //    size      Blocks     Rate     Rate
-  { BCCH_PAYLOAD_SIZE_MAX, 15, 64,   128,    1,    0,   LCHAN_BCCH   }, // SRB0
-  { CCCH_PAYLOAD_SIZE_MAX, 15, 64,   128,    1,    0,   LCHAN_CCCH   }, // SRB1
-  {      30,       20,        64,    128,    1,    0,   LCHAN_DCCH   }, // SRB2
-  {      52,       20,        64,    128,    1,    0,   LCHAN_DTCH_B }, // DTCH_B
-  {      52,       20,        64,    128,    1,    0,   LCHAN_DTCH   },
-  {      52,       20,        64,    128,    1,    0,   LCHAN_DTCH   },
-  {      52,       20,        64,    128,    1,    0,   LCHAN_DTCH   },
-  {      52,       20,        64,    128,    1,    0,   LCHAN_DTCH   },
-  {      52,       20,        64,    128,    1,    0,   LCHAN_DTCH   },
-  {      52,       20,        64,    128,    1,    0,   LCHAN_DTCH   },
-};
-
-//! \brief descripteur de la confiuration des mesures en fonction de la QoS
-const MAC_RLC_MEAS_DESC Mac_rlc_meas_desc[MAX_QOS_CLASS] = {
-  /* 0 : QOS_CLASS = SRB0 */
-  {
-    .Meas_trigger={
-      .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
-      .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
-    } ,
-    .Mac_avg={
-      .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
-      .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
-      .Spec_eff_forgetting_factor=0
-    } ,
-    .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
-  },
-  /* 1 : QOS_CLASS = SRB1 */
-  {
-    .Meas_trigger={
-      .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
-      .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
-    } ,
-    .Mac_avg={
-      .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
-      .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
-      .Spec_eff_forgetting_factor=0
-    } ,
-    .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
-  },
-  /* 2 : QOS_CLASS = SRB2 */
-  {
-    .Meas_trigger={
-      .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
-      .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
-    } ,
-    .Mac_avg={
-      .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
-      .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
-      .Spec_eff_forgetting_factor=0
-    } ,
-    .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
-  },
-  /* 3 : QOS_CLASS = DTCH_B */
-  {
-    .Meas_trigger={
-      .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
-      .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
-    } ,
-    .Mac_avg={
-      .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
-      .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
-      .Spec_eff_forgetting_factor=0
-    } ,
-    .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
-  },
-  /* 4 : QOS_CLASS  */
-  {
-    .Meas_trigger={
-      .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
-      .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
-    } ,
-    .Mac_avg={
-      .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
-      .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
-      .Spec_eff_forgetting_factor=0
-    } ,
-    .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
-  },
-  /* 5 : QOS_CLASS  = CSCH */
-  {
-    .Meas_trigger={
-      .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
-      .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
-    } ,
-    .Mac_avg={
-      .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
-      .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
-      .Spec_eff_forgetting_factor=0
-    } ,
-    .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
-  },
-  /* 6 : QOS_CLASS  = CPCH */
-  {
-    .Meas_trigger={
-      .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
-      .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
-    } ,
-    .Mac_avg={
-      .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
-      .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
-      .Spec_eff_forgetting_factor=0
-    } ,
-    .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
-  },
-  /* 7 : QOS_CLASS  */
-  {
-    .Meas_trigger={
-      .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
-      .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
-    } ,
-    .Mac_avg={
-      .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
-      .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
-      .Spec_eff_forgetting_factor=0
-    } ,
-    .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
-  },
-  /* 8 : QOS_CLASS  */
-  {
-    .Meas_trigger={
-      .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
-      .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
-    } ,
-    .Mac_avg={
-      .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
-      .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
-      .Spec_eff_forgetting_factor=0
-    } ,
-    .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
-  },
-  /* 9 : QOS_CLASS  */
-  {
-    .Meas_trigger={
-      .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
-      .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
-    } ,
-    .Mac_avg={
-      .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
-      .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
-      .Spec_eff_forgetting_factor=0
-    } ,
-    .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
-  }
-};
-
-//! \brief descripteur de la configuration des mesures de voisinage
-const SENSING_MEAS_DESC Sensing_meas_desc = {
-  //  RSSI_Threshold    RSSI_F_Factor      Rep_interval
-  0,                  0,              0
-};
-
-
-
-
diff --git a/openair3/MESH/RRM/rrm_constant.h b/openair3/MESH/RRM/rrm_constant.h
deleted file mode 100644
index 7abbf5bb31af5a844ce70ddbbd0c921afbbae964..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_constant.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file     rrm_constant.h
-
-\brief    Fichier d'entete contenant les declarations des types, des defines ,
-      et des fonctions relatives aux constantes du RRM
-      (Radio Resource Management ).
-
-\author   BURLOT Pascal
-
-\date     15/07/08
-
-
-\par     Historique:
-      $Author$  $Date$  $Revision$
-      $Id$
-      $Log$
-
-*******************************************************************************
-*/
-
-#ifndef RRM_CONSTANT_H
-#define RRM_CONSTANT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//! Index QoS pour le radio Bearer SRB0
-#define QOS_SRB0    0
-//! Index QoS pour le radio Bearer SRB1
-#define QOS_SRB1    1
-//! Index QoS pour le radio Bearer SRB2
-#define QOS_SRB2    2
-//! Index QoS pour le radio Bearer DTCH_B
-#define QOS_DTCH_B    3
-//! Index QoS pour le radio Bearer DTCH_D
-#define QOS_DTCH_D    4
-//! Index QoS pour le radio Bearer DTCH_USER1
-#define QOS_DTCH_USER1  5
-//! Index QoS pour le radio Bearer DTCH_USER2
-#define QOS_DTCH_USER2  6
-//! Index QoS pour le radio Bearer DTCH_USER3
-#define QOS_DTCH_USER3  7
-//! Index QoS pour le radio Bearer DTCH_USER4
-#define QOS_DTCH_USER4  8
-//! Index QoS pour le radio Bearer DTCH_USER5
-#define QOS_DTCH_USER5  9
-//! Nombre d'index de QoS
-#define MAX_QOS_CLASS   10
-
-
-extern const  LCHAN_DESC        Lchan_desc[MAX_QOS_CLASS] ;
-extern const  MAC_RLC_MEAS_DESC Mac_rlc_meas_desc[MAX_QOS_CLASS] ;
-extern const SENSING_MEAS_DESC  Sensing_meas_desc ;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RRM_CONSTANT_H */
diff --git a/openair3/MESH/RRM/rrm_graph.c b/openair3/MESH/RRM/rrm_graph.c
deleted file mode 100644
index db05b7a602d7bf48138fe8d510a82037f4eee512..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_graph.c
+++ /dev/null
@@ -1,2833 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrm_graph.c
-
-\brief      RRM (Radio Ressource Manager )
-
-            Cette application a pour objet
-                - de gérer la ressource radio du cluster
-                - de commander le RRC pour l'ouverture de RB
-                - de recevoir des commandes du CMM
-                - de gérer le voisinage
-
-\author     IACOBELLI Lorenzo
-
-\date       20/04/2010
-
-
-\par     Historique:
-
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <fcntl.h>
-#include <pthread.h>
-
-#include "debug.h"
-
-#include "L3_rrc_defs.h"
-#include "L3_rrc_interface.h"
-#include "cmm_rrm_interface.h"
-#include "rrm_sock.h"
-#include "rrc_rrm_msg.h"
-#include "ip_msg.h" //mod_lor_10_04_27
-#include "sensing_rrm_msg.h"
-#include "cmm_msg.h"
-#include "pusu_msg.h"
-#include "msg_mngt.h"
-#include "neighbor_db.h"
-#include "rb_db.h"
-#include "sens_db.h"
-#include "channels_db.h"
-#include "transact.h"
-#include "rrm_constant.h"
-#include "rrm_util.h"
-#include "rrm.h"
-
-#include "forms.h" //mod_eure_lor
-#include "sensing_form.h"//mod_eure_lor
-#include "SN_freq_form.h" //mod_lor_10_06_01
-#include "sens_scen_2_form.h"       //mod_lor_10_11_04
-#include "all_freq_to_users_form.h" //mod_lor_10_11_04
-#include "sens_CH1_scen_2.h"        //mod_lor_10_11_04
-#include "sens_sensor.h"        //mod_lor_11_02_18
-
-
-/*
-** ----------------------------------------------------------------------------
-** DEFINE LOCAL
-** ----------------------------------------------------------------------------
-*/
-//mod_lor_10_05_18++
-/*!
-*******************************************************************************
-\brief Definition of IP @ in main entities. i.e. they have to correspond
-        to the ones in node_info vector in emul_interface.c
-*/
-static unsigned char FC_L3id [4]= {0xC0,0xA8,0x0C,0x14};
-static unsigned char BTS_L3id [4]= {0x0A,0x00,0x02,0x02};
-static unsigned char CH_COLL_L3id [4]= {0x0A,0x00,0x02,0x02};
-FD_sensing_form *form;
-FD_Secondary_Network_frequencies *SN_form; //mod_lor_10_06_01
-FD_sens_scen_2 *Sens_form_CH2;             //mod_lor_10_11_04
-FD_all_freq_to_users *Chann_form;          //mod_lor_10_11_04
-FD_sens_CH1_scen_2 *Sens_form_CH1;         //mod_lor_10_11_04
-FD_sens_sensor *Sens_sensor_form;             //mod_lor_11_02_18
-static int SN_waiting = 0; //mod_lor_10_06_02
-//mod_lor_10_05_18--
-/*
-** ----------------------------------------------------------------------------
-** DECLARATION DE NOUVEAU TYPE
-** ----------------------------------------------------------------------------
-*/
-
-/*!
-*******************************************************************************
-\brief Structure de data passe en parametre au threads
-*/
-struct data_thread {
-  char *name              ; ///< Nom du thread
-  char *sock_path_local   ; ///< fichier du "rrm->..." pour le socket Unix
-  char *sock_path_dest    ; ///< fichier du "...->rrm " pour le socket Unix
-  sock_rrm_t  s           ; ///< Descripteur du socket
-}  ;
-
-//mod_lor_10_01_25++
-struct data_thread_int {
-  char *name              ; ///< Nom du thread
-  unsigned char *sock_path_local  ; ///< local IP address for internet socket
-  int local_port          ; ///< local IP port for internet socket
-  unsigned char *sock_path_dest   ; ///< dest IP address for internet socket
-  int dest_port           ; ///< dest IP port for internet socket
-  sock_rrm_int_t  s       ; ///< Descripteur du socket
-  int instance            ; ///<instance rrm
-}  ;
-//mod_lor_10_01_25--
-
-#ifdef RRC_KERNEL_MODE
-
-#define RRC2RRM_FIFO 14
-#define RRM2RRC_FIFO 15
-
-#define RX_MSG_STARTED 0; //mod_lor_10_01_25
-/*!
-*******************************************************************************
-\brief Structure regroupant les handles des fifos pour la communication en
-       mode KERNEL
-*/
-typedef struct {
-  int rrc_2_rrm_fifo;
-  int rrm_2_rrc_fifo;
-} RRM_FIFOS;
-
-#endif /* RRC_KERNEL_MODE */
-
-/*
-** ----------------------------------------------------------------------------
-** DECLARATION DES VARIABLES GLOBALES PUBLIQUES
-** ----------------------------------------------------------------------------
-*/
-rrm_t rrm_inst[MAX_RRM] ;
-int   nb_inst = -1 ;
-
-/*
-** ----------------------------------------------------------------------------
-** DECLARATION DES VARIABLES GLOBALES PRIVEES
-** ----------------------------------------------------------------------------
-*/
-#ifdef RRC_KERNEL_MODE
-static RRM_FIFOS Rrm_fifos;
-#endif
-
-static int flag_not_exit = 1 ;
-static pthread_t pthread_recv_rrc_msg_hnd,
-       pthread_recv_cmm_msg_hnd ,
-
-       pthread_send_rrc_msg_hnd ,
-
-       pthread_send_cmm_msg_hnd ,
-
-       pthread_recv_pusu_msg_hnd ,
-       pthread_recv_sensing_msg_hnd ,
-       pthread_send_sensing_msg_hnd ,
-
-       pthread_recv_int_msg_hnd ,
-       pthread_send_ip_msg_hnd ,
-
-       pthread_ttl_hnd ;
-static unsigned int cnt_timer = 0;
-static float st_fr = 2.385e6; //mod_lor_10_06_01
-static float end_fr = 2.412e6; //mod_lor_10_06_01
-
-#ifdef TRACE
-static FILE *cmm2rrm_fd  = NULL ;
-static FILE *rrc2rrm_fd  = NULL ;
-static FILE *pusu2rrm_fd = NULL ;
-static FILE *sensing2rrm_fd = NULL ;
-static FILE *ip2rrm_fd = NULL ;
-#endif
-static FILE *output_2 = NULL; //mod_lor_10_04_20
-
-/*
-** ----------------------------------------------------------------------------
-** DECLARATION DES FONCTIONS
-** ----------------------------------------------------------------------------
-*/
-/*!
-*******************************************************************************
-\brief  Comparaison de deux ID de niveau 2
-
-\return si 0 alors les IDs sont identiques
-*/
-static int L2_ID_cmp(
-  L2_ID *L2_id1, ///< ID de niveau 2
-  L2_ID *L2_id2  ///< ID de niveau 2
-)
-{
-  return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ;
-}
-
-//mod_eure_lor++
-/*!
-*******************************************************************************
-\brief  function to plot the spectrum sensing results
-
-\return NULL
-*/
-
-void plot_spectra(Sens_ch_t *S, unsigned int NB_info, FD_sensing_form *form, unsigned int sensor)
-{
-
-  float f[MAX_NUM_SB*NB_info],spec_dBm[MAX_NUM_SB*NB_info];
-  //float f[100],spec_dBm[100];
-  float Start_fr, Final_fr;//add_lor_11_02_16
-  Start_fr = st_fr; //add_lor_11_02_16
-  Final_fr = end_fr;//add_lor_11_02_16
-  unsigned int tot_sub_bands = MAX_NUM_SB*NB_info;
-  unsigned int SB_BW;
-  int i, j, k=0;
-
-  //printf("nb_info %d tot sub: %d \n",NB_info, tot_sub_bands);//dbg
-  // Compute frequencies and store in f
-  for (i=0; i<NB_info ; i++) {
-    SB_BW = (S[i].Final_f-S[i].Start_f)/MAX_NUM_SB;
-
-    for (j=0; j< MAX_NUM_SB; j++) {
-      f[k]=S[i].Start_f+(SB_BW*j)+(SB_BW/2);
-      // Transfer power measurements to spec_dBm (float)
-      spec_dBm[k] = S[i].mu0[j];
-
-      //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-      k++;
-    }
-  }
-
-  /* printf("Before for \n");
-
-   for (i=0;i<100 ;i++) {
-
-           f[i]=i/100.0;
-           // Transfer power measurements to spec_dBm (float)
-           spec_dBm[i] = rand()%20;
-
-           //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]);
-
-
-   }
-   printf("After for %d\n",i);
-   fl_set_xyplot_xbounds(form->spec_SN1,(float)0.0,(float)1.1);
-   fl_set_xyplot_ybounds(form->spec_SN1,(float)0,(float)20);
-   fl_set_xyplot_data(form->spec_SN1,f,spec_dBm,100,"","","");*/
-  //printf("In plot graph of sensor: %d\n", sensor);//dbg
-  if (sensor == 1) {
-    fl_set_xyplot_xbounds(form->spec_SN1,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(form->spec_SN1,0,50);
-
-    fl_set_xyplot_data(form->spec_SN1,f,spec_dBm,tot_sub_bands,"","","");
-  } else if (sensor == 2) {
-    fl_set_xyplot_xbounds(form->spec_SN2,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(form->spec_SN2,0,50);
-
-    fl_set_xyplot_data(form->spec_SN2,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == 3) {
-    fl_set_xyplot_xbounds(form->spec_SN3,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(form->spec_SN3,-115,-70);
-
-    fl_set_xyplot_data(form->spec_SN3,f,spec_dBm,tot_sub_bands,"","","");
-  } else
-    printf("Error! Sensor %d not considered",sensor);
-
-  fl_check_forms();
-}
-//mod_eure_lor--
-//mod_lor_10_06_01++
-/*!
-*******************************************************************************
-\brief  function to plot the selected channels
-
-\return NULL
-*/
-
-void plot_SN_channels(CHANNELS_DB_T *channels_db, unsigned int NB_info, unsigned int *selected, /*FD_Secondary_Network_frequencies *SN_form,*/ unsigned int rrm_id)
-{
-
-  float f[SB_NEEDED_FOR_SN*NB_info],spec_dBm[SB_NEEDED_FOR_SN*NB_info];
-  CHANNELS_DB_T *pCurrent;
-  //float f[100],spec_dBm[100];
-  unsigned int tot_sub_bands = SB_NEEDED_FOR_SN*NB_info;
-  unsigned int SB_BW;
-  float Start_fr, Final_fr;
-  int i, j, k=0;
-  printf("nb_info %d tot sub: %d \n",NB_info, tot_sub_bands);//dbg
-
-  // Compute frequencies and store in f
-  for (i=0; i<NB_info ; i++) {
-    pCurrent = get_chann_db_info(channels_db,selected[i]);
-    SB_BW = (pCurrent->channel.Final_f-pCurrent->channel.Start_f)/SB_NEEDED_FOR_SN;
-
-    for (j=0; j< SB_NEEDED_FOR_SN; j++) {
-      f[k]=pCurrent->channel.Start_f+(SB_BW*j)+(SB_BW/2);
-      // Transfer power measurements to spec_dBm (float)
-      spec_dBm[k] = 1;
-      //printf ("for k = %d f: %f; spec_dBm %f\n",k,f[k], spec_dBm[k]);//dbg
-      //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-      k++;
-    }
-  }
-
-  Start_fr = st_fr;
-  Final_fr = end_fr;
-  printf ("start: %f; end %f\n",f[0], f[k-1]);//dbg
-
-  if (rrm_id == BTS_ID) {
-    fl_set_xyplot_xbounds(SN_form->Selected_frequencies,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(SN_form->Selected_frequencies,0,2);
-
-    fl_set_xyplot_data(SN_form->Selected_frequencies,f,spec_dBm,tot_sub_bands,"","","");
-  } else if (rrm_id == FC_ID) {
-    fl_set_xyplot_xbounds(form->Secondary_Network_frequencies,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(form->Secondary_Network_frequencies,0,2);
-
-    fl_set_xyplot_data(form->Secondary_Network_frequencies,f,spec_dBm,tot_sub_bands,"","","");
-  }
-
-  fl_check_forms();
-}
-//mod_lor_10_06_01--
-//add_lor_10_11_04++
-/*!
-*******************************************************************************
-\brief  function to plot the spectrum sensing results in cluster 1
-
-\return NULL
-*/
-void plot_spectra_CH1(Sens_ch_t *S, unsigned int NB_info, /*FD_sens_CH1_scen_2 *Sens_form_CH1,*/ int sensor)
-{
-
-  float f[MAX_NUM_SB*NB_info],spec_dBm[MAX_NUM_SB*NB_info];
-  //float f[100],spec_dBm[100];
-  float Start_fr, Final_fr;//add_lor_11_01_10
-  Start_fr = st_fr; //add_lor_11_01_10
-  Final_fr = end_fr;//add_lor_11_01_10
-  unsigned int tot_sub_bands = MAX_NUM_SB*NB_info;
-  unsigned int SB_BW;
-  int i, j, k=0;
-
-  //printf("nb_info %d tot sub: %d \n",NB_info, tot_sub_bands);//dbg
-  // Compute frequencies and store in f
-  if (sensor!=-1) {
-    for (i=0; i<NB_info ; i++) {
-      SB_BW = (S[i].Final_f-S[i].Start_f)/MAX_NUM_SB;
-
-      for (j=0; j< MAX_NUM_SB; j++) {
-        f[k]=S[i].Start_f+(SB_BW*j)+(SB_BW/2);
-        // Transfer power measurements to spec_dBm (float)
-        spec_dBm[k] = S[i].mu0[j];
-        //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-        k++;
-      }
-    }
-  } else {
-    for (i=0; i<NB_info ; i++) {
-      SB_BW = (S[i].Final_f-S[i].Start_f)/MAX_NUM_SB;
-
-      for (j=0; j< MAX_NUM_SB; j++) {
-        f[k]=S[i].Start_f+(SB_BW*j)+(SB_BW/2);
-        // Transfer power measurements to spec_dBm (float)
-        spec_dBm[k] = (S[i].is_free[j]+1)%2;
-        //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-        k++;
-      }
-    }
-  }
-
-  if (sensor == 1) {
-    fl_set_xyplot_xbounds(Sens_form_CH1->User_1_sens,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH1->User_1_sens,0,50);
-
-    fl_set_xyplot_data(Sens_form_CH1->User_1_sens,f,spec_dBm,tot_sub_bands,"","","");
-
-  } else if (sensor == 2) {
-    fl_set_xyplot_xbounds(Sens_form_CH1->User_2_sens,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH1->User_2_sens,0,50);
-
-    fl_set_xyplot_data(Sens_form_CH1->User_2_sens,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == 3) {
-    fl_set_xyplot_xbounds(Sens_form_CH1->User_3_sens,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH1->User_3_sens,0,50);
-
-    fl_set_xyplot_data(Sens_form_CH1->User_3_sens,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == 4) {
-    fl_set_xyplot_xbounds(Sens_form_CH1->User_4_sens,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH1->User_4_sens,-110,-80);
-
-    fl_set_xyplot_data(Sens_form_CH1->User_4_sens,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == -1) {
-    fl_set_xyplot_xbounds(Sens_form_CH1->Cluster_2_sensing,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH1->Cluster_2_sensing,0,2);
-
-    fl_set_xyplot_data(Sens_form_CH1->Cluster_2_sensing,f,spec_dBm,tot_sub_bands,"","","");
-  } else
-    printf("Error! User %d not considered 1",sensor); //mod_lor_10_12_07
-
-  fl_check_forms();
-
-}
-
-/*!
-*******************************************************************************
-\brief  function to plot the spectrum sensing results of collaborative cluster 2
-
-\return NULL
-*/
-void plot_spectra_CH2(Sens_ch_t *S, unsigned int NB_info, /*FD_sensing_form *form,*/ unsigned int sensor)
-{
-
-  float f[MAX_NUM_SB*NB_info],spec_dBm[MAX_NUM_SB*NB_info];
-  //float f[100],spec_dBm[100];
-  float Start_fr, Final_fr;//add_lor_11_01_10
-  Start_fr = st_fr; //add_lor_11_01_10
-  Final_fr = end_fr;//add_lor_11_01_10
-  unsigned int tot_sub_bands = MAX_NUM_SB*NB_info;
-  unsigned int SB_BW;
-  int i, j, k=0;
-
-  for (i=0; i<NB_info ; i++) {
-    SB_BW = (S[i].Final_f-S[i].Start_f)/MAX_NUM_SB;
-
-    for (j=0; j< MAX_NUM_SB; j++) {
-      f[k]=S[i].Start_f+(SB_BW*j)+(SB_BW/2);
-      // Transfer power measurements to spec_dBm (float)
-      spec_dBm[k] = S[i].mu0[j];
-      //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-      k++;
-    }
-  }
-
-  if (sensor == 1) {
-    fl_set_xyplot_xbounds(Sens_form_CH2->User_1,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH2->User_1,0,50);
-
-    fl_set_xyplot_data(Sens_form_CH2->User_1,f,spec_dBm,tot_sub_bands,"","","");
-  } else if (sensor == 2) {
-    fl_set_xyplot_xbounds(Sens_form_CH2->User_2,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH2->User_2,0,50);
-
-    fl_set_xyplot_data(Sens_form_CH2->User_2,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == 3) {
-    fl_set_xyplot_xbounds(Sens_form_CH2->User_3,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH2->User_3,-110,-80);
-
-    fl_set_xyplot_data(Sens_form_CH2->User_3,f,spec_dBm,tot_sub_bands,"","","");
-  } else if(sensor == 4) {
-    fl_set_xyplot_xbounds(Sens_form_CH2->User_4,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-    fl_set_xyplot_ybounds(Sens_form_CH2->User_4,-110,-80);
-
-    fl_set_xyplot_data(Sens_form_CH2->User_4,f,spec_dBm,tot_sub_bands,"","","");
-  } else
-    printf("Error! User %d not considered 2",sensor); //mod_lor_10_12_07
-
-  fl_check_forms();
-}
-
-//mod_lor_11_02_18++
-/*!
-*******************************************************************************
-\brief  function to plot the spectrum sensing results of collaborative cluster 2
-
-\return NULL
-*/
-void plot_spectra_sensor(Sens_ch_t *S, unsigned int NB_info)
-{
-
-  float f[NUM_SB*NB_info],spec_dBm[NUM_SB*NB_info];
-  //float f[100],spec_dBm[100];
-  float Start_fr, Final_fr;//add_lor_11_01_10
-  Start_fr = st_fr; //add_lor_11_01_10
-  Final_fr = end_fr;//add_lor_11_01_10
-  unsigned int tot_sub_bands = NUM_SB*NB_info;
-  unsigned int SB_BW;
-  int i, j, k=0;
-
-  if (NB_info>0) {
-    Start_fr = S[0].Start_f; //add_lor_11_01_10
-    Final_fr = S[NB_info-1].Final_f;//add_lor_11_01_10
-  }
-
-  for (i=0; i<NB_info ; i++) {
-    SB_BW = (S[i].Final_f-S[i].Start_f)/NUM_SB;
-
-    for (j=0; j< NUM_SB; j++) {
-      f[k]=S[i].Start_f+(SB_BW*j)+(SB_BW/2);
-      // Transfer power measurements to spec_dBm (float)
-      spec_dBm[k] = S[i].mu0[j];
-      //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f,  S[i].mu0[j], f[k],  spec_dBm[k]); //dbg
-      k++;
-    }
-  }
-
-  fl_set_xyplot_xbounds(Sens_sensor_form->local_sensing_results,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f);
-  fl_set_xyplot_ybounds(Sens_sensor_form->local_sensing_results,-115,0);
-
-  fl_set_xyplot_data(Sens_sensor_form->local_sensing_results,f,spec_dBm,tot_sub_bands,"","","");
-
-  fl_check_forms();
-}
-//mod_lor_11_02_18--
-/*!
-*******************************************************************************
-\brief  function to plot the attributed channel
-
-\return NULL
-*/
-
-void plot_all_chann_scen_2(unsigned int *tx, unsigned int *chann_start, unsigned int *chann_end, unsigned int NB_info, unsigned int rrm_id)
-{
-
-  float Start_fr, Final_fr;
-
-  float f[SB_NEEDED_FOR_SN*NB_info], spec_dBm[SB_NEEDED_FOR_SN*NB_info];
-  Start_fr = st_fr;
-  Final_fr = end_fr;
-
-  unsigned int tot_sub_bands = SB_NEEDED_FOR_SN*NB_info;
-  unsigned int SB_BW ;
-
-  int i, j, k=0;
-
-  printf ("rrm_id: %d; num_info %d\n",rrm_id, NB_info);//dbg
-
-  // Compute frequencies and store in f
-  for (i=0; i<NB_info ; i++) {
-    SB_BW = (chann_end[i]-chann_start[i])/SB_NEEDED_FOR_SN;
-
-    for (j=0; j< SB_NEEDED_FOR_SN; j++) {
-      f[k]=chann_start[i]+(SB_BW*j)+(SB_BW/2);
-
-      if (tx[i]==1)
-        spec_dBm[k] = 2;
-      else
-        spec_dBm[k] = 1;
-
-      k++;
-    }
-  }
-
-  printf("tot sub: %d k %d\n",tot_sub_bands,k);//dbg
-  printf ("start: %f; end %f\n",f[0], f[k-1]);//dbg
-
-  if (rrm_id == 1) {
-    fl_set_xyplot_xbounds(Chann_form->User_1_channels,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(Chann_form->User_1_channels,0,3);
-    fl_set_xyplot_data(Chann_form->User_1_channels,f,spec_dBm,tot_sub_bands,"","","");
-
-  } else if (rrm_id == 2) {
-    fl_set_xyplot_xbounds(Chann_form->User_2_channels,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(Chann_form->User_2_channels,0,3);
-    fl_set_xyplot_data(Chann_form->User_2_channels,f,spec_dBm,tot_sub_bands,"","","");
-
-  } else if (rrm_id == 3) {
-    fl_set_xyplot_xbounds(Chann_form->User_3_channels,Start_fr,Final_fr);
-    fl_set_xyplot_ybounds(Chann_form->User_3_channels,0,3);
-    fl_set_xyplot_data(Chann_form->User_3_channels,f,spec_dBm,tot_sub_bands,"","","");
-
-  }/*else if (rrm_id == 4){
-
-        fl_set_xyplot_xbounds(Chann_form->User_4_channels,Start_fr,Final_fr);
-        fl_set_xyplot_ybounds(Chann_form->User_4_channels,0,3);
-        fl_set_xyplot_data(Chann_form->User_4_channels,f,spec_dBm,tot_sub_bands,"","","");
-
-    }*/else
-    printf("Error! User %d not considered 3",rrm_id);
-
-  fl_check_forms();
-}
-//add_lor_10_11_04--
-//mod_lor_10_04_20++
-static msg_t *msg_graph_resp(
-  Instance_t    inst     , //!< instance ID
-  int msg_type  //!< type of message
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    msg->head.start    = START_MSG ;
-    msg->head.msg_type = 0xFF & msg_type ;
-    msg->head.inst     = inst  ;
-    msg->head.Trans_id = 0  ;
-    msg->head.size     = 0;
-    msg->data = NULL ;
-  }
-
-  return msg ;
-}
-
-//mod_lor_10_04_20--
-//mod_lor_10_04_21++
-typedef struct {
-  unsigned int        NB_chan              ; //!< Number of channels
-  unsigned int        NB_val               ; //!< Number of values
-  unsigned int        channels[3*NB_SENS_MAX]; //!< Vector of channels //mod_lor_10_07_01: 3*NB_SENS_MAX instead of NB_SENS_MAX
-  unsigned int        val[3*NB_SENS_MAX]    ; //!< Vector of values  //mod_lor_10_07_01: 3*NB_SENS_MAX instead of NB_SENS_MAX
-} gen_sens_info_t ;
-//mod_lor_10_11_09++
-
-
-static msg_t *msg_generic_sens_resp(
-  Instance_t   inst     , //!< instance ID
-  int          msg_type,  //!< type of message
-  unsigned int NB_chan,//!< Number of channels
-  unsigned int NB_val , //!< Number of values
-  unsigned int *channels, //!< Vector of channels
-  unsigned int *val    , //!< Vector of values
-  Transaction_t trans
-)
-{
-  msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
-
-  if ( msg != NULL ) {
-    unsigned int size = sizeof( gen_sens_info_t );
-    gen_sens_info_t *p = RRM_CALLOC(gen_sens_info_t  ,1 ) ;
-
-    if ( p != NULL ) {
-      msg->head.start    = START_MSG ;
-      msg->head.msg_type = 0xFF & msg_type ;
-      msg->head.inst     = inst  ;
-      msg->head.Trans_id = trans  ;
-      msg->head.size     = size;
-
-      p->NB_chan = NB_chan;
-
-      if ( NB_chan != 0 )
-        memcpy( p->channels, channels, NB_chan*sizeof(unsigned int) );
-
-      p->NB_val = NB_val;
-
-      if ( NB_chan != 0 )
-        memcpy( p->val, val, NB_val*sizeof(unsigned int) );
-
-    }
-
-    msg->data = (char *) p ;
-
-
-  }
-
-  return msg ;
-
-
-}
-
-//mod_lor_10_04_21--
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des ttl des transactions (rrc ou cmm).
-
-\return NULL
-*/
-static void * thread_processing_ttl (
-  void * p_data /**< parametre du pthread */
-)
-{
-  int ii ;
-  fprintf(stderr,"TTL :starting ... \n");
-  fflush(stdout);
-
-  while ( flag_not_exit) {
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      rrm_t *rrm = &rrm_inst[ii] ;
-
-      pthread_mutex_lock(   &( rrm->cmm.exclu )  ) ;
-      dec_all_ttl_transact( rrm->cmm.transaction ) ;
-      // Trop simpliste et pas fonctionnel , il faut faire une gestion des erreurs de transaction
-      //if (rrm->cmm.transaction!=NULL)
-      //  fprintf(stderr,"delete on cmm of %d\n", ii); //dbg
-      del_all_obseleted_transact( &(rrm->cmm.transaction));
-      pthread_mutex_unlock( &( rrm->cmm.exclu )  ) ;
-
-      pthread_mutex_lock(   &( rrm->rrc.exclu )  ) ;
-      dec_all_ttl_transact( rrm->rrc.transaction ) ;
-      // idem :commentaire ci-dessus
-      //if (rrm->rrc.transaction!=NULL)
-      //  fprintf(stderr,"delete on rrc of %d\n", ii); //dbg
-      del_all_obseleted_transact( &(rrm->rrc.transaction));
-      pthread_mutex_unlock( &( rrm->rrc.exclu )  ) ;
-
-      pthread_mutex_lock(   &( rrm->pusu.exclu )  ) ;
-      dec_all_ttl_transact( rrm->pusu.transaction ) ;
-      // idem :commentaire ci-dessus
-      del_all_obseleted_transact( &(rrm->pusu.transaction));
-      pthread_mutex_unlock( &( rrm->pusu.exclu )  ) ;
-
-      pthread_mutex_lock(   &( rrm->sensing.exclu )  ) ;
-      dec_all_ttl_transact( rrm->sensing.transaction ) ;
-      // idem :commentaire ci-dessus
-      del_all_obseleted_transact( &(rrm->sensing.transaction));
-      pthread_mutex_unlock( &( rrm->sensing.exclu )  ) ;
-
-      //mod_lor_10_01_25++
-      pthread_mutex_lock(   &( rrm->ip.exclu )  ) ;
-      dec_all_ttl_transact( rrm->ip.transaction ) ;
-      // idem :commentaire ci-dessus
-      del_all_obseleted_transact( &(rrm->ip.transaction));
-      pthread_mutex_unlock( &( rrm->ip.exclu )  ) ;
-      //mod_lor_10_01_25--*/
-
-    }
-
-    cnt_timer++;
-    usleep( 2000*1000 ) ;//mod_lor_10_03_01: incrementing timeout
-  }
-
-  fprintf(stderr,"... stopped TTL\n");
-  fflush(stdout);
-  return NULL;
-
-}
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages sortants sur les sockets (rrc ou cmm).
-
-\return NULL
-*/
-static void * thread_send_msg_cmm (
-  void * p_data /**< parametre du pthread */
-)
-{
-  int ii ;
-  int no_msg ;
-  fprintf(stderr,"Thread Send Message: starting ... \n");
-  fflush(stderr);
-  file_msg_t *pItem ;
-
-  while ( flag_not_exit) {
-    no_msg = 0  ;
-
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      rrm_t      *rrm = &rrm_inst[ii] ;
-
-      pItem = get_msg( &(rrm->file_send_cmm_msg) ) ;
-
-
-      if ( pItem == NULL )
-        no_msg++;
-      else {
-        int r =  send_msg( pItem->s, pItem->msg );
-        WARNING(r!=0);
-      }
-
-      RRM_FREE( pItem ) ;
-    }
-
-    if ( no_msg==nb_inst ) // Pas de message
-      usleep(1000);
-  }
-
-  fprintf(stderr,"... stopped Thread Send Message\n");
-  fflush(stderr);
-  return NULL;
-}
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages sortants sur les sockets (rrc ou cmm).
-
-\return NULL
-*/
-static void * thread_send_msg_rrc (
-  void * p_data /**< parametre du pthread */
-)
-{
-  int ii ;
-
-  int no_msg ;
-  fprintf(stderr,"Thread Send Message To RRC: starting ... \n");
-  fflush(stderr);
-  file_msg_t *pItem ;
-
-  while ( flag_not_exit) {
-    no_msg = 0  ;
-
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      rrm_t      *rrm = &rrm_inst[ii] ;
-
-      pItem = get_msg( &(rrm->file_send_rrc_msg) ) ;
-
-
-      if ( pItem == NULL )
-        no_msg++;
-      else {
-
-#ifdef RRC_KERNEL_MODE
-        // envoi du header
-        status = write (Rrm_fifos.rrm_2_rrc_fifo,(char*) pItem->msg, sizeof(msg_head_t) );
-
-        if ( pItem->msg->head.size >0)
-          status = write (Rrm_fifos.rrm_2_rrc_fifo,(pItem->msg)->data, pItem->msg->head.size);
-
-        //printf( "status write: %d \n",status);
-        //printf("send msg to rrc [%d] id msg: %d \n", (pItem->msg)->head.inst, (pItem->msg)->head.msg_type );
-#else
-        int r =  send_msg( pItem->s, pItem->msg );
-        WARNING(r!=0);
-#endif
-      }
-
-      RRM_FREE( pItem ) ;
-    }
-
-    if ( no_msg==nb_inst ) // Pas de message
-      usleep(1000);
-  }
-
-  fprintf(stderr,"... stopped Thread Send Message\n");
-  fflush(stderr);
-  return NULL;
-}
-
-//mod_lor_10_01_25++
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages sortants sur les sockets (rrc ou cmm).
-
-\return NULL
-*/
-static void * thread_send_msg_ip (
-  void * p_data /**< parametre du pthread */
-)
-{
-  int ii ;
-  int no_msg ;
-  fprintf(stderr,"Thread Send Message IP: starting ... \n");
-  fflush(stderr);
-  file_msg_t *pItem ;
-
-  while ( flag_not_exit) {
-    no_msg = 0  ;
-
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      rrm_t      *rrm = &rrm_inst[ii] ;
-
-      pItem = get_msg( &(rrm->file_send_ip_msg) ) ;
-
-
-      if ( pItem == NULL )
-        no_msg++;
-      else {
-        //fprintf(stderr,"Thread Send Message inst %d socket %d\n", ii, rrm->ip.s->s); //dbg
-        // if (pItem->msg->head.msg_type == 26)
-        //   msg_fct( "IP -> UPDATE_SENSING_RESULTS_3 inst: %d sockid %d\n", ii, rrm->ip.s->s);//dbg
-        //msg_fct( "before send_msg_int msg: %d socket %d\n", pItem->msg->head.msg_type, rrm->ip.s->s);//dbg
-        int r =  send_msg_int( rrm->ip.s, pItem->msg );
-        //msg_fct( "after send_msg_int \n");//dbg
-
-        WARNING(r!=0);
-      }
-
-      RRM_FREE( pItem ) ;
-    }
-
-    if ( no_msg==nb_inst ) // Pas de message
-      usleep(1000);
-  }
-
-  fprintf(stderr,"... stopped Thread Send Message\n");
-  fflush(stderr);
-  return NULL;
-}
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages sortants sur les sockets (rrc ou cmm).
-
-\return NULL
-*/
-static void * thread_send_msg_sensing (
-  void * p_data /**< parametre du pthread */
-)
-{
-  int ii ;
-
-  int no_msg ;
-  fprintf(stderr,"Thread Send Message To Sensing Unit: starting ... \n");
-  fflush(stderr);
-  file_msg_t *pItem ;
-
-  while ( flag_not_exit) {
-    no_msg = 0  ;
-
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      rrm_t      *rrm = &rrm_inst[ii] ;
-
-      pItem = get_msg( &(rrm->file_send_sensing_msg) ) ;
-
-
-      if ( pItem == NULL )
-        no_msg++;
-      else {
-
-        int r =  send_msg( pItem->s, pItem->msg );
-        WARNING(r!=0);
-
-      }
-
-      RRM_FREE( pItem ) ;
-    }
-
-    if ( no_msg==nb_inst ) // Pas de message
-      usleep(1000);
-  }
-
-  fprintf(stderr,"... stopped Thread Send Message\n");
-  fflush(stderr);
-  return NULL;
-}
-
-//mod_lor_10_01_25--*/
-
-
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages entrant sur une interface (rrc, cmm ou sensing).
-
-\return NULL
-*/
-
-static void * thread_recv_msg (
-  void * p_data /**< parametre du pthread */
-)
-{
-  msg_t *msg ;
-  struct data_thread *data = (struct data_thread *) p_data;
-  int sock ;
-
-  fprintf(stderr,"%s interfaces :starting ... %s %s\n",data->name , data->sock_path_local, data->sock_path_dest);
-  fflush(stderr);
-
-  /* ouverture des liens de communications */
-  sock = open_socket( &data->s,  data->sock_path_local, data->sock_path_dest ,0 );
-
-  if ( sock != -1 ) {
-    fprintf(stderr,"   %s -> socket =  %d\n",data->name , sock );
-    fflush(stderr);
-
-    while (flag_not_exit) {
-      msg = (msg_t *) recv_msg(&data->s) ;
-
-      if (msg == NULL ) {
-        fprintf(stderr,"Server closed connection\n");
-        flag_not_exit = 0;
-      } else {
-        int inst = msg->head.inst ;
-        rrm_t      *rrm = &rrm_inst[inst];
-
-        put_msg( &(rrm->file_recv_msg), 0, &data->s, msg) ;//mod_lor_10_01_25
-      }
-    }
-
-    close_socket(&data->s) ;
-  }
-
-  fprintf(stderr,"... stopped %s interfaces\n",data->name);
-  return NULL;
-}
-
-//mod_lor_10_01_25++
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages entrant via ip.
-
-\return NULL
-*/
-
-static void * thread_recv_msg_int (
-  void * p_data /**< parametre du pthread */
-)
-{
-  msg_t *msg ;
-  struct data_thread_int *data = (struct data_thread_int *) p_data;
-  rrm_t      *rrm = &rrm_inst[data->instance];
-  int sock ;
-
-  fprintf(stderr,"%s interfaces :starting on inst. %d ... ",data->name, data->instance  );
-  fprintf(stderr,"\n");//dbg
-
-  fflush(stderr);
-
-  /* ouverture des liens de communications */
-  sock = open_socket_int( &data->s,  data->sock_path_local, data->local_port, data->sock_path_dest, data->dest_port,0 );
-  data->s.s = sock;
-  memcpy(rrm->ip.s, &(data->s), sizeof(sock_rrm_int_t));
-
-  if ( sock != -1 ) {
-    fprintf(stderr,"   %s -> socket =  %d\n",data->name , sock );
-    fflush(stderr);
-
-    while (flag_not_exit) {
-
-      msg = (msg_t *) recv_msg_int(rrm->ip.s) ;
-
-      if (msg == NULL ) {
-        fprintf(stderr,"Server closed connection\n");
-        flag_not_exit = 0;
-      } else {
-        //fprintf(stderr,"msg received from %X \n", rrm->ip.s->in_dest_addr.sin_addr.s_addr);
-        put_msg( &(rrm->file_recv_msg), 1, &data->s, msg) ;
-
-      }
-    }
-
-    close_socket_int(&data->s) ;
-  }
-
-  fprintf(stderr,"... stopped %s interfaces\n",data->name);
-  return NULL;
-}
-//mod_lor_10_01_25--
-
-/*******************************************************************************/
-#ifdef RRC_KERNEL_MODE
-char Header_buf[sizeof(msg_head_t)];
-char Data[2400];
-unsigned short  Header_read_idx=0,
-                Data_read_idx=0,
-                Data_to_read=0,
-                Header_size=sizeof(msg_head_t),
-                READ_OK=1;
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages entrant sur l'interface fifo du RRC
-        en mode KERNEL
-
-\return NULL
-*/
-static void * thread_recv_msg_fifo (void * p_data )
-{
-  msg_t      *msg_cpy   ;
-  rrm_t      *rrm       ;
-  msg_head_t *Header    ;
-  int         taille    ;
-  int         inst      ;
-  int         bytes_read;
-
-  msg_fifo("[RRM]: RX MSG_FIFOS %d handler starting....\n",RRC2RRM_FIFO);
-
-  while (flag_not_exit) {
-    if(Header_read_idx < Header_size) {
-      bytes_read = read(Rrm_fifos.rrc_2_rrm_fifo,&Data[Header_read_idx],Header_size-Header_read_idx);
-
-      if(bytes_read <0)
-        continue;
-
-      Header_read_idx+=bytes_read;
-      msg_fifo("[RRM]: RX MSG ON FIFOS %d: Header size %d, bytes_read %d\n",RRC2RRM_FIFO,Header_read_idx,bytes_read);
-
-      if(Header_read_idx == Header_size) {
-        Header=(msg_head_t*)Data;
-        Data_to_read=Header->size;
-        Data_read_idx=Header_read_idx;
-        msg_fifo("[RRM]: RX MSG ON FIFOS %d: Header read completed, Data size %d\n",RRC2RRM_FIFO,Data_to_read);
-        Header = (msg_head_t *) Data;
-      } else
-        continue;
-    }
-
-    if (Data_to_read > 0 ) {
-      bytes_read = read (Rrm_fifos.rrc_2_rrm_fifo,&Data[Data_read_idx],Data_to_read);
-
-      if(bytes_read <0)
-        continue;
-
-      Data_to_read-=bytes_read;
-      Data_read_idx+=bytes_read;
-      msg_fifo("[RRM]: RX MSG ON FIFOS %d: data size %d\n",RRC2RRM_FIFO,Data_read_idx-Header_read_idx);
-
-      if(Data_to_read > 0 )
-        continue;
-
-      Header_read_idx= 0 ;
-      Data_read_idx  = 0 ;
-      Data_to_read   = 0 ;
-      taille         = Header->size + sizeof(msg_head_t) ;
-      msg_cpy        = RRM_MALLOC( msg_t, taille ) ;
-      inst           = Header->inst ;
-      rrm            = &rrm_inst[inst];
-
-      memcpy( msg_cpy, Data , taille ) ;
-      msg_fifo("[RRM]: RX MSG ON FIFOS %d: data read completed, Proccess on inst .... %d\n",RRC2RRM_FIFO,inst);
-      put_msg( &(rrm->file_recv_msg), 0, rrm->rrc.s, msg_cpy) ; //mod_lor_10_01_25
-      msg_fifo("[RRM]: RX MSG ON FIFOS %d: data read completed, Proccess on inst done %d\n",RRC2RRM_FIFO,inst);
-    } else {
-      /* Seulement le header */
-      Header_read_idx= 0 ;
-      Data_read_idx  = 0 ;
-      Data_to_read   = 0 ;
-      taille         = sizeof(msg_head_t) ;
-      msg_cpy        = RRM_MALLOC( msg_t, taille ) ;
-      inst           = Header->inst ;
-      rrm            = &rrm_inst[inst];
-
-      memcpy( msg_cpy, Data , taille ) ;
-      put_msg( &(rrm->file_recv_msg), 0, rrm->rrc.s, msg_cpy) ;//mod_lor_10_01_25
-    }
-  }
-
-  return NULL;
-}
-#endif
-/*!
-*******************************************************************************
-\brief  traitement des messages entrant sur l'interface CMM
-
-\return Auncune valeur
-*/
-static void processing_msg_cmm(
-  rrm_t       *rrm        , ///< Donnee relative a une instance du RRM
-  msg_head_t  *header     , ///< Entete du message
-  char        *msg        , ///< Message recu
-  int         len_msg       ///< Longueur du message
-)
-{
-#ifdef TRACE
-
-  if ( header->msg_type < NB_MSG_CMM_RRM )
-    fprintf(cmm2rrm_fd,"%lf CMM->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_cmm_rrm[header->msg_type], header->msg_type,header->Trans_id);
-  else
-    fprintf(cmm2rrm_fd,"%lf CMM->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id);
-
-  fflush(cmm2rrm_fd);
-#endif
-
-  switch ( header->msg_type ) {
-  case CMM_CX_SETUP_REQ: {
-    cmm_cx_setup_req_t *p = (cmm_cx_setup_req_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_CX_SETUP_REQ\n",header->inst);
-
-    if ( cmm_cx_setup_req(header->inst,p->Src,p->Dst,p->QoS_class,header->Trans_id ) ) {
-      /* RB_ID = 0xFFFF => RB error */
-      put_msg( &(rrm->file_send_cmm_msg), 0,
-               rrm->cmm.s, msg_rrm_cx_setup_cnf(header->inst,0xFFFF , header->Trans_id )) ;//mod_lor_10_01_25
-    }
-
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-  }
-  break ;
-
-  case CMM_CX_MODIFY_REQ: {
-    cmm_cx_modify_req_t *p = (cmm_cx_modify_req_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_CX_MODIFY_REQ\n",header->inst);
-    cmm_cx_modify_req(header->inst,p->Rb_id,p->QoS_class,header->Trans_id )  ;
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-
-  }
-  break ;
-
-  case CMM_CX_RELEASE_REQ : {
-    cmm_cx_release_req_t *p = (cmm_cx_release_req_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_CX_RELEASE_REQ\n",header->inst);
-    cmm_cx_release_req(header->inst,p->Rb_id,header->Trans_id )  ;
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-
-  }
-  break ;
-
-  case CMM_CX_RELEASE_ALL_REQ : {
-    //cmm_cx_release_all_req_t *p = (cmm_cx_release_all_req_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_CX_RELEASE_ALL_REQ\n",header->inst);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-
-  }
-  break ;
-
-  case CMM_ATTACH_CNF : { ///< The thread that allows
-    cmm_attach_cnf_t *p = (cmm_attach_cnf_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_ATTACH_CNF\n",header->inst);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-
-
-
-    //mod_lor_10_01_25++
-#ifndef    RRC_EMUL
-
-    if (rrm->ip.s->s == -1) {
-      //mod_lor_10_05_06++
-      unsigned char tmp [4];
-
-      /*for (int i=0; i<10;i++ )
-          if (memcmp( &(node_info[i].L2_id), &(p->L2_id), sizeof(L2_ID) )){
-              fprintf(stderr,"Inst. to connect with %d\n",i);
-              break;
-          }//memcpy()*/
-      //mod_lor_10_05_18++: destination addresses depends on
-      //scenario and on role, they are declared at beginning of file
-      if (SCEN_2_CENTR && rrm->id >= FIRST_SECOND_CLUSTER_USER_ID) { //mod_lor_11_01_06
-        tmp[0]=CH_COLL_L3id[0];
-        tmp[1]=CH_COLL_L3id[1];
-        tmp[2]=CH_COLL_L3id[2];
-        tmp[3]=CH_COLL_L3id[3];
-      } else {
-        tmp[0]=FC_L3id[0];
-        tmp[1]=FC_L3id[1];
-        tmp[2]=FC_L3id[2];
-        tmp[3]=FC_L3id[3];
-      }//mod_lor_10_05_18--
-
-      //unsigned char tmp [4]={0x0A,0x00,0x01,0x01};
-      /*fprintf(stderr,"IP_addr :");//dbg //mod_lor_10_05_06
-      for (int i=0;i<4;i++)//dbg
-          fprintf(stderr," %X",tmp[i]);//dbg
-      fprintf(stderr,"\n");//dbg*/
-
-      //mod_lor_10_05_06--
-      fprintf(stderr,"IP interface starting inst. %d\n",rrm->id);
-      //dbg++ (add_lor_11_01_06)
-      fprintf(stderr,"Source: ");
-
-      for ( int i=0; i<4; i++)
-        fprintf(stderr,"%02X:", p->L3_info[i]);
-
-      fprintf(stderr,"\nDest: ");
-
-      for (int  i=0; i<4; i++)
-        fprintf(stderr,"%02X:", tmp[i]);
-
-      fprintf(stderr,"\n");
-      //dbg--
-      int sock = open_socket_int(rrm->ip.s, p->L3_info, 0, tmp, 0, header->inst);
-
-      if ( sock != -1 ) {
-        fprintf(stderr,"   Ip -> socket =  %d\n", rrm->ip.s->s );
-        fflush(stderr);
-      } else {
-        fprintf(stderr," Error in IP socket opening \n");
-
-      }
-    } else
-      fprintf(stderr," Socket IP for inst %d already opened %d \n",rrm->id,rrm->ip.s->s);
-
-#endif            //mod_lor_10_01_25--*/
-
-    cmm_attach_cnf( header->inst, p->L2_id, p->L3_info_t, p->L3_info, header->Trans_id ) ;
-
-  }
-  break ;
-
-  case CMM_INIT_MR_REQ : {
-    msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_MR_REQ ????\n",header->inst);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-
-  }
-  break ;
-
-  case CMM_INIT_CH_REQ : {
-    cmm_init_ch_req_t *p = (cmm_init_ch_req_t *) msg ;
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-
-    //mod_lor_10_03_01++
-
-    struct data_thread_int DataIp;
-
-    DataIp.name = "IP"             ; ///< Nom du thread
-    DataIp.sock_path_local=p->L3_info;///< local IP address for internet socket
-    DataIp.local_port = 7000          ; ///< local IP port for internet socket
-
-    //mod_lor_10_03_02++: setting for topology with FC and BTS on instances 0 and 1
-    //mod_lor_10_05_18++
-    if (rrm->role == FUSIONCENTER) {
-      if (SCEN_1)
-        DataIp.sock_path_dest = BTS_L3id ; ///< dest IP address for internet socket
-      else if (SCEN_2_CENTR)
-        DataIp.sock_path_dest = CH_COLL_L3id ; ///< dest IP address for internet socket
-    } else if (rrm->role == BTS ||rrm->role == CH_COLL) { //mod_lor_10_04_27
-      DataIp.sock_path_dest = FC_L3id  ; ///< dest IP address for internet socket
-    } else
-      fprintf (stderr, "wrong node role %d \n", rrm->role);
-
-    //mod_lor_10_05_18--
-    //mod_lor_10_03_02--
-    DataIp.dest_port = 0          ; ///< dest IP port for internet socket
-    DataIp.s.s = -1      ;
-    DataIp.instance = rrm->id;
-    //fprintf(stderr,"L3_local ");//dbg
-    //print_L3_id( IPv4_ADDR,  rrm->L3_info );
-    //fprintf(stderr,"\n");//dbg
-
-    int ret = pthread_create ( &pthread_recv_int_msg_hnd, NULL, thread_recv_msg_int , &DataIp );
-
-    if (ret) {
-      fprintf (stderr, "%s", strerror (ret));
-      exit(-1) ;
-    }
-
-    sleep(5);
-    //mod_lor_10_03_01--
-    cmm_init_ch_req(header->inst,p->L3_info_t,&(p->L3_info[0]));
-    msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_CH_REQ\n",header->inst);
-
-  }
-  break ;
-
-  case CMM_INIT_SENSING : {
-    cmm_init_sensing_t *p = (cmm_init_sensing_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_SENSING\n",header->inst);
-    rrm->sensing.sens_active=1;//mod_lor_10_05_07
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    //st_fr = p->Start_fr; //mod_lor_10_06_01
-    //end_fr = p->Stop_fr; //mod_lor_10_06_01
-
-    cmm_init_sensing(header->inst,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf,
-                     p->Nb_channels, p->Overlap,p->Sampl_freq);
-    fprintf(output_2,"PROVA\n"); //mod_lor_10_04_20
-
-
-  }
-  break ;
-
-  case CMM_STOP_SENSING : {
-    msg_fct( "[CMM]>[RRM]:%d:CMM_STOP_SENSING\n",rrm->id);
-    rrm->sensing.sens_active=0;//mod_lor_10_05_07
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    //print_sens_db(rrm->rrc.pSensEntry);//dbg
-    cmm_stop_sensing(header->inst);
-  }
-  break ;
-
-  case CMM_ASK_FREQ : {
-    msg_fct( "[CMM]>[RRM]:%d:CMM_ASK_FREQ\n",header->inst);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    cmm_ask_freq(header->inst);
-  }
-  break ;
-
-  case CMM_INIT_COLL_SENSING : { //add_lor_10_11_08
-    cmm_init_coll_sensing_t *p = (cmm_init_coll_sensing_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_COLL_SENSING\n",header->inst);
-    rrm->sensing.sens_active=1;
-    cmm_init_coll_sensing(header->inst,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf,
-                          p->Nb_channels, p->Overlap,p->Sampl_freq);
-
-  }
-  break ;
-
-  case CMM_NEED_TO_TX : { //add_lor_10_10_28
-    cmm_need_to_tx_t *p = (cmm_need_to_tx_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_NEED_TO_TX\n",header->inst);
-    cmm_need_to_tx(header->inst, p->dest,p->QoS_class);
-  }
-  break ;
-
-  case CMM_USER_DISC : { //add_lor_10_11_08
-    msg_fct( "[CMM]>[RRM]:%d:CMM_USER_DISC\n",header->inst);
-    cmm_user_disc(header->inst);
-  }
-  break ;
-
-  case CMM_LINK_DISC : { //add_lor_10_11_09
-    cmm_link_disk_t *p = (cmm_link_disk_t *) msg ;
-    msg_fct( "[CMM]>[RRM]:%d:CMM_LINK_DISC with user %d\n",header->inst, p->dest);
-    cmm_link_disc(header->inst, p->dest);
-  }
-  break ;
-
-  default :
-    fprintf(stderr,"CMM:\n") ;
-    printHex(msg,len_msg,1) ;
-  }
-}
-/*!
-*******************************************************************************
-\brief  traitement des messages entrant sur l'interface RRC
-
-\return Aucune valeur
-*/
-static void processing_msg_rrc(
-  rrm_t *rrm          , ///< Donnee relative a une instance du RRM
-  msg_head_t *header  , ///< Entete du message
-  char *msg           , ///< Message recu
-  int len_msg           ///< Longueur du message
-)
-{
-#ifdef TRACE
-
-  if ( header->msg_type < NB_MSG_RRC_RRM )
-    fprintf(rrc2rrm_fd,"%lf RRC->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_rrc_rrm[header->msg_type],header->msg_type,header->Trans_id);
-  else
-    fprintf(rrc2rrm_fd,"%lf RRC->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id);
-
-  fflush(rrc2rrm_fd);
-#endif
-
-  switch ( header->msg_type ) {
-  case RRC_RB_ESTABLISH_RESP: {
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_ESTABLISH_RESP %d \n",header->inst, header->Trans_id );
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_rb_establish_resp(header->inst,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_RB_ESTABLISH_CFM: {
-    rrc_rb_establish_cfm_t *p = (rrc_rb_establish_cfm_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_ESTABLISH_CFM (%d)  %d \n",header->inst,p->Rb_id, header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_rb_establish_cfm(header->inst,p->Rb_id,p->RB_type,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_RB_MODIFY_RESP: {
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MODIFY_RESP  %d \n",header->inst, header->Trans_id);
-    rrc_rb_modify_resp(header->inst,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_RB_MODIFY_CFM: {
-    rrc_rb_modify_cfm_t *p = (rrc_rb_modify_cfm_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MODIFY_CFM (%d) %d \n",header->inst,p->Rb_id, header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_rb_modify_cfm(header->inst,p->Rb_id,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_RB_RELEASE_RESP: {
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_RELEASE_RESP %d \n",header->inst, header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_rb_release_resp(header->inst,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_MR_ATTACH_IND : {
-    rrc_MR_attach_ind_t *p = (rrc_MR_attach_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_MR_ATTACH_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_MR_attach_ind(header->inst,p->L2_id) ;
-  }
-  break ;
-
-  case RRC_SENSING_MEAS_RESP: {
-    msg_fct( "[RRC]>[RRM]:%d:RRC_SENSING_MEAS_RESP %d \n",header->inst, header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_sensing_meas_resp(header->inst,header->Trans_id) ;
-  }
-  break ;
-
-  case RRC_CX_ESTABLISH_IND: {
-    rrc_cx_establish_ind_t *p = (rrc_cx_establish_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_CX_ESTABLISH_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-
-    rrc_cx_establish_ind(header->inst,p->L2_id,header->Trans_id,
-                         p->L3_info,p->L3_info_t,
-                         p->DTCH_B_id,p->DTCH_id) ;
-
-    //mod_lor_10_01_25++
-    if (rrm->state == MESHROUTER)
-      memcpy(rrm->L3_info_corr,p->L3_info, IPv4_ADDR);
-
-    //mod_lor_10_01_25--*/
-  }
-  break ;
-
-  case RRC_PHY_SYNCH_TO_MR_IND : {
-    rrc_phy_synch_to_MR_ind_t *p = (rrc_phy_synch_to_MR_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_MR_IND.... (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_phy_synch_to_MR_ind(header->inst,p->L2_id) ;
-    //msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_MR_IND Done\n",header->inst);
-  }
-  break ;
-
-  case RRC_PHY_SYNCH_TO_CH_IND : {
-    rrc_phy_synch_to_CH_ind_t *p = (rrc_phy_synch_to_CH_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_CH_IND.... %d (Node %02d) %d \n",header->inst, p->Ch_index, p->L2_id.L2_id[0], header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-
-    //mod_lor_10_04_20--
-    //add_lor_11_01_07++
-    if (SCEN_2_CENTR)
-      sleep(header->inst);
-
-    //add_lor_11_01_07--
-    rrc_phy_synch_to_CH_ind(header->inst,p->Ch_index,p->L2_id ) ;
-    //msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_CH_IND Done\n",header->inst);
-
-  }
-  break ;
-
-  case RRC_SENSING_MEAS_IND : {
-    rrc_sensing_meas_ind_t *p  = (rrc_sensing_meas_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_SENSING_MEAS_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_sensing_meas_ind( header->inst,p->L2_id, p->NB_meas, p->Sensing_meas, header->Trans_id );
-  }
-  break ;
-
-  case RRC_RB_MEAS_IND : {
-    rrc_rb_meas_ind_t *p  = (rrc_rb_meas_ind_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MEAS_IND (Noede %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_rb_meas_ind( header->inst, p->Rb_id, p->L2_id, p->Meas_mode, p->Mac_rlc_meas, header->Trans_id );
-  }
-  break ;
-
-
-  case RRC_INIT_SCAN_REQ : {
-    rrc_init_scan_req_t *p  = (rrc_init_scan_req_t *) msg ;
-    //  fprintf(stdout,"sens_database before:\n");//dbg
-    //  print_sens_db( rrm->rrc.pSensEntry );//dbg
-    msg_fct( "[RRC]>[RRM]:%d:RRC_INIT_SCAN_REQ  %d \n",header->inst, header->Trans_id);
-    rrm->sensing.sens_active=1;//mod_lor_10_04_21
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    fprintf(stdout,"start:%d stop:%d band:%d nb:%d\n",p->Start_fr ,p->Stop_fr,p->Meas_band,p->Nb_channels);//dbg
-    rrc_init_scan_req( header->inst, p->L2_id, p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf,
-                       p->Nb_channels, p->Overlap,p->Sampl_freq, header->Trans_id );
-
-    //    print_sens_db( rrm->rrc.pSensEntry );//dbg
-
-  }
-  break ;
-
-  case RRC_END_SCAN_CONF : {
-    rrc_end_scan_conf_t *p  = (rrc_end_scan_conf_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_END_SCAN_CONF  %d (Node ",header->inst, header->Trans_id);
-    int inst_sens;
-
-    for ( int i=0; i<8; i++)
-      msg_fct("%02X", p->L2_id.L2_id[i]);
-
-    msg_fct( ")\n");
-
-    //mod_lor_10_04_20++
-    //mod_lor_10_04_22++
-    for ( inst_sens=0; inst_sens<nb_inst; inst_sens++) {
-      if (memcmp(&(rrm_inst[inst_sens].L2_id),  &(p->L2_id),sizeof(L2_ID))==0)
-        break;
-    }
-
-    //mod_lor_10_04_22--
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(inst_sens,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_end_scan_conf( header->inst, p->L2_id, header->Trans_id );
-  }
-  break ;
-
-  case RRC_END_SCAN_REQ : {
-    rrc_end_scan_req_t *p  = (rrc_end_scan_req_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_END_SCAN_REQ %d \n",header->inst, header->Trans_id);
-    rrm->sensing.sens_active=0;//mod_lor_10_04_21
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_end_scan_req( header->inst, p->L2_id, header->Trans_id );
-  }
-  break ;
-
-  case RRC_INIT_MON_REQ : {
-    rrc_init_mon_req_t *p  = (rrc_init_mon_req_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_INIT_MON_REQ %d (Node ",header->inst, header->Trans_id);
-
-    for ( int i=0; i<8; i++)
-      msg_fct("%02X", p->L2_id.L2_id[i]);
-
-    msg_fct( ")\n");
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    rrc_init_mon_req( header->inst, p->L2_id, p->ch_to_scan, p->NB_chan, p->interval, header->Trans_id );
-  }
-  break ;
-
-  //mod_lor_10_06_04++
-  case RRC_UP_FREQ_ASS : {
-    rrm_up_freq_ass_t *p  = (rrm_up_freq_ass_t *) msg ;
-    msg_fct( "[RRC]>[RRM]:%d:RRC_UP_FREQ_ASS \n",header->inst);
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-    unsigned int        channels[2*p->NB_chan];                //!< Vector of channels
-    unsigned int        free[2*p->NB_chan]    ;                //!< Vector of values
-
-    if (p->NB_chan!=0) {
-      channels[0]=p->ass_channels[0].Start_f;            //!<saved starting frequency
-      channels[1]=p->ass_channels[0].Final_f; //!<saved final frequency
-    }
-
-
-    int r =  send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,2*p->NB_chan,2*p->NB_chan,channels,free, 0) );
-    WARNING(r!=0);
-
-  }
-  break;
-
-  //mod_lor_10_06_04--
-  //mod_lor_10_11_05++
-  case RRC_UP_FREQ_ASS_SEC : {
-    rrm_up_freq_ass_sec_t *p  = (rrm_up_freq_ass_sec_t *) msg ;
-    int i;
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM ;
-
-    unsigned int chann_start[NB_SENS_MAX];
-    unsigned int chann_end[NB_SENS_MAX];
-    unsigned int tx[NB_SENS_MAX];
-    unsigned int tot_ch = 0;
-
-    unsigned int        channels[2*NB_SENS_MAX];                //!< Vector of channels
-
-    msg_fct( "[RRC]>[RRM]:%d:RRC_UP_FREQ_ASS_SEC ch %d\n",header->inst,p->NB_all);
-
-    for (i=0; i<p->NB_all; i++) {
-      if (memcmp( &(p->L2_id[i]), &(rrm->L2_id), sizeof(L2_ID) )==0) {
-        printf("USER:%d:Transmission on channel %d from %d to %d\n\n",header->inst,p->ass_channels[i].Ch_id, p->ass_channels[i].Start_f, p->ass_channels[i].Final_f);
-        chann_start[tot_ch]     = p->ass_channels[i].Start_f;
-        chann_end[tot_ch]       = p->ass_channels[i].Final_f;
-        channels[tot_ch*2]      = chann_start[tot_ch];
-        channels[(tot_ch*2)+1]  = chann_end[tot_ch];
-        tx[tot_ch]              = 1;
-        tot_ch++;
-      }
-
-      if (memcmp( &(p->L2_id_dest[i]), &(rrm->L2_id), sizeof(L2_ID) )==0) {
-        printf("USER:%d:Ready to receive on channel %d from %d to %d\n\n",header->inst,p->ass_channels[i].Ch_id, p->ass_channels[i].Start_f, p->ass_channels[i].Final_f);
-        chann_start[tot_ch]     = p->ass_channels[i].Start_f;
-        chann_end[tot_ch]       = p->ass_channels[i].Final_f;
-        channels[tot_ch*2]      = chann_start[tot_ch];
-        channels[(tot_ch*2)+1]  = chann_end[tot_ch];
-        tx[tot_ch]              = 0;
-        tot_ch++;
-      }
-    }
-
-    plot_all_chann_scen_2(tx, chann_start, chann_end, tot_ch, header->inst-FIRST_SENSOR_ID+1);
-
-
-    int r =  send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,tot_ch*2,tot_ch,channels,tx, 0) );
-    WARNING(r!=0);
-
-  }
-  break;
-  //mod_lor_10_11_05--
-
-  default :
-    fprintf(stderr,"RRC:\n") ;
-    printHex(msg,len_msg,1) ;
-  }
-
-}
-
-static void processing_msg_sensing(
-  rrm_t       *rrm        , ///< Donnee relative a une instance du RRM
-  msg_head_t  *header     , ///< Entete du message
-  char        *msg        , ///< Message recu
-  int         len_msg       ///< Longueur du message
-)
-{
-
-#ifdef TRACE
-
-  if ( header->msg_type < NB_MSG_SENSING_RRM )
-    fprintf(sensing2rrm_fd,"%lf SENSING->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_sensing_rrm[header->msg_type],header->msg_type,header->Trans_id);
-  else
-    fprintf(sensing2rrm_fd,"%lf SENSING->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id);
-
-  fflush(sensing2rrm_fd);
-#endif
-
-  switch ( (MSG_SENSING_RRM_T)header->msg_type ) {
-
-  case SNS_UPDATE_SENS : {
-    rrc_update_sens_t *p  = (rrc_update_sens_t *) msg ;
-
-    if(rrm->sensing.sens_active == 0)//mod_lor_10_04_23
-      break;
-
-    msg_fct( "[SENSING]>[RRM]:%d:SNS_UPDATE_SENS trans %d\n",header->inst, header->Trans_id);
-
-    //mod_lor_10_11_04++
-    if (SCEN_1 && FC_ID>=0) //mod_lor_18_02_18: sensor case
-      plot_spectra(p->Sens_meas, p->NB_info, form, header->inst-FIRST_SENSOR_ID+1);
-    else if (SCEN_1) //mod_lor_18_02_18: sensor case
-      plot_spectra_sensor(p->Sens_meas, p->NB_info);
-    else if (SCEN_2_CENTR && header->inst<FIRST_SECOND_CLUSTER_USER_ID)
-      plot_spectra_CH1(p->Sens_meas, p->NB_info,  header->inst-FIRST_SENSOR_ID+1);
-    else if (SCEN_2_CENTR && header->inst>=FIRST_SECOND_CLUSTER_USER_ID) //mod_lor_11_01_07
-      plot_spectra_CH2(p->Sens_meas, p->NB_info,  header->inst-FIRST_SECOND_CLUSTER_USER_ID+1);
-
-    //mod_lor_10_11_04--
-
-    rrc_update_sens( header->inst, rrm->L2_id, p->NB_info, p->Sens_meas, p->info_time );
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type ;
-    //mod_lor_10_04_21++ mod_lor_10_06_02++
-    unsigned int        channels[2];                //!< Vector of channels
-    unsigned int        free[2]    ;                //!< Vector of values
-    unsigned int    Trans = rrm->ip.trans_cnt;
-
-    channels[0]=p->Sens_meas[0].Start_f;            //!<saved starting frequency
-    channels[1]=p->Sens_meas[p->NB_info-1].Final_f; //!<saved final frequency
-    free[0]=SB_BANDWIDTH;                           //!<saved subband dimension
-
-
-    int r =  send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,2,1,channels,free, Trans) );
-    WARNING(r!=0);
-    //mod_lor_10_04_21-- mod_lor_10_06_02--
-    //mod_lor_10_04_20--
-
-  }
-  break ;
-
-  //mod_lor_10_04_14++
-  case SNS_END_SCAN_CONF : {
-
-    msg_fct( "[SENSING]>[RRM]:%d:SNS_END_SCAN_CONF\n",header->inst);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type ;
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-
-    //mod_lor_10_04_20--
-    //add_lor_11_01_10++
-    if (SCEN_1 && FC_ID>=0) //mod_lor_18_02_18: sensor case
-      plot_spectra(NULL, 0, form, header->inst-FIRST_SENSOR_ID+1);
-    else if (SCEN_1) //mod_lor_18_02_18: sensor case
-      plot_spectra_sensor(NULL, 0);
-    else if (SCEN_2_CENTR && header->inst<FIRST_SECOND_CLUSTER_USER_ID)
-      plot_spectra_CH1(NULL, 0,  header->inst-FIRST_SENSOR_ID+1);
-    else if (SCEN_2_CENTR && header->inst>=FIRST_SECOND_CLUSTER_USER_ID) //mod_lor_11_01_07
-      plot_spectra_CH2(NULL, 0,  header->inst-FIRST_SECOND_CLUSTER_USER_ID+1);
-
-    //add_lor_11_01_10--*/
-    sns_end_scan_conf( header->inst );
-  }
-  break ;
-
-  default :
-    fprintf(stderr,"SENSING:%d:\n",header->msg_type) ;
-    printHex(msg,len_msg,1) ;
-  }//mod_lor_10_04_14--
-}
-
-
-/*!
-*******************************************************************************
-\brief  traitement des messages entrant sur l'interface PUSU
-
-\return Aucune valeur
-*/
-static void processing_msg_pusu(
-  rrm_t *rrm          , ///< Donnee relative a une instance du RRM
-  msg_head_t *header  , ///< Entete du message
-  char *msg           , ///< Message recu
-  int len_msg           ///< Longueur du message
-)
-{
-  transact_t *pTransact ;
-
-  pthread_mutex_lock( &( rrm->pusu.exclu ) ) ;
-  pTransact = get_item_transact(rrm->pusu.transaction,header->Trans_id ) ;
-
-  if ( pTransact == NULL ) {
-    fprintf(stderr,"[RRM] %d PUSU Response (%d): unknown transaction\n",header->msg_type,header->Trans_id);
-  } else {
-    del_item_transact( &(rrm->pusu.transaction),header->Trans_id ) ;
-  }
-
-  pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ;
-
-#ifdef TRACE
-
-  if ( header->msg_type < NB_MSG_RRM_PUSU )
-    fprintf(pusu2rrm_fd,"%lf PUSU->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_pusu_rrm[header->msg_type],header->msg_type,header->Trans_id);
-  else
-    fprintf(pusu2rrm_fd,"%lf PUSU->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id);
-
-  fflush(pusu2rrm_fd);
-#endif
-
-  switch ( header->msg_type ) {
-  case PUSU_PUBLISH_RESP: {
-    msg_fct( "[PUSU]>[RRM]:%d:PUSU_PUBLISH_RESP\n",header->inst );
-  }
-  break ;
-
-  case PUSU_UNPUBLISH_RESP: {
-    msg_fct( "[PUSU]>[RRM]:%d:PUSU_UNPUBLISH_RESP\n",header->inst );
-  }
-  break ;
-
-  case PUSU_LINK_INFO_RESP: {
-    msg_fct( "[PUSU]>[RRM]:%d:PUSU_LINK_INFO_RESP\n",header->inst );
-  }
-  break ;
-
-  case PUSU_SENSING_INFO_RESP: {
-    msg_fct( "[PUSU]>[RRM]:%d:PUSU_SENSING_INFO_RESP\n",header->inst );
-  }
-  break ;
-
-  case PUSU_CH_LOAD_RESP: {
-    msg_fct( "[PUSU]>[RRM]:%d:PUSU_CH_LOAD_RESP\n",header->inst );
-  }
-  break ;
-
-  default :
-    fprintf(stderr,"PUSU:%d:\n",header->msg_type) ;
-    printHex(msg,len_msg,1) ;
-  }
-
-}
-
-//mod_lor_10_01_25++
-/*!
-*******************************************************************************
-\brief  traitement des messages entrant via IP
-
-\return Auncune valeur
-*/
-static void processing_msg_ip(
-  rrm_t       *rrm        , ///< Donnee relative a une instance du RRM
-  msg_head_t  *header     , ///< Entete du message
-  char        *msg        , ///< Message recu
-  int         len_msg       ///< Longueur du message
-)
-{
-#ifdef TRACE
-
-  //mod_lor_10_04_27++
-  /*if ( header->msg_type < NB_MSG_RRC_RRM )
-  fprintf(ip2rrm_fd,"%lf IP->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_rrc_rrm[header->msg_type], header->msg_type,header->Trans_id);
-  else
-  fprintf(ip2rrm_fd,"%lf CMM->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id);
-  fflush(ip2rrm_fd);*/
-  if ( header->msg_type < NB_MSG_IP )//mod_lor_10_04_27
-    fprintf(ip2rrm_fd,"%lf IP->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_ip[header->msg_type], header->msg_type,header->Trans_id);
-  else
-    fprintf(ip2rrm_fd,"%lf IP->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id);
-
-  fflush(ip2rrm_fd);
-  //mod_lor_10_04_27--
-#endif
-
-  switch ( header->msg_type ) {
-  case UPDATE_SENS_RESULTS_3 : {
-    //fprintf(stderr,"1node entry  @%p \n", rrm->rrc.pSensEntry);//dbg
-    if(rrm->sensing.sens_active == 0)//mod_lor_10_05_07
-      break;
-
-    rrm_update_sens_t *p = (rrm_update_sens_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:UPDATE_SENS_RESULTS_3 from %d trans %d\n",rrm->id, header->inst, header->Trans_id);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27
-    //mod_lor_10_04_20--
-
-    //mod_lor_18_02_18++: plot spectra in FC when senosors on different PCs
-    if (SCEN_1 && FC_ID>=0 && nb_inst==1)
-      plot_spectra(p->Sens_meas, p->NB_info, form, header->inst-FIRST_SENSOR_ID+1);
-
-    //mod_lor_18_02_18--
-
-    unsigned int        channels[2];                //!< Vector of channels
-    unsigned int        free[2]    ;                //!< Vector of values
-    unsigned int    Trans = rrm->ip.trans_cnt;
-
-    channels[0]=p->Sens_meas[0].Start_f;            //!<saved starting frequency
-    channels[1]=p->Sens_meas[p->NB_info-1].Final_f; //!<saved final frequency
-    free[0]=SB_BANDWIDTH;                           //!<saved subband dimension
-
-    if (SCEN_1) {
-      if(update_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time)||SN_waiting == 1) {//mod_lor_10_06_02
-
-        if ((open_freq_query(rrm->id, rrm->L2_id, 0, SN_waiting)>0) && SN_waiting) {  //mod_lor_10_06_02
-          SN_waiting=0; //mod_lor_10_06_02
-
-          free[1]=1;    //To transmit to the graphic interface if an update have to be sent to SN
-        } else if(SN_waiting)
-          free[1]=3;
-        else
-          free[1]=1;
-      } else
-        free[1]=0;
-    } else if (SCEN_2_CENTR) { //add_lor_10_11_03
-      update_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time);
-    }
-
-    //mod_lor_10_04_21++
-
-
-    /*
-    unsigned int        channels[NB_SENS_MAX]; //!< Vector of channels
-    unsigned int        free[NB_SENS_MAX]    ; //!< Vector of values
-    int i;
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    CHANNELS_DB_T *channel=rrm->rrc.pChannelsEntry;
-    for (i=0;channel!=NULL && i<NB_SENS_MAX;i++){
-        channels[i]=channel->channel.Ch_id;
-        if (!(rrm->ip.waiting_SN_update) && !(channel->is_free) && channel->is_ass) //mod_lor_10_05_18
-            free[i] = 3;
-        else
-            free[i]=channel->is_free;
-        channel=channel->next;
-      //  printf("  ->channel %d is %d\n",channels[i],free[i]);//dbg
-    }
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;*/
-    int r =  send_msg( rrm->graph.s, msg_generic_sens_resp(header->inst,msg_type,2,1,channels,free, header->Trans_id));
-    WARNING(r!=0);
-
-    //mod_lor_10_04_21--
-
-  }
-  break ;
-
-  //mod_lor_10_05_07++
-  case UP_CLUST_SENS_RESULTS : {
-    if(rrm->sensing.sens_active == 0)//mod_lor_10_05_07
-      break;
-
-    update_coll_sens_t *p = (update_coll_sens_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:UP_CLUST_SENS_RESULTS from %d \n",rrm->id, header->inst);
-
-    if (SCEN_2_CENTR && !COLL_CLUST)
-      plot_spectra_CH1(p->Sens_meas, p->NB_info,  -1);
-
-    up_coll_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time);
-    //mod_lor_10_04_21++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27
-    unsigned int        channels[2];                //!< Vector of channels
-    unsigned int        free[2]    ;                //!< Vector of values
-    unsigned int    Trans = rrm->ip.trans_cnt;
-
-    channels[0]=p->Sens_meas[0].Start_f;            //!<saved starting frequency
-    channels[1]=p->Sens_meas[p->NB_info-1].Final_f; //!<saved final frequency
-    free[0]=SB_BANDWIDTH;                           //!<saved subband dimension
-
-
-    int r =  send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,2,1,channels,free, Trans) );
-    WARNING(r!=0);
-
-    //mod_lor_10_04_21--*/
-
-  }
-  break ;
-
-  //mod_lor_10_05_07--
-  case OPEN_FREQ_QUERY_4 : {
-    open_freq_query_t *p = (open_freq_query_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:OPEN_FREQ_QUERY_4 from %d\n",rrm->id, header->inst);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM  + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    open_freq_query( rrm->id, p->L2_id, p->QoS, header->Trans_id );
-
-  }
-  break ;
-
-  case ASK_FREQ_TO_CH_3 : { //add_lor_10_11_03
-    ask_freq_to_CH_t *p = (ask_freq_to_CH_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:ASK_FREQ_TO_CH_3 from %d\n",rrm->id, header->inst);
-    ///graphic interphace
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM  + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ;
-    unsigned int stop=0,dest_id,i;
-
-    for (i=0; i<nb_inst && stop==0; i++) {
-      if(L2_ID_cmp(&(rrm_inst[i].L2_id), &(p->L2_id_dest))==0) {
-        stop=1;
-        dest_id = i;
-      }
-    }
-
-    printf("dest id %d\n",dest_id);
-    int r =  send_msg( rrm->graph.s, msg_generic_sens_resp(header->inst,msg_type,1,0,&dest_id,NULL, header->Trans_id));
-    WARNING(r!=0);
-    printf ("N5a tot waiting: %d\n",rrm->ip.users_waiting_update);//dbg
-
-    if (ask_freq_to_CH( rrm->id, &(p->L2_id), &(p->L2_id_dest), 1, header->Trans_id )!=0) {
-      int r =  send_msg( rrm->graph.s, msg_generic_sens_resp(header->inst,msg_type,0,1,NULL,&dest_id, header->Trans_id));
-      WARNING(r!=0);
-      printf ("Not available channels... Waiting for a channel...\n");
-      pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-      printf ("N5b tot waiting: %d\n",rrm->ip.users_waiting_update);//dbg
-      memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0].L2_id,p->L2_id.L2_id, sizeof(L2_ID));
-      memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1].L2_id,p->L2_id_dest.L2_id, sizeof(L2_ID));
-
-      rrm->ip.users_waiting_update++;
-      printf ("N5c tot waiting: %d\n",rrm->ip.users_waiting_update);//dbg
-      pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-    }
-  }
-  break ;
-
-  case UPDATE_OPEN_FREQ_7 : {
-    update_open_freq_t *p = (update_open_freq_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:UPDATE_OPEN_FREQ_7 from %d\n",rrm->id, header->inst);
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27
-    //mod_lor_10_05_18++: occ_channels passed as parameter to update open freq.
-    //channels vector incremented by one to have place to save the lenght of the vector
-    unsigned int        channels[3*p->NB_chan+1]; //!< Vector of channels
-    unsigned int        occ_channels[NB_SENS_MAX]    ; //!< Vector of values
-    unsigned int        occ_ch_NB; //!< Number of occupied channels
-    int i, j=0;
-
-    //mod_lor_10_06_02++
-    for (i=0; i<p->NB_chan; i++) {
-      channels[i*3]=p->channels[i].channel.Ch_id;
-      channels[(i*3)+1]=p->channels[i].channel.Start_f;
-      channels[(i*3)+2]=p->channels[i].channel.Final_f;
-    }
-
-    msg_fct( "free channels:\n");//dbg
-
-    for (int i=0; i<3*p->NB_chan; i++)//dbg
-      msg_fct( "  %d  ", channels[i]);//dbg
-
-    msg_fct( "\n");//dbg
-    occ_ch_NB = update_open_freq( rrm->id, p->L2_id, p->NB_chan, occ_channels, p->channels, header->Trans_id ); //mod_lor_10_05_18
-    //mod_lor_10_05_18--
-    printf("%d %d\n",p->NB_chan,occ_ch_NB);//dbg
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-    int r =  send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,(3*p->NB_chan),occ_ch_NB,channels,occ_channels, header->Trans_id)); //mod_lor_10_05_17
-    WARNING(r!=0);
-    //mod_lor_10_04_20--
-    plot_SN_channels(rrm->rrc.pChannelsEntry,occ_ch_NB,occ_channels,rrm->id);//mod_lor_10_06_01
-
-  }
-  break ;
-
-  case UPDATE_SN_OCC_FREQ_5 : {
-    sleep (2); //mod_lor_10_06_02
-    update_SN_occ_freq_t *p = (update_SN_occ_freq_t *) msg ;
-
-    msg_fct( "[IP]>[RRM]:%d:UPDATE_SN_OCC_FREQ_5 from %d\n",rrm->id, header->inst);
-
-    if (p->NB_chan<CH_NEEDED_FOR_SN)    //mod_lor_10_06_02
-      SN_waiting = 1;                 //mod_lor_10_06_02
-    else                                //mod_lor_10_06_02
-      SN_waiting = 0;                 //mod_lor_10_06_02
-
-    //mod_lor_10_04_20++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27
-    //int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    plot_SN_channels(rrm->rrc.pChannelsEntry, p->NB_chan, p->occ_channels, rrm->id);//mod_lor_10_06_01
-    //mod_lor_10_04_20--
-    //mod_lor_10_05_18++
-    unsigned int alarm[2];
-    //mod_lor_10_06_02++
-    unsigned int used_channels[2*p->NB_chan+1];
-    CHANNELS_DB_T *curr_chan;
-
-    for (int i=0; i<p->NB_chan; i++) {
-      curr_chan = get_chann_db_info( rrm->rrc.pChannelsEntry  ,p->occ_channels[i] );
-      used_channels[2*i]=curr_chan->channel.Start_f;
-      used_channels[(2*i)+1]=curr_chan->channel.Final_f;
-
-    }
-
-    msg_fct( "Channels used by SN:\n");//dbg
-
-    for (int i=0; i<2*p->NB_chan; i++)//dbg
-      msg_fct( "  %d  ", used_channels[i]);//dbg
-
-    msg_fct( "\n");//dbg
-
-    if (update_SN_occ_freq( rrm->id, p->L2_id, p->NB_chan, p->occ_channels, header->Trans_id )) {
-      alarm[0]=1;
-      int r =  send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,(2*p->NB_chan),2,used_channels,alarm, header->Trans_id)); //mod_lor_10_05_17
-      WARNING(r!=0);
-      open_freq_query( rrm->id, p->L2_id, 0, header->Trans_id );//mod_lor_10_05_17
-    } else {
-      alarm[0]=0;
-      int r =  send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,(2*p->NB_chan),2,used_channels,alarm, header->Trans_id)); //mod_lor_10_05_17
-      WARNING(r!=0);
-    }//mod_lor_10_05_18--//mod_lor_10_06_02--
-  }
-  break ;
-
-  //mod_lor_10_05_05++
-  case INIT_COLL_SENS_REQ : {
-    init_coll_sens_req_t *p = (init_coll_sens_req_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:INIT_COLL_SENS_REQ from %d\n",rrm->id, header->inst);
-    rrm->sensing.sens_active=1;//mod_lor_10_05_07
-    //mod_lor_10_05_10++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM  + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_05_10--
-    memcpy( rrm->L2_id_FC.L2_id, p->L2_id.L2_id, sizeof(L2_ID) );
-    cmm_init_sensing(rrm->id,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf,
-                     p->Nb_channels, p->Overlap,p->Sampl_freq);
-
-  }
-  break ;
-
-  //mod_lor_10_05_05--
-  //mod_lor_10_05_06++
-  case STOP_COLL_SENS : {
-    //init_coll_sens_req_t *p = (init_coll_sens_req_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:STOP_COLL_SENS from %d\n",rrm->id, header->inst);
-    //mod_lor_10_05_10++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM  + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_05_10--
-    //memcpy( rrm->L2_id_FC.L2_id, p->L2_id.L2_id, sizeof(L2_ID) );
-    rrm->sensing.sens_active=0;//mod_lor_10_05_07
-    cmm_stop_sensing(rrm->id);
-
-  }
-  break ;
-
-  //mod_lor_10_05_06--
-  //mod_lor_10_05_12++
-  case STOP_COLL_SENS_CONF : {
-    stop_coll_sens_conf_t *p = (stop_coll_sens_conf_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:STOP_COLL_SENS_CONF from %d\n",rrm->id, header->inst);
-    //mod_lor_10_05_10++
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM  + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    //mod_lor_10_05_10--
-    //memcpy( rrm->L2_id_FC.L2_id, p->L2_id.L2_id, sizeof(L2_ID) );
-    rrc_end_scan_conf( rrm->id, p->L2_id, header->Trans_id );
-
-    if (SCEN_2_CENTR ) //add_lor_11_01_10
-      plot_spectra_CH1(NULL, 0,  -1);//add_lor_11_01_10
-
-  }
-  break ;
-
-  case USER_DISCONNECT_9 : { //add_lor_10_11_09
-    user_disconnect_t *p = (user_disconnect_t *) msg ;
-    msg_fct( "[IP]>[RRM]:%d:USER_DISCONNECT from %d\n",rrm->id, header->inst);
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM  + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27
-    int r =  send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) );
-    WARNING(r!=0);
-    disconnect_user( rrm->id, p->L2_id );
-
-  }
-  break ;
-
-  case CLOSE_LINK : { //add_lor_10_11_09
-    close_link_t *p = (close_link_t *) msg ;
-    int msg_type = header->msg_type + NB_MSG_SNS_RRM  + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27
-    msg_fct( "[IP]>[RRM]:%d:CLOSE_LINK from %d\n",rrm->id, header->inst);
-    unsigned int stop1=0, stop2=0,dest_id,source_id,i;
-
-    for (i=0; i<nb_inst && (stop1==0 || stop2==0); i++) {
-      if(L2_ID_cmp(&(rrm_inst[i].L2_id), &(p->L2_id))==0) {
-        stop1=1;
-        source_id = i;
-      }
-
-      if(L2_ID_cmp(&(rrm_inst[i].L2_id), &(p->L2_id_dest))==0) {
-        stop2=1;
-        dest_id = i;
-      }
-    }
-
-    printf ("source %d  dest %d st1 %d st2 %d\n",source_id, dest_id, stop1, stop2); //dbg
-
-    int r =  send_msg( rrm->graph.s, msg_generic_sens_resp(header->inst,msg_type,1,1,&source_id,&dest_id, header->Trans_id));
-    WARNING(r!=0);
-    close_active_link( rrm->id, p->L2_id, p->L2_id_dest );
-
-  }
-  break ;
-  break ;
-  //mod_lor_10_05_12--
-
-  default :
-    fprintf(stderr,"IP:\n") ;
-    printHex(msg,len_msg,1) ;
-  }
-}
-//mod_lor_10_01_25--
-
-/*!
-*******************************************************************************
-\brief  thread de traitement des messages sortants sur les sockets
-        (rrc ou cmm).
-\return none
-*/
-static void rrm_scheduler ( )
-{
-  int ii ;
-  int no_msg ;
-  fprintf(stderr,"RRM Scheduler: starting ... \n");
-  fflush(stderr);
-  file_msg_t *pItem ;
-  //mod_lor_10_04_22++
-  unsigned int priority = 0; ///< to guarantee priority to one rrm (fusion center) during sensing period
-  unsigned int pr_ii = 0; ///< id of the rrm with priority
-  rrm_t      *rrm ;
-
-  //mod_lor_10_04_22--
-  while ( flag_not_exit) {
-    no_msg = 0  ;
-
-    for ( ii = 0 ; ii<nb_inst ; ii++ ) {
-      //mod_lor_10_04_22++
-      if (priority) {
-        rrm = &rrm_inst[pr_ii] ;
-        ii--;
-        priority = 0;
-      }
-
-      else {
-        rrm = &rrm_inst[ii] ;
-
-        if (ii > 0 && rrm->sensing.sens_active)
-          priority = 1;
-      }
-
-      //mod_lor_10_04_22--
-      pItem=NULL;
-
-      pItem = get_msg( &(rrm->file_recv_msg)) ;
-
-      if ( pItem == NULL )
-        no_msg++;
-      else {
-        msg_head_t *header = (msg_head_t *) pItem->msg;
-        char *msg = NULL ;
-
-        if ( header != NULL ) {
-          if ( header->size > 0 ) {
-            msg = (char *) (header +1) ;
-          }
-
-          //mod_lor_10_01_25
-          if (pItem->s_type==0) {
-            if ( pItem->s->s == rrm->cmm.s->s )
-              processing_msg_cmm( rrm , header , msg , header->size ) ;
-            else if ( pItem->s->s == rrm->rrc.s->s ) {
-              processing_msg_rrc( rrm , header , msg , header->size ) ;
-            } else if ( pItem->s->s == rrm->sensing.s->s) {
-              processing_msg_sensing( rrm , header , msg , header->size ) ;
-              //fprintf(stderr,"RRM Scheduler: sensing message ... \n"); //dbg
-            } else
-              processing_msg_pusu( rrm , header , msg , header->size ) ;
-          } else {
-            //fprintf(stderr,"RRM Scheduler: ip message ... \n"); //dbg
-            processing_msg_ip( rrm , header , msg , header->size ) ;
-
-          }
-
-          RRM_FREE( pItem->msg) ;
-        }
-
-        RRM_FREE( pItem ) ;
-      }
-    }
-
-    if ( no_msg == nb_inst )
-      usleep(1000);
-  }
-
-  fprintf(stderr,"... stopped RRM Scheduler\n");
-  fflush(stderr);
-}
-/*!
-*******************************************************************************
-\brief This function reads the configuration node file
-*/
-static void get_config_file(char *filename )
-{
-  FILE *fd = fopen( filename , "r" );
-  char buf_line[128] ;
-  int adresse[LENGTH_L2_ID] ;
-  int ii = 0 ;
-
-
-  if ( fd == NULL )
-    return ;
-
-  while ( 1 ) {
-    fgets( buf_line, 127, fd ) ;
-
-    if (feof(fd))
-      break ;
-
-    if ( buf_line[0] == '#' )
-      continue ;
-
-    if ( buf_line[0] == ' ' )
-      continue ;
-
-    if ( buf_line[0] == '\t' )
-      continue ;
-
-    if ( buf_line[0] == '\n' )
-      continue ;
-
-    sscanf( buf_line, "%x %x %x %x %x %x %x %x",
-            &adresse[0],&adresse[1],&adresse[2],&adresse[3],
-            &adresse[4],&adresse[5],&adresse[6],&adresse[7]);
-
-    rrm_inst[ii].id                 = ii ;
-    rrm_inst[ii].L2_id.L2_id[0]     = adresse[0] &  0xFF ;
-    rrm_inst[ii].L2_id.L2_id[1]     = adresse[1] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[2]     = adresse[2] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[3]     = adresse[3] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[4]     = adresse[4] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[5]     = adresse[5] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[6]     = adresse[6] &  0xFF;
-    rrm_inst[ii].L2_id.L2_id[7]     = adresse[7] &  0xFF;
-
-    print_L2_id( &rrm_inst[ii].L2_id ) ;
-    fprintf(stderr," (%d) %d \n", ii, buf_line[0] );
-
-    ii++ ;
-
-    adresse[0]=adresse[1]=adresse[2]=adresse[3]=adresse[4]=adresse[5]=adresse[6]=adresse[7]=0;
-    buf_line[0] = 0;
-  }
-
-  nb_inst = ii ;
-
-  fclose(fd) ;
-}
-/*!
-*******************************************************************************
-\brief This function displays the help message (syntax)
-*/
-static void help()
-{
-  fprintf(stderr,"syntax: rrm -i <nombre instance> \n" );
-  fprintf(stderr,"        rrm -f <config file> \n" );
-}
-
-/*!
-*******************************************************************************
-\brief programme principale du RRM
-*/
-int main( int argc , char **argv )
-{
-  fprintf(stderr,"\n\nVersion of RRM with graphic interface\n\n\n\n" );//mod_lor_10_04_20
-
-  int ii;
-  int c           =  0;
-  int ret         =  0;
-  int flag_cfg    =  0 ;
-  struct data_thread DataRrc;
-  struct data_thread DataCmm;
-  struct data_thread DataPusu;
-  struct data_thread DataSensing;
-  struct data_thread DataGraph;
-  sock_rrm_t  s_gr[MAX_RRM]         ;
-
-  sock_rrm_int_t  DataIpS[MAX_RRM]; //mod_lor_10_01_25
-  pthread_attr_t attr ;
-
-  /* Vérification des arguments */
-  while ((c = getopt(argc,argv,"i:f:h")) != -1)
-    switch (c) {
-    case 'i':
-      nb_inst=atoi(optarg);
-      break;
-
-    case 'f':
-      get_config_file(optarg);
-      flag_cfg = 1 ;
-      break;
-
-    case 'h':
-      help();
-      exit(0);
-      break;
-
-    default:
-      help();
-      exit(0);
-    }
-
-  if (nb_inst <= 0 ) {
-    fprintf(stderr,"[RRM] Provide a node id\n");
-    exit(-1);
-  }
-
-  if (nb_inst >= MAX_RRM) {
-    fprintf(stderr,"[RRM] the instance number (%d) is upper than MAX_RRM (%d)\n", nb_inst, MAX_RRM);
-    exit(-1);
-  }
-
-#ifdef RRC_KERNEL_MODE
-  msg("RRM INIT :open fifos\n");
-
-  while (( Rrm_fifos.rrc_2_rrm_fifo= open ("/dev/rtf14", O_RDONLY )) < 0) {
-    printf("[RRM][INIT] open fifo  /dev/rtf14 returned %d\n", Rrm_fifos.rrc_2_rrm_fifo);
-    usleep(100);
-  }
-
-  printf ("[RRM][INIT] open fifo  /dev/rtf14 returned %d\n", Rrm_fifos.rrc_2_rrm_fifo);
-
-  while (( Rrm_fifos.rrm_2_rrc_fifo= open ("/dev/rtf15", O_WRONLY |O_NONBLOCK  | O_NDELAY)) < 0) {
-    //| O_BLOCK
-    printf("[RRM][INIT] open fifo  /dev/rtf15 returned %d\n", Rrm_fifos.rrm_2_rrc_fifo);
-    usleep(100);
-  }
-
-  printf("[RRM][INIT] open fifo  /dev/rtf15 returned %d\n", Rrm_fifos.rrm_2_rrc_fifo);
-#endif /* RRC_KERNEL_MODE */
-
-  /* ***** MUTEX ***** */
-  // initialise les attributs des threads
-  pthread_attr_init( &attr ) ;
-  pthread_attr_setschedpolicy( &attr, SCHED_RR ) ;
-
-  DataRrc.name        = "RRC" ;
-  DataRrc.sock_path_local = RRM_RRC_SOCK_PATH ;
-  DataRrc.sock_path_dest  = RRC_RRM_SOCK_PATH ;
-  DataRrc.s.s             = -1 ;
-
-  DataCmm.name        = "CMM" ;
-  DataCmm.sock_path_local = RRM_CMM_SOCK_PATH ;
-  DataCmm.sock_path_dest  = CMM_RRM_SOCK_PATH ;
-  DataCmm.s.s             = -1 ;
-
-  DataPusu.name           = "PUSU" ;
-  DataPusu.sock_path_local= RRM_PUSU_SOCK_PATH ;
-  DataPusu.sock_path_dest = PUSU_RRM_SOCK_PATH ;
-  DataPusu.s.s            = -1 ;
-
-  DataSensing.name           = "SENSING" ;
-  DataSensing.sock_path_local= RRM_SENSING_SOCK_PATH ;
-  DataSensing.sock_path_dest = SENSING_RRM_SOCK_PATH ;
-  DataSensing.s.s            = -1 ;
-
-  //mod_lor_10_04_20++
-  DataGraph.name           = "Graph" ;
-  DataGraph.sock_path_local= "/tmp/rrm_socket" ;
-  DataGraph.sock_path_dest = "/tmp/rrm_socket" ;
-  DataGraph.s.s            = -1 ;
-  //mod_lor_10_04_20--
-
-#ifdef TRACE
-  cmm2rrm_fd  = fopen( "VCD/cmm2rrm.txt" , "w") ;
-  PNULL(cmm2rrm_fd) ;
-
-  rrc2rrm_fd  = fopen( "VCD/rrc2rrm.txt", "w") ;
-  PNULL(rrc2rrm_fd) ;
-
-  pusu2rrm_fd = fopen( "VCD/pusu2rrm.txt", "w") ;
-  PNULL(pusu2rrm_fd) ;
-
-  ip2rrm_fd = fopen( "VCD/ip2rrm.txt", "w") ;
-  PNULL(ip2rrm_fd) ;
-
-  sensing2rrm_fd = fopen( "VCD/sensing2rrm.txt", "w") ;
-  PNULL(sensing2rrm_fd) ;
-
-#endif
-  output_2 = fopen( "VCD/output_2.txt", "w") ; //mod_lor_10_04_20
-  PNULL(output_2) ; //mod_lor_10_04_20
-
-  for ( ii = 0 ; ii < nb_inst ; ii++ ) {
-    DataIpS[ii].s               = -1 ;    //mod_lor_10_01_25
-
-    if ( !flag_cfg ) {
-      rrm_inst[ii].id                 = ii ;
-      rrm_inst[ii].L2_id.L2_id[0]     = ii;
-      rrm_inst[ii].L2_id.L2_id[1]     = 0x00;
-      rrm_inst[ii].L2_id.L2_id[2]     = 0x00;
-      rrm_inst[ii].L2_id.L2_id[3]     = 0xDE;
-      rrm_inst[ii].L2_id.L2_id[4]     = 0xAD;
-      rrm_inst[ii].L2_id.L2_id[5]     = 0xBE;
-      rrm_inst[ii].L2_id.L2_id[6]     = 0xAF;
-      rrm_inst[ii].L2_id.L2_id[7]     = 0x00;
-    }
-
-    pthread_mutex_init( &( rrm_inst[ii].rrc.exclu ), NULL ) ;
-    pthread_mutex_init( &( rrm_inst[ii].cmm.exclu ), NULL ) ;
-    pthread_mutex_init( &( rrm_inst[ii].pusu.exclu ), NULL ) ;
-    pthread_mutex_init( &( rrm_inst[ii].sensing.exclu ), NULL ) ;
-    pthread_mutex_init( &( rrm_inst[ii].ip.exclu ), NULL ) ; //mod_lor_10_01_25
-
-    init_file_msg( &(rrm_inst[ii].file_recv_msg), 1 ) ;
-    init_file_msg( &(rrm_inst[ii].file_send_cmm_msg), 2 ) ;
-    init_file_msg( &(rrm_inst[ii].file_send_rrc_msg), 3 ) ;
-    init_file_msg( &(rrm_inst[ii].file_send_ip_msg), 4 ) ; //mod_lor_10_01_25
-    init_file_msg( &(rrm_inst[ii].file_send_sensing_msg), 5 ) ;
-
-
-    rrm_inst[ii].state              = ISOLATEDNODE ;
-    rrm_inst[ii].role               = NOROLE ;
-    rrm_inst[ii].cmm.trans_cnt      =  1024;
-    rrm_inst[ii].rrc.trans_cnt      =  2048;
-    rrm_inst[ii].pusu.trans_cnt     =  3072;
-    rrm_inst[ii].ip.trans_cnt       =  4096; //mod_lor_10_01_25
-    rrm_inst[ii].sensing.trans_cnt  =  5120; //mod_lor_10_01_25
-
-
-
-    rrm_inst[ii].rrc.s              = &DataRrc.s;
-    rrm_inst[ii].cmm.s              = &DataCmm.s;
-    rrm_inst[ii].pusu.s             = &DataPusu.s;
-    rrm_inst[ii].sensing.s          = &DataSensing.s;
-    rrm_inst[ii].ip.s               = &DataIpS[ii]; //mod_lor_10_01_25
-    rrm_inst[ii].graph.s            = &s_gr[ii];    //mod_lor_10_04_20
-
-    //mod_lor_10_04_20++
-    int sock = open_socket( rrm_inst[ii].graph.s  ,"/tmp/rrm_socket", "/tmp/rrm_socket", ii ) ;
-
-    if ( sock != -1 ) {
-      fprintf(stderr,"  RRM %d graphic interface -> socket =  %d\n",ii , sock );
-      fflush(stderr);
-    }
-
-    //mod_lor_10_04_20--
-
-
-
-    rrm_inst[ii].rrc.transaction    = NULL ;
-    rrm_inst[ii].cmm.transaction    = NULL ;
-    rrm_inst[ii].pusu.transaction   = NULL ;
-    rrm_inst[ii].sensing.transaction= NULL ;
-
-    rrm_inst[ii].sensing.sens_active= 0 ;       //mod_lor_10_04_21
-    rrm_inst[ii].ip.users_waiting_update=0;     //add_lor_10_11_08
-    rrm_inst[ii].rrc.pNeighborEntry = NULL ;
-    rrm_inst[ii].rrc.pRbEntry       = NULL ;
-    rrm_inst[ii].rrc.pSensEntry     = NULL ;
-    rrm_inst[ii].rrc.pChannelsEntry = NULL ;
-
-  }
-
-
-  //open_socket( &DataRrc.s,  DataRrc.sock_path_local, DataRrc.sock_path_dest ,0 );
-
-  /* Creation du thread de reception des messages RRC*/
-  fprintf(stderr,"Creation du thread RRC : %d\n", nb_inst);
-#ifdef RRC_KERNEL_MODE
-  ret = pthread_create ( &pthread_recv_rrc_msg_hnd, NULL, thread_recv_msg_fifo , &DataRrc );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-#else
-  ret = pthread_create ( &pthread_recv_rrc_msg_hnd, NULL, thread_recv_msg , &DataRrc );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-#endif
-  /* Creation du thread de reception des messages CMM */
-  ret = pthread_create (&pthread_recv_cmm_msg_hnd , NULL, thread_recv_msg, &DataCmm );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  /* Creation du thread CMM d'envoi des messages */
-  ret = pthread_create (&pthread_send_cmm_msg_hnd, NULL, thread_send_msg_cmm, NULL );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  /* Creation du thread de reception des messages PUSU */
-  ret = pthread_create (&pthread_recv_pusu_msg_hnd , NULL, thread_recv_msg, &DataPusu );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  /* Creation du thread de reception des messages SENSING */
-  ret = pthread_create (&pthread_recv_sensing_msg_hnd , NULL, thread_recv_msg, &DataSensing );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  /* Creation du thread SENSING d'envoi des messages */
-  ret = pthread_create (&pthread_send_sensing_msg_hnd, NULL, thread_send_msg_sensing, NULL );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  /* Creation du thread RRC d'envoi des messages */
-  ret = pthread_create (&pthread_send_rrc_msg_hnd, NULL, thread_send_msg_rrc, NULL );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  //mod_lor_10_01_25++
-  /* Creation du thread IP d'envoi des messages */
-  ret = pthread_create (&pthread_send_ip_msg_hnd, NULL, thread_send_msg_ip, NULL );
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  //mod_lor_10_01_25--*/
-  /* Creation du thread TTL */
-  ret = pthread_create (&pthread_ttl_hnd , NULL, thread_processing_ttl, NULL);
-
-  if (ret) {
-    fprintf (stderr, "%s", strerror (ret));
-    exit(-1) ;
-  }
-
-  //mod_eure_lor++
-  if (SCEN_1) { //mod_lor_11_02_15++ : reorganization
-    if (FC_ID>=0 && BTS_ID>=0)
-      fl_initialize(&argc, argv, "Fusion Center & Secondary Network", 0, 0);
-    else if(FC_ID>=0)
-      fl_initialize(&argc, argv, "Fusion Center Spectral Measurements", 0, 0);
-    else if(BTS_ID>=0)
-      fl_initialize(&argc, argv, "Secondary Network Frequencies", 0, 0);
-
-    if (FC_ID>=0 ) {
-      form = create_form_sensing_form();
-      fl_show_form(form->sensing_form,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Spectral Measurements");
-      fl_check_forms();
-    }
-
-    //mod_lor_11_02_18++
-    if (FC_ID<0 && BTS_ID<0) {
-      fl_initialize(&argc, argv, "Sensor", 0, 0);
-      Sens_sensor_form = create_form_sens_sensor();
-      fl_show_form( Sens_sensor_form->sens_sensor,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Sensor");
-      fl_check_forms();
-    }
-
-    //mod_lor_11_02_18--
-
-    //mod_eure_lor--
-    //mod_lor_10_06_01++
-    if (BTS_ID>=0) {
-      SN_form = create_form_Secondary_Network_frequencies();
-      fl_show_form(SN_form->Secondary_Network_frequencies,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Secondary Network Frequencies");
-      fl_check_forms();
-    }
-
-    //mod_lor_10_06_01--
-  }
-
-  //mod_lor_10_11_04++
-  if (SCEN_2_CENTR) {
-    if (COLL_CLUST>=0 && FC_ID>=0) {
-      fl_initialize(&argc, argv, "Two Clusters", 0, 0);
-      Sens_form_CH2 = create_form_sens_scen_2();
-      fl_show_form(Sens_form_CH2->sens_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 2: Sensing");
-      fl_check_forms();
-
-      Sens_form_CH1 = create_form_sens_CH1_scen_2();
-      fl_show_form(Sens_form_CH1->sens_CH1_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Sensing");     //Cluster 1:  mod_lor_10_12_07
-      fl_check_forms();
-
-      Chann_form = create_form_all_freq_to_users();
-      fl_show_form(Chann_form->all_freq_to_users,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Used channels");
-      fl_check_forms();
-    } else if (COLL_CLUST>=0) { //mod_lor_11_02_14 : splitting in two clusters
-      fl_initialize(&argc, argv, "Cluster 2", 0, 0);
-      Sens_form_CH2 = create_form_sens_scen_2();
-      fl_show_form(Sens_form_CH2->sens_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 2: Sensing");
-      fl_check_forms();
-    } //mod_lor_11_02_14
-    else {
-      fl_initialize(&argc, argv, "Cluster 1", 0, 0);
-      Sens_form_CH1 = create_form_sens_CH1_scen_2();
-      fl_show_form(Sens_form_CH1->sens_CH1_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Sensing");     //Cluster 1:  mod_lor_10_12_07
-      fl_check_forms();
-
-      Chann_form = create_form_all_freq_to_users();
-      fl_show_form(Chann_form->all_freq_to_users,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Used channels");
-      fl_check_forms();
-    }
-  }//mod_lor_11_02_15--
-
-  //mod_lor_10_11_04--
-
-  /* main loop */
-  rrm_scheduler( ) ;
-
-  /* Attente de la fin des threads. */
-  pthread_join (pthread_recv_cmm_msg_hnd, NULL);
-  pthread_join (pthread_recv_rrc_msg_hnd, NULL);
-  pthread_join (pthread_recv_pusu_msg_hnd, NULL);
-  pthread_join (pthread_recv_sensing_msg_hnd, NULL);
-  pthread_join (pthread_send_cmm_msg_hnd, NULL);
-  pthread_join (pthread_send_rrc_msg_hnd, NULL);
-  pthread_join (pthread_send_sensing_msg_hnd, NULL);
-  pthread_join (pthread_send_ip_msg_hnd, NULL);
-  pthread_join (pthread_ttl_hnd, NULL);
-
-
-#ifdef TRACE
-  fclose(cmm2rrm_fd ) ;
-  fclose(rrc2rrm_fd ) ;
-  fclose(pusu2rrm_fd ) ;
-  fclose(sensing2rrm_fd ) ;
-
-#endif
-  fclose(output_2 ) ; //mod_lor_10_04_20
-
-  return 0 ;
-}
-
diff --git a/openair3/MESH/RRM/rrm_sock.c b/openair3/MESH/RRM/rrm_sock.c
deleted file mode 100644
index aa57766b7eb14323803e0a72c332d1954e1bb946..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_sock.c
+++ /dev/null
@@ -1,436 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrm_sock.c
-
-\brief      RRM (Radio Ressource Manager ) Socket
-
-            Ceux sont les fonctions relatives à la communication avec les
-            autres entites:
-                - RRC ,
-                - CMM ,
-                - PUSU
-
-\author     BURLOT Pascal
-
-\date       10/07/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "rrm_util.h"
-#include "rrm_sock.h"
-
-//! \brief  Taille maximale de la charge utile
-#define SIZE_MAX_PAYLOAD    16384 //mod_lor_10_05_24
-
-
-
-
-#include <sys/socket.h>
-#include <netinet/in.h>   //mod_lor_10_01_25
-#include <arpa/inet.h>   //mod_lor_10_01_25
-#include <sys/un.h>
-
-
-
-/*!
-*******************************************************************************
-\brief  This function opens a unix socket for the rrm communication
-        ( no-connected mode / UDP DATAGRAM )
-\return  The return value is a socket handle
-*/
-int open_socket(
-  sock_rrm_t *s   ,   ///< socket descriptor
-  char *path_local,   ///< local socket path if unix socket
-  char *path_dest ,   ///< host  Socket path if unix socket
-  int rrm_inst        ///< instance of the rrm entity
-)
-{
-  /* Unix socket */
-  int     socket_fd ;
-  int     len ;
-
-  if ((socket_fd = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
-    perror("unix socket");
-    return -1 ;
-  }
-
-  memset(&(s->un_local_addr), 0, sizeof(struct    sockaddr_un));
-  s->un_local_addr.sun_family = AF_UNIX;
-  sprintf(s->un_local_addr.sun_path,"%s%d", path_local, rrm_inst );
-  unlink(s->un_local_addr.sun_path);
-
-  len = strlen((s->un_local_addr).sun_path) + sizeof((s->un_local_addr).sun_family);
-
-  if (bind(socket_fd, (struct sockaddr *)&(s->un_local_addr), len) == -1) {
-    perror("bind");
-    return -1 ;
-  }
-
-  memset(&(s->un_dest_addr), 0, sizeof(struct     sockaddr_un));
-  s->un_dest_addr.sun_family = AF_UNIX;
-  sprintf(s->un_dest_addr.sun_path,"%s%d", path_dest, rrm_inst );
-
-  s->s = socket_fd ;
-  return socket_fd ;
-}
-
-/*!
-*******************************************************************************
-\brief  This function closes a RRM socket
-\return none
-*/
-void close_socket(
-  sock_rrm_t *sock  ///< the socket handle
-)
-{
-  shutdown(sock->s, SHUT_RDWR);
-  close(sock->s);
-}
-
-/*!
-*******************************************************************************
-\brief  This function send a buffer message to the unix socket
-\return if OK then "0" is returned else "-1"
-*/
-int send_msg(
-  sock_rrm_t *s   ,///< socket descriptor
-  msg_t *msg       ///< the message to send
-)
-{
-  /* Unix socket */
-  int                 ret     = 0 ;
-  char                *buf    = NULL;
-  struct  msghdr      msghd ;
-  struct  iovec       iov;
-  int                 taille  = sizeof(msg_head_t)  ;
-
-  if ( msg == NULL )
-    return -1 ;
-
-  if ( msg->data != NULL )
-    taille += msg->head.size ;
-
-  buf = RRM_MALLOC(char, taille);
-
-  if (buf ==NULL)
-    ret =  -1 ;
-  else {
-    memcpy( buf , &(msg->head) , sizeof(msg_head_t) ) ;
-    memcpy( buf+sizeof(msg_head_t), msg->data, msg->head.size ) ;
-
-    iov.iov_base      = (void *)buf;
-    iov.iov_len       = taille ;
-
-    msghd.msg_name          = (void *)&(s->un_dest_addr);
-    msghd.msg_namelen       = sizeof(s->un_dest_addr);
-    msghd.msg_iov           = &iov;
-    msghd.msg_iovlen        = 1;
-    msghd.msg_control       = NULL ;
-    msghd.msg_controllen    =   0 ;
-
-    if ( sendmsg(s->s, &msghd, 0) < 0 ) {
-      ret = -1;
-      perror("sendmsg:unix socket unix");
-    }
-  }
-
-  RRM_FREE(buf) ;
-  RRM_FREE(msg->data) ;
-  RRM_FREE(msg) ;
-
-  return ret ;
-}
-
-/*!
-*******************************************************************************
-\brief  This function read a buffer from a unix socket
-\return the function returns a message pointer. If the pointeur is NULL, a error
-         is happened.
-*/
-char *recv_msg(
-  sock_rrm_t *s   ///< socket descriptor
-)
-{
-  /* Unix socket */
-  char                *buf = NULL;
-  char                *msg = NULL;
-  struct  msghdr      msghd ;
-  struct  iovec       iov;
-  int                 size_msg ;
-  msg_head_t          *head  ;
-  int                 ret ;
-
-  int taille =  SIZE_MAX_PAYLOAD ;
-
-  buf                 = RRM_CALLOC( char,taille);
-
-  if ( buf == NULL ) {
-    fprintf(stderr,"error recvmsg_un: 0x%02x\n", msghd.msg_flags) ;
-    return NULL ;
-  }
-
-  iov.iov_base        = (void *)buf;
-  iov.iov_len         = taille ;
-  msghd.msg_name      = (void *)&(s->un_dest_addr);
-  msghd.msg_namelen   = sizeof(s->un_dest_addr);
-  msghd.msg_iov       = &iov;
-  msghd.msg_iovlen    = 1;
-  msghd.msg_control   = NULL ;
-  msghd.msg_controllen= 0 ;
-
-  ret = recvmsg(s->s, &msghd , 0 ) ;
-
-  if ( ret <= 0  ) {
-    perror("PB recvmsg_un");
-    RRM_FREE(buf);
-    return NULL ;
-  }
-
-  if (msghd.msg_flags != 0 ) {
-    fprintf(stderr,"error recvmsg_un: 0x%02x\n", msghd.msg_flags) ;
-    RRM_FREE(buf);
-    return NULL ;
-  }
-
-  head        = (msg_head_t *) buf  ;
-  size_msg    = sizeof(msg_head_t) + head->size ;
-
-  msg         = RRM_CALLOC(char , size_msg ) ;
-
-  if ( msg != NULL )
-    memcpy( msg , buf , size_msg ) ;
-
-  RRM_FREE( buf ) ;
-
-  return msg ;
-}
-
-//mod_lor_10_01_25++
-/*!
-*******************************************************************************
-\brief  This function opens a internet socket for the rrm communication
-        ( no-connected mode / UDP DATAGRAM ) -> considered address: IPv4
-\return  The return value is a socket handle
-*/
-int open_socket_int(
-  sock_rrm_int_t *s,  ///< socket descriptor
-  unsigned char *path_local ,  ///< local socket path if internet socket
-  int local_port,     ///< local socket port if internet socket
-  unsigned char *path_dest ,   ///< dest socket path if internet socket
-  int dest_port,      ///< dest socket port if internet socket
-  int rrm_inst        ///< instance of the rrm entity
-)
-{
-  /* Internet socket */
-  int     socket_fd ;
-  int     len ;
-  unsigned long int tmp;
-  unsigned char local_test [4];
-
-  if (path_local == NULL)
-    fprintf(stderr,"path_local = NULL\n  ");//dbg
-
-
-  if ((socket_fd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
-    perror("internet socket");
-    return -1 ;
-  }
-
-
-  //!Setting local address
-  memset(&(s->in_local_addr), 0, sizeof(struct    sockaddr_in));
-  s->in_local_addr.sin_family = AF_INET;
-  s->in_local_addr.sin_port = htons(local_port);
-  memcpy(&tmp,path_local,4);
-  //fprintf(stderr,"\nOpen sock: path_local %X \n", tmp);//dbg
-  s->in_local_addr.sin_addr.s_addr = tmp;
-
-
-  len = sizeof(s->in_local_addr);
-
-  if (bind(socket_fd, (struct sockaddr *)&(s->in_local_addr), len) == -1) {
-    perror("bind internet");
-    return -1 ;
-  }
-
-  //!Setting destination address
-  memset(&(s->in_dest_addr), 0, sizeof(struct    sockaddr_in));
-  s->in_dest_addr.sin_family = AF_INET;
-  s->in_dest_addr.sin_port = htons(7000);
-  memcpy(&tmp,path_dest,4);
-  //fprintf(stderr,"Open sock: path_dest %X \n", tmp);//dbg
-  s->in_dest_addr.sin_addr.s_addr = tmp;
-
-  s->s = socket_fd ;
-  //fprintf(stderr,"IP address %X \n", s->in_local_addr.sin_addr.s_addr);//dbg
-  // fprintf(stderr,"IP dest %X \n", s->in_dest_addr.sin_addr.s_addr);//dbg
-  return socket_fd ;
-}
-
-
-
-/*!
-*******************************************************************************
-\brief  This function read a buffer from a internet socket
-\return the function returns a message pointer. If the pointeur is NULL, a error
-         is happened.
-*/
-char *recv_msg_int(
-  sock_rrm_int_t *s   ///< socket descriptor
-)
-{
-  /* Internet socket */
-  char                *buf = NULL;
-  char                *msg = NULL;
-  int                 size_msg ;
-  msg_head_t          *head  ;
-  int                 ret ;
-  //struct  sockaddr_in newS;
-  //socklen_t len_addr = sizeof(struct sockaddr_in);
-
-  int taille =  SIZE_MAX_PAYLOAD ;
-  //fprintf(stderr,"RF dentro recv_from \n  ");//dbg
-
-  buf                 = RRM_CALLOC( char,taille);
-
-  if ( buf == NULL ) {
-    return NULL ;
-  }
-
-  //fprintf(stderr,"RF s: %d\n  ", s->s);//dbg
-
-
-  //ret = recvfrom(s->s, buf, taille, 0,(struct sockaddr *)&(newS), &len_addr) ;
-  ret = recvfrom(s->s, buf, taille, 0,NULL, 0) ; //mod_lor_10_04_23
-
-  //fprintf(stderr,"RF dopo recv s = %d\n  ",s->s);//dbg
-  if ( ret <= 0  ) {
-    //fprintf(stderr,"RF ret %d\n  ",ret );//dbg
-    perror("PB recvfrom_in");
-    RRM_FREE(buf);
-    return NULL ;
-  }
-
-
-  head        = (msg_head_t *) buf  ;
-  size_msg    = sizeof(msg_head_t) + head->size ;
-
-  msg         = RRM_CALLOC(char , size_msg ) ;
-
-  if ( msg != NULL )
-    memcpy( msg , buf , size_msg ) ;
-
-  RRM_FREE( buf ) ;
-  //fprintf(stderr,"dim_msg %d\n  ",sizeof(msg) );//dbg
-  //fprintf(stderr,"RF s at the end: %d\n  ", s->s);//dbg
-  return msg ;
-}
-
-
-/*!
-*******************************************************************************
-\brief  This function send a buffer message to the internet socket
-\return if OK then "0" is returned else "-1"
-*/
-int send_msg_int(
-  sock_rrm_int_t *s                       ,///< socket descriptor
-  msg_t *msg                           ///< the message to send
-
-)
-{
-  /* Internet socket */
-  int                 ret     = 0 ;
-  char                *buf    = NULL;
-  int                 taille  = sizeof(msg_head_t)  ;
-  //fprintf(stderr,"Send IP msg socket -> %d\n  ",s->s );//dbg
-
-  if ( msg == NULL )
-    return -1 ;
-
-  if ( msg->data != NULL )
-    taille += msg->head.size ;
-
-  buf = RRM_MALLOC(char, taille);
-
-  if (buf ==NULL)
-    ret =  -1 ;
-
-  else {
-    memcpy( buf , &(msg->head) , sizeof(msg_head_t) ) ;
-    memcpy( buf+sizeof(msg_head_t), msg->data, msg->head.size ) ;
-
-    //fprintf(stderr,"Sendto IP msg on socket %d msg_type %d\n  ",s->s, msg->head.msg_type );//dbg
-    //fprintf(stderr,"to %X \n\n\n\n\n", s->in_dest_addr.sin_addr.s_addr);//dbg
-    if ( sendto(s->s, buf, taille, 0, (struct  sockaddr *)&(s->in_dest_addr), sizeof(struct  sockaddr_in)) < 0 ) {
-      ret = -1;
-      perror("sendmsg:socket ip");
-    }
-  }
-
-  //fprintf(stderr,"Before free ret %d\n  ", ret);//dbg
-  RRM_FREE(buf) ;
-  RRM_FREE(msg->data) ;
-  RRM_FREE(msg) ;
-  //fprintf(stderr,"After free ret %d\n  ", ret);//dbg
-  return ret ;
-}
-
-/*!
-*******************************************************************************
-\brief  This function closes a RRM socket
-\return none
-*/
-void close_socket_int(
-  sock_rrm_int_t *sock  ///< the socket handle
-)
-{
-  shutdown(sock->s, SHUT_RDWR);
-  close(sock->s);
-}
-
-//mod_lor_10_01_25--
diff --git a/openair3/MESH/RRM/rrm_sock.h b/openair3/MESH/RRM/rrm_sock.h
deleted file mode 100644
index 19827403621ff8cf856cc302e45b76ebe059164f..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_sock.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrm_sock.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-            et des fonctions relatives aux fonctions de communication RRM
-            (Radio Resource Management ) avec les autres entites RRC/CMM/PUSU.
-
-\author     BURLOT Pascal
-
-\date       15/07/08
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-
-#ifndef RRM_SOCK_H
-#define RRM_SOCK_H
-
-
-
-
-
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netinet/in.h>   //mod_lor_10_01_25
-#include <netdb.h>   //mod_lor_10_01_25
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//AAA: if rrc_emul add a 0 at the end of file name
-#ifdef RRC_EMUL
-//! \brief Socket path associated to RRM-CMM interface
-#define RRM_CMM_SOCK_PATH "/tmp/rrm_cmm_socket0"
-//! \brief Socket path associated to CMM-RRM interface
-#define CMM_RRM_SOCK_PATH "/tmp/cmm_rrm_socket0"
-
-//! \brief Socket path associated to RRM-RRC interface
-#define RRM_RRC_SOCK_PATH "/tmp/rrm_rrc_socket0"
-//! \brief Socket path associated to RRC-RRM interface
-#define RRC_RRM_SOCK_PATH "/tmp/rrc_rrm_socket0"
-
-//! \brief Socket path associated to RRM-PUSU interface
-#define RRM_PUSU_SOCK_PATH "/tmp/rrm_pusu_socket0"
-//! \brief Socket path associated to PUSU-RRM interface
-#define PUSU_RRM_SOCK_PATH "/tmp/pusu_rrm_socket0"
-
-//! \brief Socket path associated to RRM-SENSING interface
-#define RRM_SENSING_SOCK_PATH "/tmp/rrm_sensing_socket0"
-//! \brief Socket path associated to SENSING-RRM interface
-#define SENSING_RRM_SOCK_PATH "/tmp/sensing_rrm_socket0"
-
-#else
-//! \brief Socket path associated to RRM-CMM interface
-#define RRM_CMM_SOCK_PATH "/tmp/rrm_cmm_socket"
-//! \brief Socket path associated to CMM-RRM interface
-#define CMM_RRM_SOCK_PATH "/tmp/cmm_rrm_socket"
-
-//! \brief Socket path associated to RRM-RRC interface
-#define RRM_RRC_SOCK_PATH "/tmp/rrm_rrc_socket"
-//! \brief Socket path associated to RRC-RRM interface
-#define RRC_RRM_SOCK_PATH "/tmp/rrc_rrm_socket"
-
-//! \brief Socket path associated to RRM-PUSU interface
-#define RRM_PUSU_SOCK_PATH "/tmp/rrm_pusu_socket"
-//! \brief Socket path associated to PUSU-RRM interface
-#define PUSU_RRM_SOCK_PATH "/tmp/pusu_rrm_socket"
-
-//! \brief Socket path associated to RRM-SENSING interface
-#define RRM_SENSING_SOCK_PATH "/tmp/rrm_sensing_socket"
-//! \brief Socket path associated to SENSING-RRM interface
-#define SENSING_RRM_SOCK_PATH "/tmp/sensing_rrm_socket"
-#endif /*RRC_EMUL*/
-
-
-
-//! \brief Identification of the RRM/CMM/RRC message begin
-#define START_MSG      0xA533
-//! \brief Identification of the PUSU message begin
-#define START_MSG_PUSU 0xCC
-
-
-
-/*!
-*******************************************************************************
-\brief   Entete des messages de RRM/CMM/RRC
-*/
-typedef struct {
-  unsigned short start    ; ///< Identification du debut de message
-  Instance_t     inst     ; ///< Identification de l'instance RRM
-  unsigned char  msg_type ; ///< Identification du type message
-  unsigned int   size     ; ///< Taille du message
-  Transaction_t  Trans_id ; ///< Identification de la transaction
-} msg_head_t ;
-
-/*!
-*******************************************************************************
-\brief   Definition de la structure d'un message a envoyer sur un socket:
-            - RRM->RRC
-            - RRC->RRM
-            - RRCI->RRC
-            - RRC->RRCI
-            - CMM->RRM
-            - RRM->CMM
-*/
-typedef struct {
-  msg_head_t  head  ; ///< entete du message
-  char        *data ; ///< message
-} msg_t ;
-
-
-/*!
-*******************************************************************************
-\brief  Definition de la structure definissant le socket pour envoyer les messages
-*/
-typedef struct {
-  int s                                   ; ///< identification du socket
-  struct  sockaddr_un un_local_addr       ; ///< Adresse local si unix socket
-  struct  sockaddr_un un_dest_addr        ; ///< Adresse destinataire si unix socket
-} sock_rrm_t ;
-
-//mod_lor_10_01_25++
-typedef struct {
-  int s                                   ; ///< identification du socket
-  struct  sockaddr_in in_local_addr       ; ///< Adresse local si internet socket
-  struct  sockaddr_in in_dest_addr        ; ///< Adresse destinataire si internet socket
-} sock_rrm_int_t ;
-//mod_lor_10_01_25--
-
-
-int   open_socket( sock_rrm_t *s  ,char *path_local, char *path_dest , int rrm_inst ) ;
-void  close_socket(sock_rrm_t *sock ) ;
-int   send_msg(sock_rrm_t *s  ,msg_t *msg ) ;
-char *recv_msg( sock_rrm_t *s ) ;
-
-int   open_socket_int( sock_rrm_int_t *s  , unsigned char *path_local, int local_port, unsigned char *path_dest , int dest_port, int rrm_inst ) ;   //mod_lor_10_01_25
-int   send_msg_int(sock_rrm_int_t *s  ,msg_t *msg  ) ; //mod_lor_10_01_25
-char *recv_msg_int( sock_rrm_int_t *s ) ;  //mod_lor_10_01_25
-void  close_socket_int(sock_rrm_int_t *sock ) ;  //mod_lor_10_01_25
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* RRM_SOCK_H */
diff --git a/openair3/MESH/RRM/rrm_test.sh b/openair3/MESH/RRM/rrm_test.sh
deleted file mode 100644
index 9d31d866a5438feeb182f41f34de0344a6938d32..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_test.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-killall emul_int
-killall graph
-killall rrm
-
-xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int  &
-
-sleep 2
-
-#xterm -T RRM1 -hold -e 
-./rrm -i 6 #2> log.txt
-
-#sleep 1
-#./emul_int  &
-
-
diff --git a/openair3/MESH/RRM/rrm_util.c b/openair3/MESH/RRM/rrm_util.c
deleted file mode 100644
index f96656c6fef5a9ec94b74c1db8edec7b4f507603..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_util.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file     rrm_util.c
-
-\brief    Quelques fonctions utiles
-
-\author   BURLOT Pascal
-
-\date     17/07/08
-
-
-\par     Historique:
-      $Author$  $Date$  $Revision$
-      $Id$
-      $Log$
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <sys/time.h>
-
-//#include "extern_definition.h"
-#include "L3_rrc_defs.h"
-#include "rrm_util.h"
-
-/*!
-*******************************************************************************
-\brief  Affichage de l'adresse MAC
-*/
-
-void print_L2_id(
-  L2_ID *id ///< Pointeur sur l'adresse MAC
-)
-{
-  int i ;
-
-  for ( i=0; i<8; i++)
-    fprintf(stderr,"%02X:", id->L2_id[i]);
-}
-
-/*!
-*******************************************************************************
-\brief  Affichage de l'adresse IP
-*/
-
-void print_L3_id(
-  L3_INFO_T type      , ///< type de l'info de niveau 3
-  unsigned char *L3_info    ///< Pointeur sur l'identification de niveau 3
-)
-{
-  int i , n =0 ;
-
-  if ( type==IPv4_ADDR)
-    n=4;
-
-  if (type==IPv6_ADDR)
-    n=16;
-
-  for ( i=0; i<n; i++)
-    fprintf(stderr,"%02X:", L3_info[i]);
-}
-
-/*!
-*******************************************************************************
-\brief  Affichage d'un message en hexa
-*/
-
-void printHex(
-  char *msg, ///< Message brute
-  int len  , ///< Longueur a afficher
-  int opt    ///< Option ASCII
-)
-{
-  int i ;
-
-  if (msg != NULL )
-    for ( i=0; i<len; i++) {
-      fprintf(stderr,"%02X", *msg&0xff);
-
-      if (opt ) {
-        char c = *msg ;
-
-        if ( c<' ' ) c=' ' ;
-
-        if ( c>'Z')  c=' ' ;
-
-        fprintf(stderr,"(%c)",  c );
-      }
-
-      if ( i%16 == 15 )
-        fprintf(stderr,":\n");
-      else
-        fprintf(stderr,":");
-
-      msg++ ;
-    }
-
-  fprintf(stderr,"\n");
-  fflush( stderr) ;
-}
-
-/*!
-*******************************************************************************
-\brief  Lecture du registe de cycle du processeur
-
-\return  retourne le cycle courant du processeur
-*/
-
-__inline__ unsigned long long int rdtsc()
-{
-  unsigned long long int x;
-  __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
-  return x;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction retourne l'horloge courante
-
-\return  current clock
-*/
-double get_currentclock(  )
-{
-  /*
-  struct timespec tp;
-  clock_gettime(CLOCK_REALTIME, &tp );
-  return ( ((double) tp.tv_sec ) + ( (double) tp.tv_nsec)*1.0E-9 ) ;
-  */
-#ifdef LINUX
-
-  struct timeval tv;
-  struct timezone tz;
-
-  gettimeofday(&tv, &tz);
-
-  return ( ((double) tv.tv_sec ) + ( (double) tv.tv_usec)*1e-6) ;
-#else
-  unsigned long long int x;
-  __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
-
-  return ( (double) x * 0.36e-9 ) ;
-
-#endif
-}
diff --git a/openair3/MESH/RRM/rrm_util.h b/openair3/MESH/RRM/rrm_util.h
deleted file mode 100644
index da357aaf53ccb650c7bf31193821445e963e6330..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/rrm_util.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file     rrm_util.h
-
-\brief    Fichier d'entete contenant les declarations des types, des defines ,
-      et des fonctions relatives a des routines utilitaires du RRM .
-
-\author   BURLOT Pascal
-
-\date     17/07/08
-
-
-\par     Historique:
-        P.BURLOT 2009-01-20
-            + ajout de la macro msg_fifo() pour debug
-            + ajout de la macro MSG_L2ID() pour l'affichage du L2_ID (debug)
-            + ajout de la macro RRM_CALLOC2() (utilise par la fonction msg_rrc_sensing_meas_ind())
-            + ajout d'un #ifdef USE_CALLOC si on veut utiliser calloc() ou malloc().
-
-*******************************************************************************
-*/
-
-#ifndef RRM_UTIL_H
-#define RRM_UTIL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if 1
-//! Macro permettant l'affichage pour le debug
-#define msg( ... ) printf(__VA_ARGS__)
-//! Macro permettant l'affichage pour le debug
-#define msg_fct( ... ) printf(__VA_ARGS__)
-#else
-//! Macro inactive
-#define msg( ... )
-//! Macro inactive
-#define msg_fct( ... )
-#endif
-
-#if 0
-//! Macro permettant l'affichage pour le debug
-#define msg_fifo( ... ) printf(__VA_ARGS__)
-#else
-//! Macro inactive
-#define msg_fifo( ... )
-#endif
-
-#define MSG_L2ID(p) msg("[INFO] L2ID=%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:\n",\
-                  (p).L2_id[0],(p).L2_id[1], (p).L2_id[2],(p).L2_id[3],\
-                  (p).L2_id[4],(p).L2_id[5], (p).L2_id[6],(p).L2_id[7] );
-
-#define RRM_FREE(p)       if ( (p) != NULL) { free(p) ; p=NULL ; } if ( (p) != NULL) { fprintf( stderr, "(%d) [%s]\n",__LINE__, __FILE__); fflush(stderr) ; }
-#define RRM_MALLOC(t,n)   (t *) malloc( sizeof(t) * n )
-
-#ifdef USE_CALLOC
-// calloc version : la memoire est intialisee a zero
-#define RRM_CALLOC(t,n)    (t *) calloc( n  , sizeof(t))
-#define RRM_CALLOC2(t,s)   (t *) calloc( 1  , s )
-#else
-// malloc version : la memoire n'est pas intialisee a zero
-#define RRM_CALLOC(t,n)    (t *) malloc( sizeof(t) * n )
-#define RRM_CALLOC2(t,s)   (t *) malloc( s )
-#endif /* USE_CALLOC */
-
-#define RRM_MALLOC_STR(n) RRM_MALLOC(char,n+1)
-
-void print_L2_id( L2_ID *id );
-void print_L3_id(L3_INFO_T type,unsigned char *L3_info);
-void printHex( char *msg, int len , int opt);
-double get_currentclock(  ) ;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RRM_UTIL_H */
diff --git a/openair3/MESH/RRM/sens_CH1_scen_2.c b/openair3/MESH/RRM/sens_CH1_scen_2.c
deleted file mode 100644
index d7826a98066d219d6fed6a971fabcd55b7737706..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_CH1_scen_2.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/* Form definition file generated with fdesign. */
-
-#include "forms.h"
-#include <stdlib.h>
-#include "sens_CH1_scen_2.h"
-
-FD_sens_CH1_scen_2 *create_form_sens_CH1_scen_2(void)
-{
-  FL_OBJECT *obj;
-  FD_sens_CH1_scen_2 *fdui = (FD_sens_CH1_scen_2 *) fl_calloc(1, sizeof(*fdui));
-
-  //mod_lor_10_12_07++
-  fdui->sens_CH1_scen_2 = fl_bgn_form(FL_NO_BOX, 460, 560);
-  obj = fl_add_box(FL_UP_BOX,0,0,460,560,"");
-  fdui->User_1_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,10,420,100,"User_1_sens");
-  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fdui->User_2_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,140,420,100,"User_2_sens");
-  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fdui->User_3_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,280,420,100,"User_3_sens");
-  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fdui->Cluster_2_sensing = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,420,420,100,"Cluster_2_received_information");
-  fl_set_object_color(obj,FL_BLACK,FL_YELLOW);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  //mod_lor_10_12_07--: messo in nota
-
-  /*  fdui->sens_CH1_scen_2 = fl_bgn_form(FL_NO_BOX, 650, 740);
-    obj = fl_add_box(FL_UP_BOX,0,0,650,740,"");
-    fdui->User_1_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,10,560,110,"User_1_sens");
-      fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-      fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fdui->User_2_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,150,560,110,"User_2_sens");
-      fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-      fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fdui->User_3_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,290,560,110,"User_3_sens");
-      fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-      fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fdui->User_4_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,430,560,110,"User_4_sens");
-      fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-      fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fdui->Cluster_2_sensing = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,570,560,130,"Cluster_2_global_sensing");
-      fl_set_object_color(obj,FL_BLACK,FL_YELLOW);
-      fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-      */
-  fl_end_form();
-
-  fdui->sens_CH1_scen_2->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
diff --git a/openair3/MESH/RRM/sens_CH1_scen_2.fd b/openair3/MESH/RRM/sens_CH1_scen_2.fd
deleted file mode 100644
index f2b927f7380cf4ade2786970674590877f5a12e3..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_CH1_scen_2.fd
+++ /dev/null
@@ -1,124 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: sens_CH1_scen_2
-Width: 650
-Height: 740
-Number of Objects: 6
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 650 740
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 40 10 560 110
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_1_sens
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_1_sens
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 40 150 560 110
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_2_sens
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_2_sens
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 40 290 560 110
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_3_sens
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_3_sens
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 40 430 560 110
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_4_sens
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_4_sens
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 40 570 560 130
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_YELLOW
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cluster_2_sensing
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: Cluster_2_sensing
-callback: 
-argument: 
-
-==============================
-create_the_forms
diff --git a/openair3/MESH/RRM/sens_CH1_scen_2.h b/openair3/MESH/RRM/sens_CH1_scen_2.h
deleted file mode 100644
index b8137fb6300e979f96bd0650194c565e539688c7..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_CH1_scen_2.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/** Header file generated with fdesign on Fri Nov  5 17:11:31 2010.**/
-
-#ifndef FD_sens_CH1_scen_2_h_
-#define FD_sens_CH1_scen_2_h_
-
-/** Callbacks, globals and object handlers **/
-
-
-/**** Forms and Objects ****/
-typedef struct {
-  FL_FORM *sens_CH1_scen_2;
-  void *vdata;
-  char *cdata;
-  long  ldata;
-  FL_OBJECT *User_1_sens;
-  FL_OBJECT *User_2_sens;
-  FL_OBJECT *User_3_sens;
-  FL_OBJECT *User_4_sens;
-  FL_OBJECT *Cluster_2_sensing;
-} FD_sens_CH1_scen_2;
-
-extern FD_sens_CH1_scen_2 * create_form_sens_CH1_scen_2(void);
-
-#endif /* FD_sens_CH1_scen_2_h_ */
diff --git a/openair3/MESH/RRM/sens_db.c b/openair3/MESH/RRM/sens_db.c
deleted file mode 100755
index efae7e93ed5e51f6d88ad8b1d78590f9942e472e..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_db.c
+++ /dev/null
@@ -1,569 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       sens_db.c
-
-\brief      Fonctions permettant la gestion de la base de donnée sur les infor-
-            mations du sensing
-
-\author     IACOBELLI Lorenzo
-
-\date       16/10/09
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "rrm_util.h"
-#include "sens_db.h"
-#include "channels_db.h"
-
-
-//! Selection locale du mode de debug
-#define DBG_SENS_DB 0
-
-#if DBG_SENS_DB==0
-//! Macro inactive
-#define PRINT_SENS_DB(...)
-#else
-//! Macro affichant  la liste des radio bearers
-#define PRINT_SENS_DB(...) print_sens_db( __VA_ARGS__ )
-#endif
-
-/*!
-*******************************************************************************
-\brief  La fonction affiche a l'ecran la liste (pour du debug)
-
-\return  aucune valeur retournee
-*/
-void print_sens_db(
-  Sens_node_t *pEntry ///< pointeur sur le debut de liste
-)
-{
-  //unsigned int i; //dbg
-  Sens_node_t *pCurrentItem = pEntry;
-  Sens_ch_t *pCurrentChannel;
-  int i,k;
-
-  fprintf(stderr,"node entry  @%p \n", pEntry);//dbg
-
-  //fprintf(stderr,"sens list=[\n");
-  while ( pCurrentItem != NULL) {
-    //fprintf(stderr,"curr item  @%p \n", pCurrentItem);//dbg
-    //fprintf(stderr,"  @%p(.info_time=%f, ",
-    //      pCurrentItem, pCurrentItem->info_time);
-
-    //fprintf(stderr,", @SRC= \n");
-    fprintf(stderr,"\nnode : ");
-
-    for ( i=0; i<8; i++)
-      fprintf(stderr,"%02X", pCurrentItem->L2_id.L2_id[i]);
-
-    // fprintf(stderr,"\ntpc :%d     ",pCurrentItem->tpc);
-    // fprintf(stderr,"overlap :%d      ",pCurrentItem->overlap);
-    // fprintf(stderr,"sampl_freq :%d  \n",pCurrentItem->sampl_freq);
-    pCurrentChannel=pCurrentItem->info_hd;
-
-    while ( pCurrentChannel != NULL) {
-      fprintf(stderr,"\n        @%p(\n.channel_id=%d, \n.start_fr=%d , \n.end_fr= %d:\n ",
-              pCurrentChannel, pCurrentChannel->Ch_id, pCurrentChannel->Start_f,pCurrentChannel->Final_f);  //mod_lor_10_03_17: intxflot
-
-      for (k=0; k<NUM_SB; k++)
-        //printf("%d %d; ",k,pCurrentChannel->is_free[k]);
-        printf ("k= %d, mu0=%d; mu1=%d; I0 = %d; is_free = %d\n",k,pCurrentChannel->mu0[k],pCurrentChannel->mu1[k],pCurrentChannel->I0[k], pCurrentChannel->is_free[k]);
-
-      printf("\n\n");
-      pCurrentChannel = pCurrentChannel->next ;
-
-    }
-
-
-
-
-
-    /*
-    fprintf(stderr,",\n   .Lchan_desc=%p(",&(pCurrentItem->Lchan_desc));
-        fprintf(stderr,".transport_block_size=%d,",pCurrentItem->Lchan_desc.transport_block_size);
-        fprintf(stderr,".max_transport_blocks=%d,",pCurrentItem->Lchan_desc.max_transport_blocks);
-        fprintf(stderr,".Guaranteed_bit_rate=%ld,",pCurrentItem->Lchan_desc.Guaranteed_bit_rate);
-        fprintf(stderr,".Max_bit_rate=%ld,",pCurrentItem->Lchan_desc.Max_bit_rate);
-        fprintf(stderr,".Delay_class=%d,",pCurrentItem->Lchan_desc.Delay_class);
-        fprintf(stderr,".Target_bler=%d,",pCurrentItem->Lchan_desc.Target_bler);
-        fprintf(stderr,".LCHAN_t=%d),",pCurrentItem->Lchan_desc.LCHAN_t);
-
-    fprintf(stderr,",\n   .Mac_rlc_meas_desc=%p(",&(pCurrentItem->Mac_rlc_meas_desc));
-        fprintf(stderr,".Meas_trigger=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Meas_trigger));
-            fprintf(stderr,".Rssi=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Rssi);
-            fprintf(stderr,".Sinr=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Sinr);
-            fprintf(stderr,".Harq_delay=%u, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Harq_delay);
-            fprintf(stderr,".Bler=%u,",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Bler);
-            fprintf(stderr,".Spec_eff=%u), ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Spec_eff);
-        fprintf(stderr,".Mac_avg=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Mac_avg));
-            fprintf(stderr,".Rssi_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Rssi_forgetting_factor);
-            fprintf(stderr,".Sinr_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Sinr_forgetting_factor);
-            fprintf(stderr,".Harq_delay_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Harq_delay_forgetting_factor);
-            fprintf(stderr,".Bler_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Bler_forgetting_factor);
-            fprintf(stderr,".Spec_eff_forgetting_factor=%u),\n",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Spec_eff_forgetting_factor);
-        fprintf(stderr,"   .bo_forgetting_factor=%u,",pCurrentItem->Mac_rlc_meas_desc.bo_forgetting_factor);
-        fprintf(stderr,".sdu_loss_trigger=%u,",pCurrentItem->Mac_rlc_meas_desc.sdu_loss_trigger);
-        fprintf(stderr,".Rep_amount=%u,",pCurrentItem->Mac_rlc_meas_desc.Rep_amount);
-        fprintf(stderr,".Rep_interval=%d,",pCurrentItem->Mac_rlc_meas_desc.Rep_interval);
-    */
-
-    fprintf(stderr,"\n");
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  fprintf(stderr," ]\n");
-}
-
-
-
-
-
-/*!
-*******************************************************************************
-\brief  Comparaison de deux ID de niveau 2
-
-\return si 0 alors les IDs sont identiques
-*/
-static int L2_ID_cmp(
-  L2_ID *L2_id1, ///< ID de niveau 2
-  L2_ID *L2_id2  ///< ID de niveau 2
-)
-{
-  return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ;
-}
-
-
-/*!
-*******************************************************************************
-\brief  La fonction ajoute un noeud dans la liste des noeuds.
-
-\return  retourne la valeur du nouvel element
-*/
-
-Sens_node_t *add_node(
-  Sens_node_t **node_entry  , ///< pointeur sur l'entree de la liste de noeuds
-  L2_ID  *L2_id             , ///< node ID
-  unsigned int NB_info      , ///< Number of channel info
-  Sens_ch_t *ch_info_hd     , ///< information received from the node
-  double info_time
-)
-{
-
-  //fprintf(stderr,"\n NB_info=%d \n", NB_info); //dbg
-  Sens_node_t *pOldEntry = *node_entry;
-  Sens_node_t *pNewItem = RRM_CALLOC( Sens_node_t , 1 ) ;
-
-  PNULL(pNewItem) ;
-
-  if ( pNewItem == NULL )
-    return NULL ;
-
-
-
-  memcpy( pNewItem->L2_id.L2_id , L2_id->L2_id, sizeof(L2_ID) ) ;
-  pNewItem->info_time =  info_time ;
-  pNewItem->Nb_chan   =  NB_info;
-  pNewItem->info_hd   =  NULL;
-
-  //fprintf(stderr,"starting ch pointer  @%p \n", pNewItem->info_hd);//dbg
-  for ( int i=0; i<NB_info; i++ ) {
-    if ( add_chann( &(pNewItem->info_hd), ch_info_hd[i].Start_f,
-                    ch_info_hd[i].Final_f, ch_info_hd[i].Ch_id, ch_info_hd[i].I0,ch_info_hd[i].mu0,ch_info_hd[i].mu1,
-                    /*ch_info_hd[i].meas,*/ ch_info_hd[i].is_free) == NULL )
-      fprintf(stderr, "ERROR: info %d problem\n", i) ;
-
-    //fprintf(stderr,"returned pointer  @%p Channel id %d\n", pNewItem->info_hd, ch_info_hd[i].Ch_id);//dbg
-  }
-
-  *node_entry         =  pNewItem ;
-  pNewItem->next      =  pOldEntry;
-  /*fprintf(stderr,"add_node\n\n");//dbg
-  fprintf(stderr,"node entry  @%p \n", (*node_entry)->info_hd);//dbg
-  fprintf(stderr,"node entry  @%p \n", pNewItem->info_hd);//dbg
-  fprintf(stderr,"passed par  @%p \n", *node_entry);//dbg*/
-  PRINT_SENS_DB( *node_entry );
-  return pNewItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction ajoute un channel aux info relatives à un noeud.
-
-\return  retourne la valeur du nouvel element
-*/
-
-Sens_ch_t *add_chann(
-  Sens_ch_t           **ch_entry , ///< pointeur sur l'entree de la liste de channels
-  unsigned int        Start_f    , ///< frequence initial du canal //mod_lor_10_03_17: intxflot
-  unsigned int        Final_f    , ///< frequence final du canal //mod_lor_10_03_17: intxflot
-  unsigned int        Ch_id      , ///< Channel ID //mod_lor_10_03_17: intxflot
-  //mod_eure_lor++
-  char *I0 ,
-  char *mu0,
-  char *mu1,
-
-  //float               meas       , ///< Sensing results
-  unsigned int        *is_free      ///< Evaluation about the availability of the channel //mod_lor_10_05_28 ->char instead of int
-  //mod_eure_lor--
-)
-{
-  Sens_ch_t *pOldEntry = *ch_entry;
-  Sens_ch_t *pNewItem = RRM_CALLOC( Sens_ch_t , 1 ) ;
-  int i;
-
-  /*fprintf(stderr,"\nadd_channel: %d\n", Ch_id);//dbg
-  fprintf(stderr,"old header  @%p \n", pOldEntry);//dbg
-  fprintf(stderr,"new pointer  @%p \n", pNewItem);//dbg*/
-
-  PNULL(pNewItem) ;
-
-  if ( pNewItem == NULL )
-    return NULL ;
-
-  pNewItem->Start_f =  Start_f ;
-  pNewItem->Final_f =  Final_f ;
-  pNewItem->Ch_id   =  Ch_id;
-  //printf("sens_db add 1:  %d    ", pNewItem->Ch_id);//dbg
-  //mod_eure_lor++
-  memcpy(pNewItem->I0 ,I0, MAX_NUM_SB);
-  memcpy(pNewItem->mu0,mu0, MAX_NUM_SB);
-  memcpy(pNewItem->mu1,mu1, MAX_NUM_SB);
-  memcpy(pNewItem->is_free,  is_free,MAX_NUM_SB*sizeof(unsigned int));//mod_lor_10_05_28 ->char instead of int
-  //for (i=0; i<MAX_NUM_SB; i++)
-  //        printf("up_chann: Channel %d sb %d is_free %d pitem is_free %d\n",Ch_id,i,is_free[i],pNewItem->is_free[i]);
-
-  //mod_eure_lor--
-  //pNewItem->meas    =  meas;
-  //pNewItem->is_free =  is_free;
-  //printf("sens_db add 2:  %d\n", pNewItem->Ch_id);//dbg
-  *ch_entry         =  pNewItem ;
-  pNewItem->next      =  pOldEntry;
-  //fprintf(stderr,"new pointer  @%p \n", *ch_entry);//dbg
-  //fprintf(stderr,"new pointer  @%p \n", *ch_entry->next);//dbg
-  //fprintf(stderr,"new pointer  @%p \n", pNewItem->next);//dbg
-
-
-  return pNewItem ;
-}
-
-
-/*!
-*******************************************************************************
-\brief  La fonction detruit entierement les info sur les canaux memorizées à l'adresse indiqué
-
-\return  aucune valeur.
-*/
-void del_channels_info(
-  Sens_ch_t **ch_info_entry  ///< pointeur sur l'entree des informations sur les canaux
-)
-{
-  Sens_ch_t *pCurrentItem = *ch_info_entry;
-  Sens_ch_t *pNextItem    ;
-
-  if ( (pCurrentItem == NULL)  || (ch_info_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-    RRM_FREE( pCurrentItem ) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  *ch_info_entry = NULL ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction retire l'element identifie par le node_id de la liste des noeuds
-
-\return  aucune valeur.
-*/
-void del_node(
-  Sens_node_t **node_entry  , ///< pointeur sur l'entree de la liste de noeuds
-  L2_ID       *L2_id          ///< node ID
-)
-{
-  Sens_node_t *pCurrentItem = *node_entry;
-  Sens_node_t *pNextItem    ;
-  Sens_node_t **ppPrevItem  = node_entry ;
-
-  if ( (pCurrentItem == NULL)  || (node_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-
-    if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) {
-      *ppPrevItem = pNextItem;
-      del_channels_info  (&pCurrentItem->info_hd);
-      RRM_FREE( pCurrentItem ) ;
-      fprintf( stderr,"Noeud ");
-
-      for ( int i=0; i<8; i++)
-        msg_fct("%02X", L2_id->L2_id[i]);
-
-      msg_fct( " deleted from database\n");
-
-      return ;
-    }
-
-    ppPrevItem   = &(pCurrentItem->next) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  if ( pCurrentItem == NULL )
-    fprintf(stderr, "ERROR: node_id unknown\n") ;
-
-  //PRINT_SENS_DB( *node_entry );
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction detruit entierement la liste des noeuds
-
-\return  aucune valeur.
-*/
-void del_all_nodes(
-  Sens_node_t **node_entry    ///< pointeur sur l'entree de la liste de noeuds
-)
-{
-  Sens_node_t *pCurrentItem = *node_entry;
-  Sens_node_t *pNextItem    ;
-
-  if ( (pCurrentItem == NULL)  || (node_entry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-    del_channels_info  (&pCurrentItem->info_hd);
-    RRM_FREE( pCurrentItem ) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  *node_entry = NULL ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction recherche le descripteur de noeud identifie par le noeud_id
-        dans la liste des noeuds
-
-\return  pointeur sur le descripteur de noeud trouve sinon NULL .
-*/
-Sens_node_t *get_node_info(
-  Sens_node_t *node_entry , ///< pointeur sur l'entree de la liste des noeuds
-  L2_ID       *L2_id        ///< Id du descripteur du noeud recherche
-)
-{
-  Sens_node_t *pCurrentItem = node_entry;
-
-  while ( pCurrentItem != NULL) {
-    if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 )
-      break ;
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  return pCurrentItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction recherche le descripteur de noeud identifie par le noeud_id
-        dans la liste des noeuds
-
-\return  pointeur sur le descripteur de noeud trouve sinon NULL .
-*/
-Sens_ch_t *get_chann_info(
-  Sens_ch_t *ch_entry ,   ///< pointeur sur l'entree de la liste des canaux
-  unsigned int   Ch_id    ///< Id of the desired channel //mod_lor_10_03_17: intxflot
-)
-{
-  Sens_ch_t *pCurrentItem = ch_entry;
-
-  while ( pCurrentItem != NULL) {
-    if ( pCurrentItem->Ch_id == Ch_id)
-      break ;
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  return pCurrentItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction rafraichit  les information du sensing du noeud. Si c'est
-        la premiere fois qui le node envoye les info, il rajoute le node dans
-        la liste .
-
-\return  pointer to the node
-*/
-Sens_node_t *update_node_info(
-  Sens_node_t **node_entry, ///< pointeur sur un element de la liste des RB
-  L2_ID *L2_id,             ///< id du noeud à refrechir
-  unsigned int NB_info,     ///< Number of channel info
-  Sens_ch_t *ch_info_hd,    ///< vector with the channel informations
-  double info_time          ///< time au quel il vient mis à jour
-)
-{
-  Sens_node_t *pItem = get_node_info(*node_entry,L2_id);
-
-
-  if ( pItem != NULL) {
-    //printf ("node existing\n\n");//dbg
-    pItem->info_time   = info_time ;
-    pItem->Nb_chan     = NB_info ;
-
-    for ( int i=0; i<NB_info; i++ ) {
-      // printf ("node info: %d\n",i);//dbg
-      if ( update_channel_info( &(pItem->info_hd), ch_info_hd[i].Start_f,
-                                ch_info_hd[i].Final_f, ch_info_hd[i].Ch_id,  ch_info_hd[i].I0,ch_info_hd[i].mu0,ch_info_hd[i].mu1,//ch_info_hd[i].meas,
-                                ch_info_hd[i].is_free) == NULL )
-        fprintf(stderr, "ERROR: info %d problem\n", i) ;
-    }
-  } else {
-    //fprintf(stderr,"DBG2 passed node entry @%p \n", node_entry);//dbg
-    //fprintf(stderr,"DBG2 passed hd @%p \n", *node_entry); //dbg
-    //printf ("adding node\n\n");//dbg
-    pItem = add_node( node_entry, L2_id, NB_info, ch_info_hd, info_time);
-  }
-
-  //fprintf(stderr,"update_node\n");//dbg
-  PRINT_SENS_DB( *node_entry );
-  return pItem;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction rafraichit  les information relatives à la mesure d'un canal. Si c'est
-        la premiere fois qu'on receive des info à propos du canal, il rajoute
-        le canal.
-
-\return   pointer to the channel
-*/
-Sens_ch_t *update_channel_info(
-  Sens_ch_t           **ch_entry , ///< pointeur sur un element de la liste des RB
-  unsigned int        Start_f    , ///< frequence initial du canal  //mod_lor_10_03_17: intxflot
-  unsigned int        Final_f    , ///< frequence final du canal   //mod_lor_10_03_17: intxflot
-  unsigned int        Ch_id      , ///< ID du canal   //mod_lor_10_03_17: intxflot
-  //mod_eure_lor++
-  char *I0 ,
-  char *mu0,
-  char *mu1,
-
-  //float               meas       , ///< Sensing results
-  unsigned int        *is_free      ///< Evaluation about the availability of the channel   //mod_lor_10_05_28 ->char instead of int
-  //mod_eure_lor--
-)
-{
-  //printf("sens_db update passed ch_id: %d\n",Ch_id);//dbg
-
-  Sens_ch_t *pItem = get_chann_info(*ch_entry,Ch_id);
-  int i;
-
-  if ( pItem != NULL) {
-    // printf ("channel existing\n\n");//dbg
-    //  printf("sens_db update1: %d   ", pItem->Ch_id);//dbg
-    //mod_eure_lor++
-    memcpy( pItem->I0 ,I0, MAX_NUM_SB);
-    memcpy( pItem->mu0,mu0, MAX_NUM_SB);
-    memcpy( pItem->mu1,mu1, MAX_NUM_SB);
-    memcpy(pItem->is_free, is_free, MAX_NUM_SB*sizeof(unsigned int));
-    //pItem->meas        = meas ;
-    //pItem->is_free     = is_free ;//mod_lor_10_05_06
-    //for (i=0; i<NUM_SB;i++)
-    //   printf ("sb %d is_free_db %d, is_free %d\n",i,pItem->is_free[i],is_free[i]);//dbg
-    // printf("sens_db update2: %d\n", pItem->Ch_id);//dbg
-  } else {
-    //printf ("channel to add\n\n");//dbg
-    //pItem = add_chann( ch_entry, Start_f, Final_f, Ch_id, meas, is_free);
-    pItem = add_chann( ch_entry, Start_f, Final_f, Ch_id, I0, mu0,mu1,is_free);
-  }
-
-  //mod_eure_lor--
-
-  return pItem;
-}
-
-//mod_lor_10_02_19++
-/*!
-*******************************************************************************
-\brief  La fonction rafraichit les parametres du sensing du noeud et, eventuelement,
-        les misurations. Si c'est la premiere fois qui le node envoye les info,
-        il rajoute le node dans la liste .
-
-\return  pointer to the node
-*/
-Sens_node_t *update_node_par(
-  Sens_node_t      **node_entry  , ///< pointeur sur un element de la liste des RB
-  L2_ID                *L2_id    , ///< id du noeud à refrechir
-  unsigned int         NB_info   , ///< Number of channel info
-  Sens_ch_t           *ch_info_hd, ///< vector with the channel informations
-  double               info_time , ///< time au quel il vient mis à jour
-  unsigned int         tpc       , ///< time on each carrier
-  unsigned int         overlap   , ///< overlap factor (percentage)
-  unsigned int         sampl_freq  ///< sampling frequency (Ms/s)
-)
-{
-  Sens_node_t *pItem = update_node_info(node_entry,L2_id,NB_info,ch_info_hd,info_time);
-
-  pItem->tpc = tpc;
-  pItem->overlap = overlap;
-  pItem->sampl_freq = sampl_freq;
-
-  //fprintf(stderr,"update_node\n");//dbg
-  PRINT_SENS_DB( *node_entry );
-  return pItem;
-}
-//mod_lor_10_02_19--
diff --git a/openair3/MESH/RRM/sens_db.h b/openair3/MESH/RRM/sens_db.h
deleted file mode 100755
index cd024546188b44a41bafb79e10715a3cba328cce..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_db.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       sens_db.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-            et des fonctions relatives a la gestion de la base de donnée sur
-            les informations de sensing par chaque noeud avec capacité de sensing.
-
-\author     IACOBELLI Lorenzo
-
-\date       16/10/09
-
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#ifndef SENS_DB_H
-#define SENSE_DB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*!
-*******************************************************************************
-\brief Entete de la file des messages reçus ou a envoyer
-*/
-typedef struct Sens_node_s {
-  L2_ID                L2_id     ; ///< id
-  double               info_time ; ///< information age
-  unsigned int         Nb_chan   ; ///< number of channel informations
-  unsigned int         tpc       ; ///< time on each carrier           //mod_lor_10_02_19
-  unsigned int         overlap   ; ///< overlap factor (percentage)    //mod_lor_10_02_19
-  unsigned int         sampl_freq; ///< sampling frequency (Ms/s)      //mod_lor_10_02_19
-  Sens_ch_t            *info_hd  ; ///< header of the information list
-  struct Sens_node_s   *next     ; ///< next node pointer
-} Sens_node_t ;
-
-
-// ---------------------------------------------------------------------------
-
-
-Sens_node_t *add_node( Sens_node_t **node_entry, L2_ID *L2_id, unsigned int NB_info, Sens_ch_t *ch_info_hd, double info_time ) ;
-Sens_ch_t *add_chann( Sens_ch_t **ch_entry, unsigned int Start_f, unsigned int Final_f, unsigned int Ch_id, char *I0 ,char *mu0, char *mu1,
-                      unsigned int *is_free);        //mod_lor_10_05_28 ->char instead of int
-void del_channels_info( Sens_ch_t **ch_info_entry);
-void del_node( Sens_node_t **node_entry, L2_ID *L2_id ) ;
-void del_all_nodes( Sens_node_t **node_entry ) ;
-Sens_node_t *get_node_info ( Sens_node_t *node_entry, L2_ID *L2_id ) ;
-Sens_ch_t *get_chann_info( Sens_ch_t *ch_entry , unsigned int Ch_id); //mod_lor_10_03_17: intxflot
-Sens_node_t *update_node_info( Sens_node_t **node_entry, L2_ID *L2_id, unsigned int NB_info, Sens_ch_t *ch_info_hd, double info_time);
-Sens_node_t *update_node_par( Sens_node_t **node_entry, L2_ID *L2_id,  unsigned int NB_info, Sens_ch_t *ch_info_hd, double info_time,
-                              unsigned int tpc, unsigned int overlap, unsigned int sampl_freq); //mod_lor_10_02_19 : function creation
-//Sens_ch_t *update_channel_info( Sens_ch_t **ch_entry, unsigned int Start_f, unsigned int Final_f, unsigned int Ch_id, float meas, unsigned int is_free );//mod_lor_10_05_28 ->char instead of int
-Sens_ch_t *update_channel_info( Sens_ch_t **ch_entry, unsigned int Start_f, unsigned int Final_f, unsigned int Ch_id, char *I0 ,char *mu0, char *mu1,
-                                unsigned int *is_free ); //mod_lor_10_05_28 ->char instead of int
-void print_sens_db( Sens_node_t *pEntry );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SENS_DB_H */
diff --git a/openair3/MESH/RRM/sens_op.c b/openair3/MESH/RRM/sens_op.c
deleted file mode 100755
index 0f5878cf9e4c000e613c4374270582fe08db7207..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_op.c
+++ /dev/null
@@ -1,1311 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       sens_op.c
-
-\brief      Fonctions permettant la gestion des informations de sensing des
-            differents noeuds
-
-\author     IACOBELLI Lorenzo
-
-\date       21/10/09
-
-
-\par     Historique:
-            L.IACOBELLI 2010-03-19
-            + "take_decision" function added
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <pthread.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "L3_rrc_interface.h"
-#include "cmm_rrm_interface.h"
-#include "rrm_sock.h"
-#include "rrc_rrm_msg.h"
-#include "ip_msg.h" //mod_lor_10_04_27
-#include "sensing_rrm_msg.h"
-#include "cmm_msg.h"
-#include "msg_mngt.h"
-#include "pusu_msg.h"
-#include "rb_db.h"
-#include "neighbor_db.h"
-#include "sens_db.h"
-#include "channels_db.h"
-#include "rrm_util.h"
-#include "transact.h"
-#include "rrm_constant.h"
-#include "rrm.h"
-#include "sens_op.h"
-
-
-//! Met un message dans la file des messages a envoyer
-#define PUT_CMM_MSG(m)  put_msg(  &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m )  //mod_lor_10_01_25
-#define PUT_PUSU_MSG(m) put_msg(  &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m)  //mod_lor_10_01_25
-#define PUT_RRC_MSG(m)  put_msg(  &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m )  //mod_lor_10_01_25
-#define PUT_IP_MSG(m)   put_msg(  &(rrm->file_send_ip_msg) , 1, rrm->ip.s,m  )  //mod_lor_10_01_25
-#define PUT_SENS_MSG(m) put_msg(  &(rrm->file_send_sensing_msg), 0, rrm->sensing.s,m )  //mod_lor_10_04_01
-
-/*!
-*******************************************************************************
-\brief  Comparaison de deux ID de niveau 2
-
-\return si 0 alors les IDs sont identiques
-*/
-static int L2_ID_cmp(
-  L2_ID *L2_id1, ///< ID de niveau 2
-  L2_ID *L2_id2  ///< ID de niveau 2
-)
-{
-  return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ;
-}
-
-
-
-//mod_lor_10_05_26++
-/*!
-*******************************************************************************
-\brief  Function that decides locally if a channel is free using mu0 and mu1 datas:
-
-\return
-*/
-void take_local_decision(
-  Sens_ch_t *Sens_info
-)
-{
-  unsigned int i;
-
-  for (i=0; i < NUM_SB; i++) {
-    if (Sens_info->mu0[i]>LAMBDA0 && Sens_info->mu1[i]>LAMBDA1)
-      Sens_info->is_free[i]=0; // primary system is present
-    else
-      Sens_info->is_free[i]=1; // primary system is not present
-  }
-}
-//mod_lor_10_05_26--
-
-/*!
-*******************************************************************************
-\brief  Updating of the sensing measures received by the rrm from the sensing unit
-* of the node. If the node is a mesh router it reports the information to its clusterhead
-*/
-void rrc_update_sens(
-  Instance_t inst         , //!< Identification de l'instance
-  L2_ID L2_id             , //!< Adresse L2 of the source of information
-  unsigned int NB_info    , //!< Number of channel info
-  Sens_ch_t *Sens_meas    , //!< Pointer to the sensing information
-  double info_time
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-
-  int i,j;
-
-  //fprintf(stderr,"rrc_update_sens NB_info = %d\n",NB_info);//dbg
-  // Sens_ch_t *p;//dbg
-  /*for ( i=0; i<NB_info; i++){//dbg
-      fprintf(stderr," Ch_id %d     \n",Sens_meas[i].Ch_id);//dbg
-      for (j=0;j<MAX_NUM_SB;j++)
-          fprintf(stderr,"    SB %d  is %d   \n",j,Sens_meas[i].is_free[j]);//dbg
-  }*/
-  /*fprintf(stderr," \nrrm_database     ");//dbg
-  if (rrm->rrc.pSensEntry != NULL)//dbg
-      for ( p=rrm->rrc.pSensEntry->info_hd; p!=NULL; p=p->next)//dbg
-          fprintf(stderr," %d     ",p->Ch_id);//dbg
-  else//dbg
-      fprintf(stderr," empty     ");//dbg
-  fprintf(stderr,"\n1 update\n");//dbg*/
-  for (i=0; i<NB_info; i++) {
-    take_local_decision(&Sens_meas[i]); //mod_lor_10_05_26
-    //for (int j=0; j<NUM_SB; j++)//dbg
-    //    fprintf(stderr,"sns_update: channel %d is %d\n",Sens_meas[i].Ch_id, Sens_meas[i].is_free[j]);//dbg*/
-  }
-
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
-  update_node_info( &(rrm->rrc.pSensEntry), &L2_id, NB_info, Sens_meas, info_time);
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
-
-
-  //AAA: for the moment the channel db is reserved for CHs and SUs only in SCEN_2_DISTR
-
-
-  if ( SCEN_2_DISTR) {
-
-    //fprintf(stderr,"cluster_head\n");//dbg
-
-    CHANNEL_T channel ;
-    CHANNELS_DB_T *canal;
-    unsigned int *is_free; //mod_eure_lor //mod_lor_10_05_28 ->char instead of int
-
-    for (i=0; i<NB_info; i++) {
-
-      channel.Start_f = Sens_meas[i].Start_f;
-      channel.Final_f = Sens_meas[i].Final_f;
-      channel.Ch_id   = Sens_meas[i].Ch_id;
-      channel.QoS     = 0;
-      is_free     = Sens_meas[i].is_free;
-      pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
-      canal = up_chann_db( &(rrm->rrc.pChannelsEntry), channel, is_free[0], info_time);//TO DO SCEN2 DISTR fix it!
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
-      //fprintf(stderr,"inst %d, channel %d, is_free %d\n", inst,Sens_meas[i].Ch_id,Sens_meas[i].is_free);//dbg
-      //fprintf(stderr,"chann %d updated\n", Sens_meas[i].Ch_id);//dbg
-
-    }
-
-    //AAA: just to save the right L2_id in SCEN_2_DISTR
-    if ( rrm->state != CLUSTERHEAD && SCEN_2_DISTR)
-      memcpy( rrm->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-  }
-
-  // mod_lor_10_01_25: monitoring will be launched after an Update SN occupied frequencies message from BTS
-  /*if ( rrm->state == CLUSTERHEAD && !SCEN_2_DISTR)
-  {
-      unsigned int ch_to_scan[NB_info];
-      for (i=0; i<NB_info; i++)
-          ch_to_scan[i]=Sens_meas[i].Ch_id;
-      if (SCEN_2_CENTR && (L2_ID_cmp(&(rrm->L2_id_FC),  &L2_id))==0){
-          pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-          rrm->rrc.trans_cnt++ ;
-          //To send via IP: PUT_RRC_MSG(msg_rrm_clust_mon_req( inst, L2_id, ch_to_scan, NB_info, 0.5, rrm->rrc.trans_cnt));
-          pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-      }
-      else{
-          pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-          rrm->rrc.trans_cnt++ ;
-          PUT_RRC_MSG(msg_rrm_init_mon_req( inst, L2_id,  NB_info, 0.5, ch_to_scan, rrm->rrc.trans_cnt));
-          pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-      }
-  }*/
-#ifndef    RRC_EMUL
-  else if (!SCEN_2_DISTR && rrm->state != CLUSTERHEAD) { ///< Case in which a sensor have to inform the FC via IP about its sensing results
-    //fprintf (stdout,"msg IP to send from inst %d\n",rrm->id);//dbg
-    pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-    rrm->ip.trans_cnt++ ;
-
-    //mod_lor_10_04_22++
-    /*int r =  send_msg_int( rrm->ip.s, msg_update_sens_results_3( inst, rrm->L2_id, NB_info, Sens_meas, rrm->ip.trans_cnt));
-                WARNING(r!=0);*/
-    fprintf(stderr,"before msg_update_sens %d\n",rrm->L2_id.L2_id[0]);//dbg mod_lor_11_02_17
-    PUT_IP_MSG(msg_update_sens_results_3( (rrm->L2_id.L2_id[0]-FIRST_MR_ID+1), rrm->L2_id, NB_info, Sens_meas, rrm->ip.trans_cnt));
-
-    //mod_lor_10_04_22--
-    pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-
-    //mod_lor_10_04_21++ TO DO -> to remove when sensing remont automatically info
-    //sleep(10);
-    /*if(rrm->sensing.sens_active){
-        sleep(10);
-        pthread_mutex_lock( &( rrm->sensing.exclu ) ) ;
-        rrm->sensing.trans_cnt++ ;
-        //fprintf(stderr,"sensing counter %d in msg_rrm_scan_ord on socket %d \n",rrm->sensing.trans_cnt,rrm->sensing.s->s);//dbg
-        PUT_SENS_MSG(msg_rrm_scan_ord( inst,  NB_info, 0, 0, 0, Sens_meas, rrm->sensing.trans_cnt )); //mod_lor_10_04_01: Sampl_nb instead of Sampl_freq
-        pthread_mutex_unlock( &( rrm->sensing.exclu ) ) ;
-    }*/
-    //mod_lor_10_04_21--
-
-  }
-
-#endif
-  //fprintf(stderr,"end funct rrc_update_sens\n");//dbg
-}
-
-
-/*!
-*******************************************************************************
- \brief CMM init sensing request.  Only in CH/FC.
-*/
-void cmm_init_sensing(
-  Instance_t       inst,            //!< identification de l'instance
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  //if ( (rrm->state == CLUSTERHEAD_INIT1 ) || (rrm->state == CLUSTERHEAD ) )
-  if (rrm->role == FUSIONCENTER || rrm->role == CH_COLL) { //mod_lor_10_05_05
-
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    rrm->rrc.trans_cnt++ ;
-    //fprintf(stderr,"rrc counter %d in rrm_init_scan_req  \n",rrm->rrc.trans_cnt);//dbg
-    PUT_RRC_MSG(msg_rrm_init_scan_req( inst, Start_fr ,Stop_fr,Meas_band, Meas_tpf,
-                                       Nb_channels,  Overlap, Sampl_freq, rrm->rrc.trans_cnt));
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-    //mod_lor_10_05_05++
-    /*if (SCEN_2_CENTR && rrm->role == FUSIONCENTER){
-         pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-         rrm->ip.trans_cnt++ ;
-         PUT_IP_MSG(msg_init_coll_sens_req( inst, rrm->L2_id, Start_fr, Stop_fr,Meas_band, Meas_tpf,
-                      Nb_channels,  Overlap, Sampl_freq, rrm->ip.trans_cnt));
-         pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-     }*/
-    //mod_lor_10_05_05--
-
-  } else {
-    fprintf(stderr,"It is not a cluster head!!!");
-  }
-
-
-
-}
-
-/*!
-*******************************************************************************
- \brief rrc transmits order to start sensing received from the clusterhead.
- * The node will than activate its sensing unit sending a scan_ord message
-*/
-//mod_lor_10_03_13++
-void rrc_init_scan_req(
-  Instance_t inst           , //!< identification de l'instance
-  L2_ID     L2_id           , //!< FC/CH address
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq,
-  Transaction_t  Trans_id     //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  Sens_ch_t ch_info_init[Nb_channels];
-  unsigned int Sampl_nb = 0;//((Start_fr - Stop_fr)/Sampl_freq)/Nb_channels; //mod_lor_10_04_01: number of samples per sub-band
-  unsigned int     act_start_fr = Start_fr;
-
-  for (int i = 0; i<Nb_channels; i++) {
-    ch_info_init[i].Start_f = act_start_fr   ;
-    act_start_fr+=Meas_band;
-    ch_info_init[i].Final_f = act_start_fr  ; ///< frequence final du canal
-    ch_info_init[i].Ch_id  = i + 1    ; ///< ID du canal
-
-    //ch_info_init[i].meas   = 0    ; ///< Sensing results
-    //mod_eure_lor++
-    for (int j=0; j<MAX_NUM_SB; j++)
-      ch_info_init[i].is_free[j]  = 2  ; ///< Decision about the channel
-
-    //mod_eure_lor--
-    printf("rrc_init i :%d, start %d, end %d MAX %d band %d\n",i,ch_info_init[i].Start_f,ch_info_init[i].Final_f,Sampl_nb,Meas_band);
-  }
-
-
-
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_13
-  update_node_par( &(rrm->rrc.pSensEntry), &(rrm->L2_id), Nb_channels, ch_info_init, 0,Meas_tpf,Overlap,Sampl_freq); //mod_lor_10_02_19
-  //update_node_info( &(rrm->rrc.pSensEntry), &(rrm->L2_id), Nb_channels, ch_info_init, 0);
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_13
-
-
-  memcpy( rrm->L2_id_FC.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-
-  pthread_mutex_lock( &( rrm->sensing.exclu ) ) ;
-  rrm->sensing.trans_cnt++ ;
-  //fprintf(stderr,"sensing counter %d in msg_rrm_scan_ord on socket %d \n",rrm->sensing.trans_cnt,rrm->sensing.s->s);//dbg
-  PUT_SENS_MSG(msg_rrm_scan_ord( inst,  Nb_channels, Meas_tpf, Overlap, Sampl_nb, ch_info_init, Trans_id )); //mod_lor_10_04_01: Sampl_nb instead of Sampl_freq
-  pthread_mutex_unlock( &( rrm->sensing.exclu ) ) ;
-
-}//mod_lor_10_03_13--
-
-/*!
-*******************************************************************************
- \brief CMM stop sensing request.  Only in CH/FC. With this function the node
-        sends an order to stop sensing to all sensing nodes that were regeistered
-        in sensing database.
-*/
-void cmm_stop_sensing(
-  Instance_t inst            //!< identification de l'instance
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  //   fprintf(stderr,"stop sensing %d role %d\n\n\n\n\n\n\n\n\n", rrm->id, rrm->role);//dbg
-  // if ( (rrm->state == CLUSTERHEAD_INIT1 ) || (rrm->state == CLUSTERHEAD ) )
-  if ( (rrm->role == FUSIONCENTER ) || (rrm->role == CH_COLL ) ) { //mod_lor_10_05_06
-    //fprintf(stderr,"2 end\n");//dbg
-    Sens_node_t     *p = rrm->rrc.pSensEntry;
-
-    if (p == NULL)
-      fprintf(stderr,"no sensor node information saved\n");
-
-    while (p!=NULL) {
-      //for ( int i=0;i<8;i++)
-      //    fprintf(stderr,"cmm_stop_sens: to send on %X end\n",p->L2_id.L2_id[i]);//dbg
-      pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-      rrm->rrc.trans_cnt++ ;
-      //fprintf(stderr,"rrc counter %d in msg_rrm_end_scan_req  \n",rrm->rrc.trans_cnt);//dbg
-      PUT_RRC_MSG(msg_rrm_end_scan_req( inst, p->L2_id, rrm->rrc.trans_cnt));
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-      p = p->next;
-    }
-
-    //mod_lor_10_05_06++
-    if (SCEN_2_CENTR) { //TO DO: need to add control to know if collaboration is active
-      if (rrm->role == FUSIONCENTER) {
-        sleep(2);
-        pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-        rrm->ip.trans_cnt++ ;
-        //fprintf(stderr,"rrc counter %d in msg_rrm_end_scan_req  \n",rrm->rrc.trans_cnt);//dbg
-        PUT_IP_MSG(msg_stop_coll_sens( inst));
-        pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-      } else {
-        pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-        rrm->ip.trans_cnt++ ;
-        //fprintf(stderr,"rrc counter %d in msg_rrm_end_scan_req  \n",rrm->rrc.trans_cnt);//dbg
-        //PUT_IP_MSG(msg_stop_coll_sens_conf( inst));
-        pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-      }
-    }
-
-    /*if (SCEN_2_CENTR ){ //!< To inform the CH that is collaborating in sensing to stop sensing
-        pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-        rrm->rrc.trans_cnt++ ;
-        //fprintf(stderr,"rrc counter %d in msg_rrm_end_scan_req  \n",rrm->rrc.trans_cnt);//dbg
-        PUT_RRC_MSG(msg_rrm_end_scan_req( inst, rrm->L2_id_FC, rrm->rrc.trans_cnt));
-        pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-    }*/
-    //mod_lor_10_05_06--
-
-  }
-
-
-  else {
-    fprintf(stderr,"It is not a cluster head!!!");
-  }
-
-
-
-}
-
-
-/*!
-\brief RRC ending sensing confirmation
- */
-void rrc_end_scan_conf(
-  Instance_t        inst            , //!< instance ID
-  L2_ID             L2_id           , //!< FC/CH address
-  Transaction_t     Trans_id          //!< Transaction ID
-
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  del_node( &(rrm->rrc.pSensEntry), &L2_id ) ;
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-  if ((rrm->role == CH_COLL) && (rrm->rrc.pSensEntry == NULL)) {
-    //printf("before IP message\n");//dbg
-    pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-    PUT_IP_MSG(msg_stop_coll_sens_conf( inst, rrm->L2_id)); //mod_lor_10_05_12
-    pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-    //printf("after IP message\n");//dbg
-  }
-
-
-}
-
-/*!
-\brief RRC ending sensing request
- */
-void rrc_end_scan_req(
-  Instance_t        inst            , //!< instance ID
-  L2_ID             L2_id           , //!< FC/CH address
-  Transaction_t     Trans_id          //!< Transaction ID
-
-)
-{
-
-  //fprintf(stdout,"rrc_end_scan_req() cp1 %d\n",inst); //dbg
-  rrm_t *rrm = &rrm_inst[inst] ;
-  Sens_node_t *pNode = rrm->rrc.pSensEntry;
-
-  if (pNode==NULL)
-    fprintf(stderr,"Database empty \n");
-
-  else {
-    if (rrm->role == CH_COLL && (L2_ID_cmp(&(rrm->L2_id_FC),  &L2_id))==0 ) { ///< case SCEN_2_CENTR
-      pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;//mod_lor_10_03_08
-      pNode = rrm->rrc.pSensEntry;//mod_lor_10_03_08
-
-      while (pNode!=NULL) {
-
-        rrm->rrc.trans_cnt++ ;
-        //fprintf(stderr,"rrc counter %d msg_rrm_end_scan_req  \n",rrm->rrc.trans_cnt);//dbg
-        PUT_RRC_MSG(msg_rrm_end_scan_req( inst, pNode->L2_id, rrm->rrc.trans_cnt));
-
-        pNode = pNode->next;
-      }
-
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;    //mod_lor_10_03_08
-
-    } else {
-      pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;//mod_lor_10_03_08
-      pNode = rrm->rrc.pSensEntry;//mod_lor_10_03_08
-      unsigned int i=0, Nb_chan = rrm->rrc.pSensEntry->Nb_chan;
-      Sens_ch_t *ch_point = rrm->rrc.pSensEntry->info_hd;
-      unsigned int channels[Nb_chan];
-
-      ch_point = rrm->rrc.pSensEntry->info_hd;
-
-      while  (ch_point!=NULL) {
-        channels[i]=ch_point->Ch_id;
-        ch_point = ch_point->next;
-        i++;
-      }
-
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;//mod_lor_10_03_08
-
-      if ((L2_ID_cmp(&(rrm->L2_id_FC),  &L2_id))==0) {
-
-        pthread_mutex_lock( &( rrm->sensing.exclu ) ) ;
-        rrm->sensing.trans_cnt++ ;
-        PUT_SENS_MSG(msg_rrm_end_scan_ord(inst, Nb_chan, channels, Trans_id ));
-        pthread_mutex_unlock( &( rrm->sensing.exclu ) ) ;
-      } else {
-        fprintf(stderr,"The message received is not from the right FC \n");
-      }
-    }
-  }
-
-  //dbg: test end_scan_ack
-  /*
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  rrm->rrc.trans_cnt++ ;
-
-  PUT_RRC_MSG(msg_rrm_end_scan_ord(inst, rrm->L2_id_FC, 0, NULL, Trans_id ));
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;*/
-
-
-}
-
-/*!
-*******************************************************************************
- \brief rrc transmits order to monitor channels
-*/
-void rrc_init_mon_req(
-  Instance_t inst           , //!< identification de l'instance
-  L2_ID     L2_id           , //!< FC address
-  unsigned int  *ch_to_scan , //!< vector of identifiers of the channels to monitor
-  unsigned int  NB_chan     , //!< Number of channels to monitor
-  unsigned int     interv          , //!< time between two sensing operation
-  Transaction_t  Trans_id     //!< Transaction ID
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if ((L2_ID_cmp(&(rrm->L2_id_FC),  &L2_id))==0) {
-
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    rrm->rrc.trans_cnt++ ;
-    //memcpy( rrm->L2_id_FC.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    //fprintf(stderr,"rrc counter %d msg_rrm_scan_ord  \n",rrm->rrc.trans_cnt);//dbg
-    //PUT_RRC_MSG(msg_rrm_scan_ord( inst,  NB_chan, ch_to_scan, Trans_id ));
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-  } else {
-    fprintf(stderr,"The message received is not from the right FC \n");
-  }
-
-}
-
-//To send via IP:
-
-/*!
-*******************************************************************************
- \brief rrc transmits order to monitor channels
-*/
-/*
-void rrc_clust_scan_req(
-    Instance_t inst             , //!< instance ID
-    L2_ID L2_id                 , //!< Layer 2 (MAC) ID of CH1
-    float interv                , //!< time between two sensing operation
-    COOPERATION_T coop          , //!< Cooperation mode
-    Transaction_t Trans_id        //!< Transaction ID
-    )
-{
-    rrm_t *rrm = &rrm_inst[inst] ;
-
-    memcpy( rrm->L2_id_FC.L2_id, L2_id.L2_id, sizeof(L2_ID) )  ;
-    rrm->role = CH_COLL;
-
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    rrm->rrc.trans_cnt++ ;
-    PUT_RRC_MSG(msg_rrm_init_scan_req( inst, interv, rrm->rrc.trans_cnt));
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    rrm->rrc.trans_cnt++ ;
-    PUT_RRC_MSG(msg_rrm_clust_scan_conf( inst, L2_id, coop, Trans_id));
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-
-
-}*/
-
-/*!
-*******************************************************************************
- \brief rrc transmits order from CH1 to monitor channels
-*/
-/*
-void rrc_clust_mon_req(
-    Instance_t inst           , //!< identification de l'instance
-    L2_ID     L2_id           , //!< Layer 2 (MAC) ID of CH1
-    unsigned int  *ch_to_scan , //!< vector of identifiers of the channels to monitor
-    unsigned int  NB_chan     , //!< Number of channels to monitor
-    float     interv          , //!< time between two sensing operation
-    Transaction_t  Trans_id     //!< Transaction ID
-    )
-{
-    rrm_t *rrm = &rrm_inst[inst] ;
-
-    if ((L2_ID_cmp(&(rrm->L2_id_FC),  &L2_id))==0) {
-
-        Sens_node_t *pNode = rrm->rrc.pSensEntry;
-        while (pNode!=NULL){
-             pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-            rrm->rrc.trans_cnt++ ;
-            PUT_RRC_MSG(msg_rrm_init_mon_req( inst,  pNode->L2_id, NB_chan, interv, ch_to_scan, Trans_id ));
-            pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-            pNode = pNode->next;
-        }
-
-
-        pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-        rrm->rrc.trans_cnt++ ;
-        PUT_RRC_MSG(msg_rrm_clust_mon_conf( inst,  L2_id, Trans_id ));
-        pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-
-    }
-    else {
-        fprintf(stderr,"The message received is not from the right CH \n");
-    }
-}*/
-
-/*!mod_lor_10_11_03 -> part about SCEN_2 and CH_COLL
-*******************************************************************************
-\brief  Updating of the sensing measures received via IP from another node
-*/
-unsigned int update_sens_results(
-  Instance_t inst         , //!< Identification de l'instance
-  L2_ID L2_id             , //!< Adresse L2 of the source of information
-  unsigned int NB_info    , //!< Number of channel info
-  Sens_ch_t *Sens_meas    , //!< Pointer to the sensing information
-  double info_time
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  CHANNELS_DB_T *channel;
-  int i,j,k, send_up_to_SN=0;
-  unsigned int all_result;
-  int tot_ch;
-  //L2_ID User_active_L2_id;
-
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  update_node_info( &(rrm->rrc.pSensEntry), &L2_id, NB_info, Sens_meas, info_time);
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-  //mod_lor_10_10_27++
-  if(rrm->role == CH_COLL) {
-    //AAA: add procedure to take decision from the database -> send a probability that the channel is busy to primary
-
-    Sens_ch_t coll_measures[NB_SENS_MAX];
-    Sens_node_t *pNode=rrm->rrc.pSensEntry;
-    unsigned int weight=0; ///number of sensors of CH_COLL
-
-    while (pNode!=NULL) {
-      weight++;
-      pNode=pNode->next;
-    }
-
-    //printf ("nodes %d\n",weight);//dbg
-
-    pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-
-    for (i=0; take_ch_coll_decision( rrm->rrc.pSensEntry, &coll_measures[i],(i+1))==0; i++);
-
-    pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-    //  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-    // take_ch_coll_decision(rrm->rrc.pSensEntry, channel.Ch_id,is_free);
-    // pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-    pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-    rrm->ip.trans_cnt++ ;
-    PUT_IP_MSG(msg_up_clust_sens_results( inst, rrm->L2_id, i, weight, coll_measures, rrm->ip.trans_cnt));
-    pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-
-  }
-
-  //mod_lor_10_10_27++
-
-  //mod_lor_10_05_28
-  ///case of scenario 1
-  if (SCEN_1) {
-    if (!(rrm->ip.waiting_SN_update) ) {
-      pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-      channel = rrm->rrc.pChannelsEntry;
-
-      while (channel!=NULL) {
-        //printf("Channel!=NULL\n");
-        if (channel->is_ass)
-          if((send_up_to_SN = evalaute_sens_info(rrm->rrc.pSensEntry,channel->channel.Start_f,channel->channel.Final_f)))
-            break;
-
-        channel = channel->next;
-      }
-
-      pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-      if (send_up_to_SN && rrm->role == FUSIONCENTER) {
-        return 1;
-        //open_freq_query(inst, L2_id, 0, 0);
-      }
-    }
-  }
-  ///case of scenario 2 add_lor_10_11_03
-  else if (SCEN_2_CENTR) {
-    int free_av=0;
-    int N_chan=0;
-    int chan_in_use=0;
-    unsigned int reallocate = 0;
-    L2_ID User_active_L2_id[MAX_USER_NB];
-    L2_ID User_dest_L2_id[MAX_USER_NB];
-    CHANNELS_DB_T *t_channels_db = NULL;
-
-    ///check part: it evaluates if a channel in use is not free anymore
-    send_up_to_SN = check_allocated_channels( inst, User_active_L2_id ,User_dest_L2_id ,&free_av);
-
-    ///Attribute new channels to users that have to change or that are waiting
-    if (send_up_to_SN>0 || rrm->ip.users_waiting_update>0) {
-      /// case in which there are enough free channels
-      if (free_av>=(send_up_to_SN + rrm->ip.users_waiting_update)) {
-        pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-        j = rrm->ip.users_waiting_update-1;
-
-        for (k = send_up_to_SN; k<(send_up_to_SN + rrm->ip.users_waiting_update); k++) {
-          memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][0].L2_id, sizeof(L2_ID));
-          memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][1].L2_id, sizeof(L2_ID));
-          j--;
-        }
-
-        all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 );  ///Update of channels for both busy and waiting users
-
-        if (all_result == 0) {
-          rrm->ip.users_waiting_update=0;
-        } else {
-          printf ("ERROR!!! in if free not enough free!!! all_result =%d\n",all_result);//dbg
-        }
-
-        pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-      }
-
-      ///no channels to change, but users waiting channels //add_lor_10_11_08++
-      ///reallocate only if there are more available channels, otherwise don't do anything
-      else if (send_up_to_SN==0 && rrm->ip.users_waiting_update>0) {
-        chan_in_use = count_free_channels (inst, &free_av);
-        tot_ch = chan_in_use + free_av;
-        N_chan = find_available_channels(rrm->rrc.pSensEntry,&(t_channels_db));
-        del_all_channels( &(t_channels_db));
-
-        if (N_chan>tot_ch) {
-          reallocate = 1;
-        } else if (free_av>0) {
-          pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-
-          for (k=0; rrm->ip.users_waiting_update>0 && free_av>0; k++) { /// allocate frequencies to waiting users
-            memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID));
-            memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID));
-            free_av--;
-            rrm->ip.users_waiting_update--;
-            printf ("N7 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
-          }
-
-          all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 );  ///Update of channels for waiting users
-          pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-        }
-      }//add_lor_10_11_08--
-
-      ///all channels to reallocate
-      if (reallocate || (free_av<=(send_up_to_SN + rrm->ip.users_waiting_update) && send_up_to_SN>0)) {
-        chan_in_use = count_free_channels (inst, &free_av);
-        tot_ch = chan_in_use + send_up_to_SN;
-
-        if (chan_in_use!=0) {
-          ///add all channels in use to channels to change
-          pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-          t_channels_db = rrm->rrc.pChannelsEntry;
-
-          while (t_channels_db!=NULL) {
-            if (t_channels_db->is_ass && t_channels_db->is_free) {
-              memcpy(User_active_L2_id[send_up_to_SN].L2_id , t_channels_db->source_id.L2_id, sizeof(L2_ID));
-              memcpy(User_dest_L2_id[send_up_to_SN].L2_id , t_channels_db->dest_id.L2_id, sizeof(L2_ID));
-              send_up_to_SN++;
-            }
-
-            t_channels_db = t_channels_db->next;
-          }
-
-          pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-        }
-
-        pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-        del_all_channels( & (rrm->rrc.pChannelsEntry) );
-        pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-        pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-
-        for (k = send_up_to_SN, j = rrm->ip.users_waiting_update-1; j>=0 ; j--,k++) {
-          memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][0].L2_id, sizeof(L2_ID));
-          memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][1].L2_id, sizeof(L2_ID));
-        }
-
-        all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 );  ///Update of channels for waiting users
-        pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-
-        if (all_result == 0) {
-          pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-          rrm->ip.users_waiting_update=0;
-          pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-        } else {
-          pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-          rrm->ip.users_waiting_update=0;
-
-          for (j=1; j<=all_result; j++) {
-            memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0].L2_id,User_active_L2_id[k-j].L2_id, sizeof(L2_ID));
-            memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1].L2_id,User_dest_L2_id[k-j].L2_id, sizeof(L2_ID));
-            rrm->ip.users_waiting_update++;
-            printf ("N8 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
-          }
-
-          pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-        }
-      }
-    }
-  }
-
-  return 0;
-
-
-  //fprintf(stderr,"node entry  @%p \n", rrm->rrc.pSensEntry);//dbg
-  //fprintf(stderr,"2 cluster_head\n");//dbg
-  //AAA: for the moment the channel db is reserved for CHs and SUs only in SCEN_2_DISTR
-  /*Sens_node_t *pn = rrm->rrc.pSensEntry;
-  Sens_ch_t *pc;
-  while (pn!=NULL){
-      pc = pn->info_hd;
-      while (pc!=NULL){
-          for (int j=0; j<NUM_SB; j++)//dbg
-              fprintf(stderr,"sns_update: channel %d sb %d is %d\n",pc->Ch_id, j, pc->is_free[j]);//dbg
-          pc=pc->next;
-      }
-      pn=pn->next;
-  }*/
-
-
-  /*if ( rrm->role == FUSIONCENTER || SCEN_2_DISTR || rrm->role == CH_COLL ) //mod_lor_10_03_08: role instead of status -> to check
-  //mod_lor_10_05_06 -> 2nd option of if changed (before SCEN_2_DISTR)
-  {
-
-      //fprintf(stderr,"cluster_head\n");//dbg
-      CHANNEL_T channel ;
-      CHANNELS_DB_T *canal;
-      unsigned int is_free[MAX_NUM_SB];//mod_lor_10_05_28 ->char instead of int
-      for (i=0;i<MAX_NUM_SB;i++)
-          is_free[i]=0;
-      int decision;
-      unsigned int send_up_to_SN =0; //mod_lor_10_05_12
-      for (i=0; i<NB_info; i++){
-
-          channel.Start_f = Sens_meas[i].Start_f;
-          channel.Final_f = Sens_meas[i].Final_f;
-          channel.Ch_id   = Sens_meas[i].Ch_id;
-          channel.QoS     = 0;
-          printf(stdout,"Channel in msg %d : \n", channel.Ch_id); //dbg ou LOG
-          for (decision = 0; decision<MAX_NUM_SB; decision++)
-              fprintf(stdout,"SB %d : is %d\n", decision,Sens_meas[i].is_free[decision]); //dbg ou LOG
-          */
-  //mod_lor_10_03_19++
-  /*     pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-       take_decision(rrm->rrc.pSensEntry, channel.Ch_id,is_free);//mod_eure_lor
-    //   pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-       //mod_lor_10_03_19--
-
-       //mod_lor_10_05_07++
-       if (decision>0)
-           is_free = 1;
-       else
-           is_free = 0;*/
-
-
-
-  //Sens_meas[i].meas = decision;
-
-  /*     if(rrm->role == CH_COLL){
-           memcpy(Sens_meas[i].is_free, is_free, MAX_NUM_SB*sizeof(unsigned int));//mod_lor_10_05_28 ->char instead of int
-           //Sens_meas[i].meas = decision;
-       }
-       //mod_lor_10_05_07--
-
-       fprintf(stdout,"Channel %d : \n", channel.Ch_id); //dbg ou LOG
-       for (decision = 0; decision<MAX_NUM_SB; decision++)
-           fprintf(stdout,"SB %d : is %d\n", decision,is_free[decision]); //dbg ou LOG
-       */
-  //   pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  /*        canal = up_chann_db( &(rrm->rrc.pChannelsEntry), channel, is_free[0], info_time);//TO DO: fix it!
-          pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-          //mod_lor_10_05_12++
-          if (!(rrm->ip.waiting_SN_update) && canal->is_ass && !(canal->is_free)){//mod_lor_10_05_18
-              //fprintf(stderr,"send_up_to_SN =1\n");//dbg
-              send_up_to_SN =1;//mod_lor_10_05_12--
-          }
-          //fprintf(stderr,"chann %d updated\n", Sens_meas[i].Ch_id);//dbg
-
-      }
-      //mod_lor_10_05_07++
-      if(rrm->role == CH_COLL){
-          pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-          rrm->ip.trans_cnt++ ;
-          PUT_IP_MSG(msg_up_clust_sens_results( inst, rrm->L2_id, NB_info, decision, Sens_meas, rrm->ip.trans_cnt));
-          pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-
-      }//mod_lor_10_05_07--
-      //mod_lor_10_05_12++
-      if (send_up_to_SN && rrm->role == FUSIONCENTER){
-          open_freq_query(inst, L2_id, 0, 0);
-      }
-
-
-  }else
-      fprintf(stderr,"error!!! Cannot update channels \n");*/
-
-}
-
-//mod_lor_10_04_14++
-/*!
-*******************************************************************************
-\brief  SENSING unit end scan confirmation
-*/
-void sns_end_scan_conf(
-  Instance_t inst          //!< Identification de l'instance
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  ///< Next three lines delete the local sensing information database
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  del_node( &(rrm->rrc.pSensEntry), &(rrm->L2_id));
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-  // AAA TO DO: Confirmation sent via RRC to the fusion centre in case FC id != 0
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  rrm->rrc.trans_cnt++ ;
-  //fprintf(stderr, "before put RRM_end_scan_confirm\n");//dbg
-  PUT_RRC_MSG(msg_rrm_end_scan_conf( inst, rrm->rrc.trans_cnt));
-  //fprintf(stderr, "after put RRM_end_scan_confirm\n"); //dbg
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-}
-//mod_lor_10_04_14--
-
-/*!//mod_lor_10_11_03
-*******************************************************************************
-\brief  Updating of the sensing measures received via IP from another node
-*/
-void up_coll_sens_results(
-  Instance_t inst         , //!< Identification de l'instance
-  L2_ID L2_id             , //!< Adresse L2 of the source of information
-  unsigned int NB_info    , //!< Number of channel info
-  Sens_ch_t *Sens_meas    , //!< Pointer to the sensing information
-  double info_time
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  int free_av=0;
-  int N_chan=0;
-  int chan_in_use=0;
-  unsigned int reallocate = 0;
-  L2_ID User_active_L2_id[MAX_USER_NB];
-  L2_ID User_dest_L2_id[MAX_USER_NB];
-  CHANNELS_DB_T *t_channels_db = NULL;
-  int i,j,k, send_up_to_SN=0;
-  unsigned int all_result;
-  int tot_ch;
-
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  update_node_info( &(rrm->rrc.pSensEntry), &L2_id, NB_info, Sens_meas, info_time);
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-
-  if (SCEN_2_CENTR && rrm->role == FUSIONCENTER) {
-    ///check part: it evaluates if a channel in use is not free anymore
-    send_up_to_SN = check_allocated_channels( inst, User_active_L2_id ,User_dest_L2_id ,&free_av);
-
-    ///Attribute new channels to users that have to change or that are waiting
-    if (send_up_to_SN>0 || rrm->ip.users_waiting_update>0) {
-      /// case in which there are enough free channels
-      if (free_av>=(send_up_to_SN + rrm->ip.users_waiting_update)) {
-        pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-        j = rrm->ip.users_waiting_update-1;
-
-        for (k = send_up_to_SN; k<(send_up_to_SN + rrm->ip.users_waiting_update); k++) {
-          memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][0].L2_id, sizeof(L2_ID));
-          memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][1].L2_id, sizeof(L2_ID));
-          j--;
-        }
-
-        all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 );  ///Update of channels for both busy and waiting users
-
-        if (all_result == 0) {
-          rrm->ip.users_waiting_update=0;
-        } else {
-          printf ("ERROR!!! in if free not enough free!!! all_result =%d\n",all_result);//dbg
-        }
-
-        pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-      }
-
-      ///no channels to change, but users waiting channels //add_lor_10_11_08++
-      ///reallocate only if there are more available channels, otherwise don't do anything
-      else if (send_up_to_SN==0 && rrm->ip.users_waiting_update>0) {
-        chan_in_use = count_free_channels (inst, &free_av);
-        tot_ch = chan_in_use + free_av;
-        N_chan = find_available_channels(rrm->rrc.pSensEntry,&(t_channels_db));
-        del_all_channels( &(t_channels_db));
-
-        if (N_chan>tot_ch) {
-          reallocate = 1;
-        } else if (free_av>0) {
-          pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-
-          for (k=0; rrm->ip.users_waiting_update>0 && free_av>0; k++) { /// allocate frequencies to waiting users
-            memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID));
-            memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID));
-            free_av--;
-            rrm->ip.users_waiting_update--;
-            printf ("N9 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
-          }
-
-          all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 );  ///Update of channels for waiting users
-          pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-        }
-      }//add_lor_10_11_08--
-
-      ///all channels to reallocate
-      if (reallocate || (free_av<=(send_up_to_SN + rrm->ip.users_waiting_update) && send_up_to_SN>0)) {
-        chan_in_use = count_free_channels (inst, &free_av);
-        tot_ch = chan_in_use + send_up_to_SN;
-
-        if (chan_in_use!=0) {
-          ///add all channels in use to channels to change
-          pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-          t_channels_db = rrm->rrc.pChannelsEntry;
-
-          while (t_channels_db!=NULL) {
-            if (t_channels_db->is_ass && t_channels_db->is_free) {
-              memcpy(User_active_L2_id[send_up_to_SN].L2_id , t_channels_db->source_id.L2_id, sizeof(L2_ID));
-              memcpy(User_dest_L2_id[send_up_to_SN].L2_id , t_channels_db->dest_id.L2_id, sizeof(L2_ID));
-              send_up_to_SN++;
-            }
-
-            t_channels_db = t_channels_db->next;
-          }
-
-          pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-        }
-
-        pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-        del_all_channels( & (rrm->rrc.pChannelsEntry) );
-        pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-        pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-
-        for (k = send_up_to_SN, j = rrm->ip.users_waiting_update-1; j>=0 ; j--,k++) {
-          memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][0].L2_id, sizeof(L2_ID));
-          memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][1].L2_id, sizeof(L2_ID));
-        }
-
-        all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 );  ///Update of channels for waiting users
-        pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-
-        if (all_result == 0) {
-          pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-          rrm->ip.users_waiting_update=0;
-          pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-        } else {
-          pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-          rrm->ip.users_waiting_update=0;
-
-          for (j=1; j<=all_result; j++) {
-            memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0].L2_id,User_active_L2_id[k-j].L2_id, sizeof(L2_ID));
-            memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1].L2_id,User_dest_L2_id[k-j].L2_id, sizeof(L2_ID));
-            rrm->ip.users_waiting_update++;
-            printf ("N10 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
-          }
-
-          pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-        }
-      }
-    }
-  }
-
-  ///check part
-  //        send_up_to_SN = check_allocated_channels( inst, User_active_L2_id ,User_dest_L2_id ,&free_av);
-
-  /*pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  channel = rrm->rrc.pChannelsEntry;
-  tot_ch = 0;
-  send_up_to_SN=0;
-  k=0;
-  free_av=0;
-  while (channel!=NULL){
-      if(evalaute_sens_info(rrm->rrc.pSensEntry,channel->channel.Start_f,channel->channel.Final_f)){
-          if (channel->is_ass){
-              ///save the address of user active on the channel
-              memcpy( User_active_L2_id[send_up_to_SN].L2_id, channel->source_id.L2_id, sizeof(L2_ID) )  ;
-              memcpy( User_dest_L2_id[send_up_to_SN].L2_id, channel->dest_id.L2_id, sizeof(L2_ID) )  ;
-              send_up_to_SN++;
-          }
-          channel->is_free=0;
-          channels_to_change[tot_ch]= channel->channel.Ch_id;
-      }else{
-          if (!(channel->is_ass))
-              free_av++;
-          channels_to_change[tot_ch]=-1;
-      }
-      channel = channel->next;
-      tot_ch++;
-  }
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;*/
-
-  ///Attribute new channels to users that have to change
-  /*      if (send_up_to_SN>0){
-              //pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-              /// case in which there are enough free channels
-              if (free_av>=send_up_to_SN){
-                  for (k = 0; k < send_up_to_SN; k++) {
-                      ask_freq_to_CH( inst, User_active_L2_id[k], User_dest_L2_id[k],1, 0 );  ///QoS fixed to 1
-                  }
-                  /*k = 0;                              ///check on channels to attribute
-                  channel = rrm->rrc.pChannelsEntry;
-                  while (channel!=NULL && k< send_up_to_SN){
-                      if (channel->is_free && !(channel->is_ass)){
-                          channel->is_ass=1;
-                          memcpy( channel->source_id.L2_id, User_active_L2_id[k].L2_id, sizeof(L2_ID) )  ;
-                          memcpy( channel->dest_id.L2_id, User_dest_L2_id[k].L2_id, sizeof(L2_ID) )  ;
-                          k++;
-                      }
-
-                  }*/
-  //            }
-  ///all channels to reallocate
-  /*            else{
-                  del_all_channels( & (rrm->rrc.pChannelsEntry) );
-                  for (k = 0; k < send_up_to_SN; k++) {
-                      all_result = ask_freq_to_CH( inst, User_active_L2_id[k], User_dest_L2_id[k],1, 0 );  ///QoS fixed to 1
-                      if (all_result!=0)
-                          break;
-                  }
-                  //add_lor_10_11_08++
-                  if (k!=send_up_to_SN){
-                      printf("Not enough available channels for all users!\n%d links not assigned\n",send_up_to_SN-k);//dbg
-                      pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-                      while (k < send_up_to_SN){
-                          memcpy(L2_id_wait_users[users_waiting_update][1].L2_id,User_active_L2_id[k].L2_id, sizeof(L2_ID));
-                          memcpy(L2_id_wait_users[users_waiting_update][2].L2_id,User_dest_L2_id[k].L2_id, sizeof(L2_ID));
-                          users_waiting_update++;
-                          k++;
-                      }
-                      pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-                  }
-                  //add_lor_10_11_08--
-
-
-                  /*k = 0;                              ///check on channels to attribute
-                  channel = rrm->rrc.pChannelsEntry;
-                  while (channel!=NULL){
-                      if (channel->is_ass){
-                          memcpy( User_active_L2_id[k].L2_id, channel->source_id.L2_id, sizeof(L2_ID) )  ;
-                          memcpy( User_dest_L2_id[k].L2_id, channel->dest_id.L2_id, sizeof(L2_ID) )  ;
-                          k++;
-                      }
-                  }
-
-                  ///new identification of available channels and allocation to users that need to communicate
-                  NB_chan = find_available_channels(rrm->rrc.pSensEntry,&(rrm->rrc.pChannelsEntry));
-                  printf ("found channels: %d \n", NB_chan);//dbg
-
-                  ///Analysing the list of identified channels
-                  channel = rrm->rrc.pChannelsEntry;
-                  j=0;
-
-                  while (channel!=NULL && j<k){
-                      if (channel->is_free && !channel->is_ass){
-                          memcpy(&(ass_channels[j]) , &(channel->channel), sizeof(CHANNEL_T));
-                          up_chann_ass( rrm->rrc.pChannelsEntry  , ass_channels[j].Ch_id, 1, User_active_L2_id[j], User_dest_L2_id[j] );
-                          printf ("copied channel: %d start %d end %d\n",ass_channels[j].Ch_id,ass_channels[j].Start_f,ass_channels[j].Final_f);//dbg
-                          j++;
-                      }
-                      channel = channel->next;
-                  }*/
-
-  //            }
-  //pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-  //        }
-
-
-  //ask_freq_to_CH( inst, User_active_L2_id, send_up_to_SN, 0 ); /// Update sent to user active
-
-
-  else
-    fprintf(stderr,"Error!!! Not a fusion center or not in Scenario 2 \n");
-
-}
-
-
-/*!//mod_lor_10_11_03
-*******************************************************************************
-\brief  check channels in use in second scenario
-*/
-int check_allocated_channels(
-  Instance_t inst         , //!< Identification de l'instance
-  L2_ID *User_active_L2_id ,
-  L2_ID *User_dest_L2_id ,
-  int *free_av
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  CHANNELS_DB_T *channel;
-  int send_up_to_SN=0;
-
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  channel = rrm->rrc.pChannelsEntry;
-  send_up_to_SN=0;
-  *free_av=0;
-
-  while (channel!=NULL) {
-    if(evalaute_sens_info(rrm->rrc.pSensEntry,channel->channel.Start_f,channel->channel.Final_f)) {
-      if (channel->is_ass) {
-        ///save the address of user active on the channel
-        memcpy( User_active_L2_id[send_up_to_SN].L2_id, channel->source_id.L2_id, sizeof(L2_ID) )  ;
-        memcpy( User_dest_L2_id[send_up_to_SN].L2_id, channel->dest_id.L2_id, sizeof(L2_ID) )  ;
-        send_up_to_SN++;
-      }
-
-      channel->is_free=0;
-    } else {
-      if (!(channel->is_ass))
-        *free_av++;
-    }
-
-    channel = channel->next;
-  }
-
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-  return (send_up_to_SN);
-}
-
-
-/*!//mod_lor_10_11_08
-*******************************************************************************
-\brief  start_coll_sensing
-*/
-void cmm_init_coll_sensing(
-  Instance_t       inst,            //!< identification de l'instance
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-
-  if (SCEN_2_CENTR && rrm->role == FUSIONCENTER) {
-    pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
-    rrm->ip.trans_cnt++ ;
-    PUT_IP_MSG(msg_init_coll_sens_req( inst, rrm->L2_id, Start_fr, Stop_fr,Meas_band, Meas_tpf,
-                                       Nb_channels,  Overlap, Sampl_freq, rrm->ip.trans_cnt));
-    pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
-  } else {
-    printf ("ERROR! Node is not the main CH or not in the right scenario.\n");
-  }
-}
-
-/*!//mod_lor_10_11_08
-*******************************************************************************
-\brief  count channels in use and free channels in second scenario
-*/
-int count_free_channels(
-  Instance_t inst         , //!< Identification de l'instance
-  int *free_av
-)
-{
-  rrm_t *rrm = &rrm_inst[inst] ;
-  CHANNELS_DB_T *channel;
-  int used_ch=0;
-
-  pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
-  channel = rrm->rrc.pChannelsEntry;
-  *free_av=0;
-
-  while (channel!=NULL) {
-    if(!evalaute_sens_info(rrm->rrc.pSensEntry,channel->channel.Start_f,channel->channel.Final_f)) {
-      if (!(channel->is_ass))
-        *free_av++;
-      else
-        used_ch++;
-    }
-
-    channel = channel->next;
-  }
-
-  pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
-  return (used_ch);
-}
diff --git a/openair3/MESH/RRM/sens_op.h b/openair3/MESH/RRM/sens_op.h
deleted file mode 100755
index 8fb7e26d3a831a0217d96055539093532844b449..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_op.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file     sens_op.h
-
-\brief    Fichier d'entete contenant les declarations des types, des defines ,
-      et des fonctions relatives a la gestion du channel sensing.
-
-\author   IACOBELLI Lorenzo
-
-\date     21/10/09
-
-
-\par     Historique:
-      $Author$  $Date$  $Revision$
-      $Id$
-      $Log$
-
-*******************************************************************************
-*/
-
-#ifndef SENS_OP_H
-#define SENS_OP_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//mod_lor_10_05_28: declaration of function for sensing and frequency allocation
-unsigned int evalaute_sens_info(
-  Sens_node_t *Sens_db,
-  unsigned int Start_f,
-  unsigned int Final_f
-);
-
-void take_decision(
-  Sens_node_t *SensDB     , //!< pointer to the sensing database
-  unsigned int Ch_id      , //!< channel ID
-  unsigned int *is_free  //mod_lor_10_05_28 ->char instead of int
-
-);
-
-unsigned int take_decision_sens(
-  Sens_node_t *SensDB     , //!< pointer to the sensing database
-  Sens_ch_t *finalSensChann, //!< info that will be returned after decision
-  unsigned int Ch_id       //!< channel ID
-
-);
-
-unsigned int find_available_channels(
-  Sens_node_t *Sens_db,
-  CHANNELS_DB_T **channels_db
-);
-
-unsigned int evalaute_sens_info(
-  Sens_node_t *Sens_db,
-  unsigned int Start_f,
-  unsigned int Final_f
-);
-
-unsigned int check_SN_channels(
-  Sens_node_t *Sens_db,
-  CHANNELS_DB_T *channels_db,
-  unsigned int *used_channels,
-  unsigned int nb_used_ch
-);
-
-void take_local_decision(
-  Sens_ch_t *Sens_info
-);
-
-unsigned int take_ch_coll_decision(
-  Sens_node_t *SensDB     , //!< pointer to the sensing database
-  Sens_ch_t *finalSensChann, //!< info that will be returned after decision
-  unsigned int Ch_id       //!< channel ID
-);
-
-int check_allocated_channels(
-  Instance_t inst         , //!< Identification de l'instance
-  L2_ID *User_active_L2_id ,
-  L2_ID *User_dest_L2_id ,
-  int *free_av
-);
-
-int count_free_channels(
-  Instance_t inst         , //!< Identification de l'instance
-  int *free_av
-);
-// ---------------------------------------------------------------------------
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SENS_OP_H */
diff --git a/openair3/MESH/RRM/sens_scen_2_form.c b/openair3/MESH/RRM/sens_scen_2_form.c
deleted file mode 100644
index 135888d2fee26ca296497974ae1798bd58efc8de..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_scen_2_form.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/* Form definition file generated with fdesign. */
-
-#include "forms.h"
-#include <stdlib.h>
-#include "sens_scen_2_form.h"
-
-FD_sens_scen_2 *create_form_sens_scen_2(void)
-{
-  FL_OBJECT *obj;
-  FD_sens_scen_2 *fdui = (FD_sens_scen_2 *) fl_calloc(1, sizeof(*fdui));
-
-  fdui->sens_scen_2 = fl_bgn_form(FL_NO_BOX, 460, 280);
-  obj = fl_add_box(FL_UP_BOX,0,0,460,280,"");
-  fdui->User_1 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,10,420,100,"User_1");
-  fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  /* fdui->User_3 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,80,340,600,120,"User_3");
-     fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-   fdui->User_4 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,80,490,600,120,"User_4");
-     fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-     fl_set_object_lsize(obj,FL_NORMAL_SIZE);*/
-  fdui->User_2 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,140,420,100,"User_2");
-  fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fl_end_form();
-
-  fdui->sens_scen_2->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
diff --git a/openair3/MESH/RRM/sens_scen_2_form.fd b/openair3/MESH/RRM/sens_scen_2_form.fd
deleted file mode 100644
index a30c331d5119992a94f383dc9b3b8dbfd621d73d..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_scen_2_form.fd
+++ /dev/null
@@ -1,106 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: sens_scen_2
-Width: 740
-Height: 650
-Number of Objects: 5
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 740 650
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 80 20 600 120
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_1
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_1
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 80 340 600 120
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_3
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_3
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 80 490 600 120
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_4
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_4
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 80 180 600 120
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: User_2
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: User_2
-callback: 
-argument: 
-
-==============================
-create_the_forms
diff --git a/openair3/MESH/RRM/sens_scen_2_form.h b/openair3/MESH/RRM/sens_scen_2_form.h
deleted file mode 100644
index 70d69a3273d4ad3054c42c5ce88283ad89efd578..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_scen_2_form.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/** Header file generated with fdesign on Thu Nov  4 18:36:46 2010.**/
-
-#ifndef FD_sens_scen_2_h_
-#define FD_sens_scen_2_h_
-
-/** Callbacks, globals and object handlers **/
-
-
-/**** Forms and Objects ****/
-typedef struct {
-  FL_FORM *sens_scen_2;
-  void *vdata;
-  char *cdata;
-  long  ldata;
-  FL_OBJECT *User_1;
-  FL_OBJECT *User_3;
-  FL_OBJECT *User_4;
-  FL_OBJECT *User_2;
-} FD_sens_scen_2;
-
-extern FD_sens_scen_2 * create_form_sens_scen_2(void);
-
-#endif /* FD_sens_scen_2_h_ */
diff --git a/openair3/MESH/RRM/sens_sensor.c b/openair3/MESH/RRM/sens_sensor.c
deleted file mode 100644
index 33841fd3f781491c6ced8e67dbfd8fff2f2a87c8..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_sensor.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/* Form definition file generated with fdesign. */
-
-#include "forms.h"
-#include <stdlib.h>
-#include "sens_sensor.h"
-
-FD_sens_sensor *create_form_sens_sensor(void)
-{
-  FL_OBJECT *obj;
-  FD_sens_sensor *fdui = (FD_sens_sensor *) fl_calloc(1, sizeof(*fdui));
-
-  fdui->sens_sensor = fl_bgn_form(FL_NO_BOX, 940, 280);
-  obj = fl_add_box(FL_UP_BOX,0,0,940,280,"");
-  fdui->local_sensing_results = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,30,30,880,210,"Local Sensing Results");
-  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fl_end_form();
-
-  fdui->sens_sensor->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
diff --git a/openair3/MESH/RRM/sens_sensor.fd b/openair3/MESH/RRM/sens_sensor.fd
deleted file mode 100644
index 91757e916a6d9d7cc5bab321f2a48c16c8afa078..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_sensor.fd
+++ /dev/null
@@ -1,52 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: sens_sensor
-Width: 940
-Height: 280
-Number of Objects: 2
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 940 280
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 30 30 880 210
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Local Sensing Results
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: local_sensing_results
-callback: 
-argument: 
-
-==============================
-create_the_forms
diff --git a/openair3/MESH/RRM/sens_sensor.h b/openair3/MESH/RRM/sens_sensor.h
deleted file mode 100644
index f8693efbc499a298ffbe4994d5d227cf0835d9ac..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sens_sensor.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/** Header file generated with fdesign on Fri Feb 18 14:31:56 2011.**/
-
-#ifndef FD_sens_sensor_h_
-#define FD_sens_sensor_h_
-
-/** Callbacks, globals and object handlers **/
-
-
-/**** Forms and Objects ****/
-typedef struct {
-  FL_FORM *sens_sensor;
-  void *vdata;
-  char *cdata;
-  long  ldata;
-  FL_OBJECT *local_sensing_results;
-} FD_sens_sensor;
-
-extern FD_sens_sensor * create_form_sens_sensor(void);
-
-#endif /* FD_sens_sensor_h_ */
diff --git a/openair3/MESH/RRM/sensing_2_rrm_msg.c b/openair3/MESH/RRM/sensing_2_rrm_msg.c
deleted file mode 100644
index bfc4e931b14582ebd8aa04128a1e1d21f679b30f..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sensing_2_rrm_msg.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       rrc_2_rrm_msg.c
-
-\brief      Fonctions permettant le formattage des donnees pour l'envoi d'un
-            message sur le socket entre le  SENSING et le RRM -> to use in emulation of sensing unit
-
-\author     IACOBELLI Lorenzo
-
-\date       15/04/10
-
-
-\par     Historique:
-
-
-*******************************************************************************
-*/
-
-#ifdef SNS_EMUL
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include "L3_rrc_defs.h"
-#include "rrm_sock.h"
-#include "L3_rrc_interface.h"
-#include "rrc_rrm_msg.h"
-#include "rrm_util.h"
-
-#else
-
-#include "defs.h"
-
-#endif
-
-#include "L3_rrc_defs.h"
-
-#include "rrm_sock.h"
-#include "sensing_rrm_msg.h"
-#include "rrm_util.h"
-
-msg_t mesg;
-
-#ifdef TRACE
-//! Macro creant la chaine a partir du nom de la variable
-#define STRINGIZER(x) #x
-//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
-const char *Str_msg_sns_rrm[NB_MSG_SNS_RRM] = {
-  STRINGIZER(SNS_UPDATE_SENS          ),
-  STRINGIZER(RRM_SCAN_ORD             ),
-  STRINGIZER(RRM_END_SCAN_ORD         ),
-  STRINGIZER(SNS_END_SCAN_CONF        )
-} ;
-
-#endif
-
-
-
-
-
-
-/*!
-*******************************************************************************
-\brief  This function initialize the message header
-\return any return value
-*/
-static void init_sensing_msg_head(
-  msg_head_t    *msg_head , //!< message header to initialize
-  Instance_t     inst     , //!< Instance ID
-  MSG_SENSING_RRM_T  msg_type , //!< type of message to initialize
-  unsigned int   size     , //!< size of message
-  Transaction_t  Trans_id   //!< transaction id associated to this message
-)
-{
-  if ( msg_head != NULL ) {
-    msg_head->start    = START_MSG ;
-    msg_head->msg_type = 0xFF & msg_type ;
-    msg_head->inst     = inst  ;
-    msg_head->Trans_id = Trans_id  ;
-    msg_head->size     = size;
-  }
-}
-
-/*****************************************************************************/
-
-rrc_update_sens_t P_update_sens;
-msg_t * msg_sensing_update_sens(
-  Instance_t      inst         , //!< Instance ID
-  Sens_ch_t *Sens,
-  unsigned char NB_info
-)
-{
-
-  init_sensing_msg_head(&(mesg.head),inst, SNS_UPDATE_SENS, sizeof( rrc_update_sens_t ) ,0);
-  memcpy( &P_update_sens.Sens_meas[0], (rrc_update_sens_t *)Sens, NB_info*sizeof(Sens_ch_t) )  ;
-  P_update_sens.NB_info=NB_info;
-  mesg.data = (char *) &P_update_sens;
-  return &mesg ;
-
-}
-
-/*****************************************************************************/
-
-msg_t * msg_sensing_end_scan_conf(
-  Instance_t      inst          //!< Instance ID
-)
-{
-
-  init_sensing_msg_head(&(mesg.head),inst, SNS_END_SCAN_CONF, 0 ,0);
-
-  mesg.data = NULL;
-  return &mesg ;
-
-}
-
-
-
-
-
-
diff --git a/openair3/MESH/RRM/sensing_form.c b/openair3/MESH/RRM/sensing_form.c
deleted file mode 100644
index ca6a10bb12bf1b8bc35dbee132b1974ef43f943b..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sensing_form.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/* Form definition file generated with fdesign. */
-
-#include "forms.h"
-#include <stdlib.h>
-#include "sensing_form.h"
-
-FD_sensing_form *create_form_sensing_form(void)
-{
-  FL_OBJECT *obj;
-  FD_sensing_form *fdui = (FD_sensing_form *) fl_calloc(1, sizeof(*fdui));
-
-  fdui->sensing_form = fl_bgn_form(FL_NO_BOX, 620, 600);
-  obj = fl_add_box(FL_UP_BOX,0,0,620,600,"");
-  fdui->spec_SN1 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,50,500,100,"spectrum_plot_SN1");
-  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fdui->spec_SN2 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,180,500,100,"spectrum_plot_SN2");
-  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fdui->spec_SN3 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,310,500,100,"spectrum_plot_SN3");
-  fl_set_object_color(obj,FL_BLACK,FL_BLUE);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fdui->Secondary_Network_frequencies = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,460,500,100,"Secondary_Network_frequencies");
-  fl_set_object_color(obj,FL_BLACK,FL_GREEN);
-  fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  fl_end_form();
-
-  fdui->sensing_form->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
diff --git a/openair3/MESH/RRM/sensing_form.fd b/openair3/MESH/RRM/sensing_form.fd
deleted file mode 100644
index a669121a72d0165e1c07821e0c551f688a0a1b07..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sensing_form.fd
+++ /dev/null
@@ -1,106 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: sensing_form
-Width: 620
-Height: 600
-Number of Objects: 5
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 620 600
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 70 20 500 100
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: spectrum_plot_SN1
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: spec_SN1
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 70 150 500 100
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: spectrum_plot_SN2
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: spec_SN2
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: IMPULSE_XYPLOT
-box: 70 280 500 100
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: spectrum_plot_SN3
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: spec_SN3
-callback: 
-argument: 
-
---------------------
-class: FL_XYPLOT
-type: NORMAL_XYPLOT
-box: 70 430 500 110
-boxtype: FL_FLAT_BOX
-colors: FL_BLACK FL_GREEN
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_TINY_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: Secondary_Network_frequencies
-callback: 
-argument: 
-
-==============================
-create_the_forms
diff --git a/openair3/MESH/RRM/sensing_form.h b/openair3/MESH/RRM/sensing_form.h
deleted file mode 100644
index 461d378e62c760b5aa53db29a1582338bef76ae2..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sensing_form.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/** Header file generated with fdesign on Tue Jun  1 11:00:12 2010.**/
-
-#ifndef FD_sensing_form_h_
-#define FD_sensing_form_h_
-
-/** Callbacks, globals and object handlers **/
-
-
-/**** Forms and Objects ****/
-typedef struct {
-  FL_FORM *sensing_form;
-  void *vdata;
-  char *cdata;
-  long  ldata;
-  FL_OBJECT *spec_SN1;
-  FL_OBJECT *spec_SN2;
-  FL_OBJECT *spec_SN3;
-  FL_OBJECT *Secondary_Network_frequencies;
-} FD_sensing_form;
-
-extern FD_sensing_form * create_form_sensing_form(void);
-
-#endif /* FD_sensing_form_h_ */
diff --git a/openair3/MESH/RRM/sensing_rrm_msg.h b/openair3/MESH/RRM/sensing_rrm_msg.h
deleted file mode 100644
index 03acd9ed68bf1815a8603855e9d805fbff91f99b..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/sensing_rrm_msg.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       sensing_msg.h
-
-\brief      Fichier d'entete contenant les declarations des types, des defines ,
-et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI.
-
-Les fonctions servent à créer le buffer de message, remplir
-l'entete et copier les parametres de fonction. Chaque fonction
-retourne le message qui pourra être envoye sur le socket entre le
-CMM et le RRM ou RRCI.
-
-\author     BURLOT Pascal
-
-\date       17/07/08
-
-\par     Historique:
-L.IACOBELLI 2009-10-19
-+ sensing messages
-
-*******************************************************************************
-*/
-
-#ifndef __SENSING_RRM_MSG_H
-#define __SENSING_RRM_MSG_H
-
-
-#ifdef OPENAIR2_IN
-#include "rrm_sock.h"
-#else
-#include "RRC/MESH/rrc_rrm_interface.h"
-#include "RRC/MESH/L3_rrc_defs.h"
-#endif
-//#include "../../../openair2/RRC/MESH/rrc_rrm_interface.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*!
-*******************************************************************************
-\brief  Enumeration des messages entre RRM/RRCI et le RRC
-*/
-typedef enum {
-  SNS_UPDATE_SENS             , ///< Message SENSING->RRM : update of the sensing information measured by the nodes
-  RRM_SCAN_ORD                , ///< Message RRM->SENSING : order to scann indicated channels
-  RRM_END_SCAN_ORD            , ///< Message RRM->SENSING : end of a scanning process in sensors
-  SNS_END_SCAN_CONF           , ///< Message SENSING->RRC : end of a scanning process in sensors
-  NB_MSG_SNS_RRM                ///< Nombre de message RRM-SENSING
-}
-MSG_SENSING_RRM_T ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_scan_ord() dans
-une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-
-  unsigned int        NB_chan                 ; ///< Number of channels to scan if 0 means all channels
-  unsigned int        Meas_tpf                ; ///< time on each carrier           //mod_lor_10_02_19
-  unsigned int        Overlap                 ; ///< overlap factor (percentage)    //mod_lor_10_02_19
-  unsigned int        Sampl_nb                ; ///< number of samples per sub-band //mod_lor_10_04_01
-  Sens_ch_t           ch_to_scan[NB_SENS_MAX] ; ///< Vector of channels to scan     //mod_lor_10_02_19
-} rrm_scan_ord_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de la fonction rrm_end_scan_ord() dans
-une structure permettant le passage des parametres via un socket
-*/
-typedef struct {
-  unsigned int        NB_chan              ; //!< Number of channels
-  unsigned int        channels[NB_SENS_MAX]; //!< Vector of channels
-} rrm_end_scan_ord_t ;
-
-/*!
-*******************************************************************************
-\brief  Definition des parametres de les fonctions rrc_update_sens()
-        rdans une structure permettant le passage
-        des parametres via un socket
-*/
-typedef struct {
-  double              info_time              ; //!< Date of the message
-  L2_ID               L2_id                  ; //!< Layer 2 ID (MAC) of sensing node
-  unsigned int        NB_info                ; //!< number of sensed channels
-  Sens_ch_t           Sens_meas[NB_SENS_MAX] ; //!< sensing information
-} rrc_update_sens_t;
-
-
-msg_t *msg_rrm_scan_ord( Instance_t inst, unsigned int NB_chan, unsigned int Meas_tpf, unsigned int Overlap,
-                         unsigned int Sampl_nb, Sens_ch_t *ch_to_scan, Transaction_t Trans_id );  //mod_lor_10_02_19
-msg_t *msg_rrm_end_scan_ord(Instance_t inst, unsigned int NB_chan, unsigned int *channels,
-                            Transaction_t Trans_id );
-
-#endif /* SENSING_MSG_H */
diff --git a/openair3/MESH/RRM/transact.c b/openair3/MESH/RRM/transact.c
deleted file mode 100644
index a317eb9fc8caa0c8d103f05381acf4b57015767d..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/transact.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       transact.c
-
-\brief      Gestion des transactions entre les différentes entités
-
-\author     BURLOT Pascal
-
-\date       17/07/08
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "debug.h"
-#include "L3_rrc_defs.h"
-#include "rrm_util.h"
-#include "transact.h"
-
-
-//! Selection locale du mode de debug
-#define DBG_TRANSACT 0
-
-#if DBG_TRANSACT==0
-//! Macro inactive
-#define PRINT_TRANSACT(...)
-#else
-//! Macro affichant  la liste de transaction
-#define PRINT_TRANSACT(...) print_transact( __VA_ARGS__ )
-#endif
-
-/*!
-*******************************************************************************
-\brief  La fonction affiche a l'ecran la liste (pour DEBUG )
-
-\return  aucune valeur retournee
-*/
-static void print_transact(
-  transact_t *pEntry  ///< pointeur sur la liste de transaction
-)
-{
-  transact_t *pCurrentItem = pEntry;
-
-  fprintf(stderr,"transact_t=[\n");
-
-  while ( pCurrentItem != NULL) {
-    fprintf(stderr,"  @%p(.id=%u, .interf_id=%u,  .funct_id=%u, .ttl=%u,  .next=%p, .parent_id=%d, .parent_status=%d)\n",
-            pCurrentItem, pCurrentItem->id, pCurrentItem->interf_id,pCurrentItem->funct_id,
-            pCurrentItem->ttl, pCurrentItem->next, pCurrentItem->parent_id, pCurrentItem->parent_status);
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  fprintf(stderr," ]\n");
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction ajoute un element en debut de la liste des transactions
-        non-cloturees.
-
-\return  retourne le pointeur de debut de liste.
-*/
-transact_t *add_item_transact(
-  transact_t   **pEntry   , ///< pointeur sur l'entree sur la liste de transaction
-  Transaction_t  id       , ///< ID de la transaction
-  unsigned int   interf_id, ///< Identification de l'interface de la transaction
-  unsigned int   funct_id , ///< Identification de la function a l'origine de la transaction
-  unsigned int   parent   , ///< Transaction parent
-  unsigned int   status     ///< Status de la transaction
-)
-{
-  transact_t *pOldEntry = *pEntry;
-
-  transact_t *pNewItem = RRM_MALLOC(transact_t , 1 ) ;
-
-  PNULL(pNewItem) ;
-
-  if ( pNewItem == NULL )
-    return NULL ;
-
-  *pEntry             = pNewItem          ;
-  pNewItem->next      = pOldEntry         ;
-  pNewItem->id        = id                ;
-  pNewItem->interf_id = interf_id         ;
-  pNewItem->funct_id  = funct_id          ;
-  pNewItem->parent_id = parent            ;
-  pNewItem->parent_status = status            ;
-  pNewItem->ttl       = TTL_DEFAULT_VALUE ;
-
-  PRINT_TRANSACT( *pEntry );
-  return pNewItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction retire un element de la liste des transactions  non-cloturees.
-
-\return  aucune valeur.
-*/
-void del_item_transact(
-  transact_t    **pEntry , ///< pointeur sur l'entree sur la liste de transaction
-  Transaction_t   id       ///< ID de la transaction a detruire
-)
-{
-  transact_t *pCurrentItem = *pEntry;
-  transact_t *pNextItem    ;
-  transact_t **ppPrevItem  = pEntry ;
-
-  if ( (pCurrentItem == NULL)  || (pEntry==NULL))
-    return ;
-
-  while ( pCurrentItem != NULL ) {
-    pNextItem =  pCurrentItem->next ;
-
-    if ( pCurrentItem->id == id ) {
-      *ppPrevItem = pNextItem;
-      RRM_FREE( pCurrentItem ) ;
-      break ;
-    }
-
-    ppPrevItem   = &(pCurrentItem->next) ;
-    pCurrentItem = pNextItem ;
-  }
-
-  PRINT_TRANSACT( *pEntry );
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction recherche un element dans  la liste des transactions
-        non-cloturees.
-
-\return  la valeur retournee est la transaction trouvee sinon NULL
-*/
-transact_t *get_item_transact(
-  transact_t    *pEntry , ///< pointeur sur l'entree sur la liste de transaction
-  Transaction_t  id       ///< ID de la transaction a rechercher
-)
-{
-  transact_t *pCurrentItem = pEntry;
-
-  while ( (pCurrentItem != NULL) && ( pCurrentItem->id != id )) {
-    pCurrentItem = pCurrentItem->next ;
-  }
-
-  return pCurrentItem ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction rearme la valeur du ttl de la transaction
-
-\return  aucune valeur retournee
-*/
-void set_ttl_transact(
-  transact_t    *pEntry   ,  ///< pointeur sur l'entree sur la liste de transaction
-  Transaction_t  id       ,  ///< ID de la transaction
-  unsigned int   value       ///< valeur du ttl
-)
-{
-  transact_t *transaction = get_item_transact( pEntry , id ) ;
-
-  if ( transaction != NULL )
-    transaction->ttl = value ;
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction decremente les valeurs du ttl de toutes les transactions
-
-\return  aucune valeur retournee
-*/
-void dec_all_ttl_transact(
-  transact_t *pEntry ///< pointeur sur l'entree sur la liste de transaction
-)
-{
-  transact_t *pCurrentItem = pEntry;
-
-  while ( pCurrentItem != NULL) {
-    if (pCurrentItem->ttl !=0 )
-      pCurrentItem->ttl -=1 ;
-
-    pCurrentItem = pCurrentItem->next ;
-  }
-}
-
-/*!
-*******************************************************************************
-\brief  La fonction supprime les transactions dont le ttl est nulle
-
-\return  aucune valeur retournee
-*/
-void del_all_obseleted_transact(
-  transact_t **pEntry ///< pointeur sur l'entree sur la liste de transaction
-)
-{
-  transact_t *pCurrentItem = *pEntry;
-  transact_t *pNextItem ;
-
-  while ( pCurrentItem != NULL) {
-    pNextItem = pCurrentItem->next ;
-
-    if (pCurrentItem->ttl == 0 ) {
-      fprintf(stderr,"Delete obselete Transaction: \n" ) ;
-      print_transact(pCurrentItem) ;
-      del_item_transact( pEntry ,  pCurrentItem->id ) ;
-    }
-
-    pCurrentItem = pNextItem ;
-  }
-}
diff --git a/openair3/MESH/RRM/transact.h b/openair3/MESH/RRM/transact.h
deleted file mode 100644
index 351a7b478d5793f26a87574e6637040fa1e36896..0000000000000000000000000000000000000000
--- a/openair3/MESH/RRM/transact.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!
-*******************************************************************************
-
-\file       transact.h
-
-\brief      Fichier d'entete contenant les declarations de type, des defines ,
-            les fonctions relatifs a la gestion des transactions.
-
-\author     BURLOT Pascal
-
-\date       17/07/08
-
-\par     Historique:
-            $Author$  $Date$  $Revision$
-            $Id$
-            $Log$
-
-*******************************************************************************
-*/
-
-#ifndef TRANSACT_H
-#define TRANSACT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//! Valeur par defaut du TTL de transaction
-#define TTL_DEFAULT_VALUE       20
-
-
-//typedef void (*fct_abort_transaction_t)( void *data) ;
-
-///< \brief Transaction en suspend ( non-traite )
-typedef struct transact_s {
-  unsigned int                    id          ; ///< Transaction ID
-  enum  { INT_RRC=0, ///< Interface avec le RRC
-          INT_CMM,   ///< Interface avec le CMM
-          INT_PUSU   ///< Interface avec le PUSU
-        }                       interf_id   ; ///< interface
-  unsigned int                    funct_id    ; ///< Transaction type
-  unsigned int                    ttl         ; ///< Time to live  of transaction
-  struct transact_s              *next        ; ///< next Transaction to process
-
-  unsigned int                    parent_id   ; ///< Transaction parent id
-  enum  { NO_PARENT=0 ,
-          PARENT
-        }                       parent_status; ///< Transaction parent status
-} transact_t ;
-
-transact_t *add_item_transact(
-  transact_t **pEntry ,
-  unsigned int   id,
-  unsigned int   interf_id,
-  unsigned int   funct_id,
-  unsigned int   parent,
-  unsigned int   status
-);
-void del_item_transact( transact_t **pEntry , unsigned int   id );
-
-transact_t *get_item_transact(
-  transact_t *pEntry ,
-  unsigned int   id
-);
-
-void set_ttl_transact( transact_t *pEntry , Transaction_t   id , unsigned int value );
-void dec_all_ttl_transact( transact_t *pEntry );
-void del_all_obseleted_transact( transact_t **pEntry );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TRANSACT_H */
diff --git a/openair3/MESH/cmm_ral_interface.h b/openair3/MESH/cmm_ral_interface.h
deleted file mode 100644
index 171e5df5b224b4672b2ef1ba842137cf8bea07e7..0000000000000000000000000000000000000000
--- a/openair3/MESH/cmm_ral_interface.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/**  @addtogroup _mesh_layer3_
- @{
- */
-
-
-/**
-  \brief Establish a new classification rule.
-  @returns status indication
-*/
-int cmm_class_setup_req(L3ID_T L3id,           //!< L3 ID type (IPv4 Addr,IPv6 Addr,MPLS Labels)
-                        void *InA,             //!< L3 ID A
-                        void *InB,             //!< L3 ID B
-                        RBID_T Rbid,           //!< L2 RBID
-                        L3QOS_T L3QoS,         //!< L3 QoS type (DSCP,EXP,ICMPV6)
-                        void *QoS_id,          //!< L3 QoS id (DSCP #, EXP #, ICMPv6 message type)
-                        Transaction_t Trans_id  //!< Transaction ID
-                       );
-
-/**
-  \brief Release a classification rule which was previously established.
-  @returns status indication
-*/
-int cmm_class_release_req(L3ID_T L3id,           //!< L3 ID type (IPv4 Addr,IPv6 Addr,MPLS Labels)
-                          void *InA,             //!< L3 ID A
-                          void *InB,             //!< L3 ID B
-                          RBID_T Rbid,           //!< L2 RBID
-                          L3QOS_T L3QoS,         //!< L3 QoS type (DSCP,EXP,ICMPV6)
-                          void *QoS_id,          //!< L3 QoS id (DSCP #, EXP #, ICMPv6 message type)
-                          Transaction_t Trans_id  //!< Transaction ID
-                         );
-
-
-/** @} */
diff --git a/openair3/MESH/cmm_rrm_interface.h b/openair3/MESH/cmm_rrm_interface.h
deleted file mode 100644
index 9e90c16ed61a5f6b2207b5edd8112d754aa9b14b..0000000000000000000000000000000000000000
--- a/openair3/MESH/cmm_rrm_interface.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
-    OpenAirInterface
-    Copyright(c) 1999 - 2014 Eurecom
-
-    OpenAirInterface is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-
-    OpenAirInterface is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenAirInterface.The full GNU General Public License is
-   included in this distribution in the file called "COPYING". If not,
-   see <http://www.gnu.org/licenses/>.
-
-  Contact Information
-  OpenAirInterface Admin: openair_admin@eurecom.fr
-  OpenAirInterface Tech : openair_tech@eurecom.fr
-  OpenAirInterface Dev  : openair4g-devel@eurecom.fr
-
-  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
-
- *******************************************************************************/
-
-/*!  @addtogroup _mesh_layer3_
- @{
- */
-
-/*!
-  \brief  CMM connection setup request.  Only in CH.
-  \return status indication
-*/
-int cmm_cx_setup_req(
-  Instance_t    inst      , //!< Identification de l'instance
-  L2_ID         Src       , //!< L2 source MAC address
-  L2_ID         Dst       , //!< L2 destination MAC address
-  QOS_CLASS_T   QoS_class , //!< QOS class index
-  Transaction_t Trans_id    //!< Transaction ID
-);
-
-/*!
-  \brief RRM connection confirm.  Only in CH. Confirms a cmm_cx_setup_req
-*/
-void rrm_cx_setup_cnf(
-  Instance_t    inst     , //!< Identification de l'instance
-  RB_ID         Rb_id    , //!< L2 Rb_id
-  Transaction_t Trans_id   //!< Transaction ID
-);
-
-/*!
-  \brief  CMM connection modify request.  Only in CH.
-  \return status indication
-*/
-int cmm_cx_modify_req(
-  Instance_t    inst      , //!< Identification de l'instance
-  RB_ID         Rb_id     , //!< L2 Rb_id
-  QOS_CLASS_T   QoS_class , //!< QOS class index
-  Transaction_t Trans_id    //!< Transaction ID
-);
-
-/*!
-  \brief RRM connection modify confirm.  Only in CH. Confirms a cmm_cx_modify_req
-*/
-void rrm_cx_modify_cnf(
-  Instance_t    inst     , //!< Identification de l'instance
-  Transaction_t Trans_id   //!< Transaction ID
-);
-
-/*!
-  \brief CMM connection release request.  Only in CH.
-  \return status indication
-*/
-int cmm_cx_release_req(
-  Instance_t    inst     , //!< Identification de l'instance
-  RB_ID         Rb_id    , //!< L2 Rb_id
-  Transaction_t Trans_id   //!< Transaction ID
-);
-
-/*!
-  \brief RRM connection modify confirm.  Only in CH. Confirms a cmm_cx_modify_req
-*/
-void rrm_cx_release_cnf(
-  Instance_t    inst     , //!< Identification de l'instance
-  Transaction_t Trans_id   //!< Transaction ID
-);
-
-/*!
-  \brief  CMM connection release all resources request.  Only in CH.
-  \return status indication
-*/
-int cmm_cx_release_all_req(
-  Instance_t    inst     , //!< Identification de l'instance
-  L2_ID         L2_id    , //!< L2 Rb_id
-  Transaction_t Trans_id   //!< Transaction ID
-);
-
-/*!
-  \brief RRM connection release all confirm.  Only in CH. Confirms a
-          cmm_cx_release_all_req.
-*/
-void rrm_cx_release_all_cnf(
-  Instance_t    inst     , //!< Identification de l'instance
-  Transaction_t Trans_id   //!< Transaction ID
-);
-
-/*!
-  \brief  L3 Connection attachment request.  Message sent by RRCI in MR after
-           configuration of initial RBs and reception of CH IPAddr.  Here L3_info
-           contains CH IPAddr.  The RBID's of basic IP services are also required.
-  \return status indication
-*/
-int rrci_attach_req(
-  Instance_t     inst      , //!< Identification de l'instance
-  L2_ID          L2_id     , //!< Layer 2 (MAC) ID
-  L3_INFO_T      L3_info_t , //!< Type of L3 Information
-  unsigned char *L3_info   , //!< L3 addressing Information
-  RB_ID          DTCH_B_id , //!< RBID of broadcast IP service (MR only)
-  RB_ID          DTCH_id   , //!< RBID of default IP service (MR only)
-  Transaction_t  Trans_id    //!< Transaction ID
-);
-
-/*!
-  \brief Connection Attachment indication.  Message sent by RRM in CH at
-          completion of attachment phase of a new MR (after configuration
-          MR IPAddr). Here L3_info contains MR IPAddr.
-*/
-void rrm_attach_ind(
-  Instance_t     inst      , //!< Identification de l'instance
-  L2_ID          L2_id     , //!< Layer 2 (MAC) ID
-  L3_INFO_T      L3_info_t , //!< Type of L3 Information
-  unsigned char *L3_info   , //!< L3 addressing Information
-  RB_ID          DTCH_id     //!< RBID of default IP service (MR only)
-);
-
-/*!
-  \brief L3 Connection Attachment confirmation.  Message sent by CMM in MR at
-          completion of L3 attachment phase of a new MR Here L3_info contains
-          MR IPAddr.
-*/
-void cmm_attach_cnf(
-  Instance_t     inst      , //!< Identification de l'instance
-  L2_ID          L2_id     , //!< L2_id of CH ( Mesh Router can see 2 CH )
-  L3_INFO_T      L3_info_t , //!< Type of L3 Information
-  unsigned char *L3_info   , //!< L3 addressing Information
-  Transaction_t  Trans_id    //!< Transaction ID
-);
-
-
-/*!
-  \brief  Message sent by RRM to CMM to indicate attachement at layer 2 of
-           a new MR.
-*/
-void rrm_MR_attach_ind(
-  Instance_t inst  , //!< Identification de l'instance
-  L2_ID      L2_id   //!< MR Layer 2 (MAC) ID
-);
-
-/*!
-  \brief  Message sent by RRM to CMM to indicate that the node function is
-           Cluster head. CMM initializes then the CH configuration.
-*/
-void router_is_CH_ind(
-  Instance_t inst  , //!< Identification de l'instance
-  L2_ID      L2_id   //!< CH Layer 2 (MAC) ID
-);
-
-/*!
-  \brief
-*/
-void rrci_CH_synch_ind(
-  Instance_t inst    //!< Identification de l'instance
-);
-
-/*!
-  \brief
-*/
-void cmm_init_mr_req(
-  Instance_t inst    //!< Identification de l'instance
-);
-
-/*!
-  \brief
-*/
-void rrm_MR_synch_ind(
-  Instance_t inst    //!< Identification de l'instance
-);
-
-/*!
-  \brief
-*/
-void rrm_no_synch_ind(
-  Instance_t inst    //!< Identification de l'instance
-);
-
-/*!
-  \brief
-*/
-void cmm_init_ch_req(
-  Instance_t  inst     ,  //!< Identification de l'instance
-  L3_INFO_T   L3_info_t,
-  void       *L3_info
-);
-
-/*!
-  \brief
-*/
-void cmm_init_sensing(
-  Instance_t       inst,            //!< identification de l'instance
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq
-);
-
-/*!
-  \brief
-*/
-void cmm_stop_sensing(
-  Instance_t inst            //!< identification de l'instance
-);
-
-/*!
-  \brief
-*/
-void cmm_ask_freq(
-  Instance_t inst            //!< identification de l'instance
-);
-
-/*!
-  \brief  add_lor_10_11_03
-*/
-
-void cmm_need_to_tx(
-  Instance_t inst             ,//!< identification de l'instance
-  Instance_t dest             ,//!< identification de l'instance du noeud destinataire
-  QOS_CLASS_T QoS_class        //!< Required quality of service (i.e. number of channels)
-);
-
-/*!
-  \brief  add_lor_10_11_08
-*/
-void cmm_init_coll_sensing(
-  Instance_t       inst,            //!< identification de l'instance
-  unsigned int     Start_fr,
-  unsigned int     Stop_fr,
-  unsigned int     Meas_band,
-  unsigned int     Meas_tpf,
-  unsigned int     Nb_channels,
-  unsigned int     Overlap,
-  unsigned int     Sampl_freq
-);
-/*!
-  \brief  add_lor_10_11_09
-*/
-void cmm_user_disc(
-  Instance_t inst            //!< identification de l'instance
-);
-/*!
-  \brief  add_lor_10_11_09
-*/
-void cmm_link_disc(
-  Instance_t inst           ,//!< identification de l'instance
-  Instance_t dest            //!< identification du destinataire
-);
-/*!
-  \brief  add_lor_10_11_09
-*/
-void disconnect_user(
-  Instance_t    inst     , //!< identification de l'instance
-  L2_ID         L2_id      //!< L2_id of the SU
-);
-/*!
- \brief  add_lor_10_11_09
-*/
-int close_active_link(
-  Instance_t    inst       , //!< identification de l'instance
-  L2_ID         L2_id      , //!< L2_id of the SU
-  L2_ID         L2_id_dest   //!< L2_id of the SU dest
-);
-
-
-
-
-
-/*! @} */
diff --git a/openair3/UTILS/COPYING b/openair3/UTILS/COPYING
deleted file mode 100644
index 94a9ed024d3859793618152ea559a168bbcbb5e2..0000000000000000000000000000000000000000
--- a/openair3/UTILS/COPYING
+++ /dev/null
@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/openair3/UTILS/GPSDRIVE/README.txt b/openair3/UTILS/GPSDRIVE/README.txt
deleted file mode 100644
index 2cdb69918ca125f588aee3250d1c778eee7a2621..0000000000000000000000000000000000000000
--- a/openair3/UTILS/GPSDRIVE/README.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-File: Readme.txt
-Author: Florian Kaltenberger
-Date: 11.2.09
-
-This directory contains configuration files and maps for gpsdrive. gpsdrive displays your position and position of others (which are connected to the friends server) on a map. see man gpsdrive and man friendsd2 for details. 
-
-Copy the maps directory to your ~/.gpsdrive directory or merge it with the existing directory iff you have already created other maps. 
- 
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_27650000_43.847_7.448.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_27650000_43.847_7.448.gif
deleted file mode 100644
index a16cfbd86fd4d9e9b720b392df24ec257c75a51b..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_27650000_43.847_7.448.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.282_1.989.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.282_1.989.gif
deleted file mode 100644
index e62bdfeadf6eb77c3c7e86c38be5a08d64fd6b66..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.282_1.989.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.501_2.111.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.501_2.111.gif
deleted file mode 100644
index 7d6d7d9d6d6937b93df8011ec0d067d0f13962f9..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.501_2.111.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.502_2.113.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.502_2.113.gif
deleted file mode 100644
index 92e037a2319d7babc33bb2019dff7a0bc404edb0..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.502_2.113.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.516_2.087.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.516_2.087.gif
deleted file mode 100644
index 663bd7eb03abdb8f87608a3d74c06c664bd5c162..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.516_2.087.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.735_7.421.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.735_7.421.gif
deleted file mode 100644
index e1b46bbafdf560011a9addf5fffe2cabb8b5c9bf..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.735_7.421.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.883_7.355.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.883_7.355.gif
deleted file mode 100644
index 9f613284ee4dcd6d52e10174325a829fc72e75d0..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.883_7.355.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.912_7.516.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.912_7.516.gif
deleted file mode 100644
index 061596307b34977940b70464e75d7851e91b83b7..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.912_7.516.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.923_7.527.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.923_7.527.gif
deleted file mode 100644
index 9967a44747639d5314d59f12f64405def9f7614d..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.923_7.527.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_47400_41.282_1.989.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_47400_41.282_1.989.gif
deleted file mode 100644
index 7f9e2e7f329e43e66801e20e619eec7662ee29ae..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_47400_41.282_1.989.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_98750_41.516_2.088.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_98750_41.516_2.088.gif
deleted file mode 100644
index 603cea4f28f1d77c11dce4d163f54a0eddbacad1..0000000000000000000000000000000000000000
Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_98750_41.516_2.088.gif and /dev/null differ
diff --git a/openair3/UTILS/GPSDRIVE/maps/map_koord.txt b/openair3/UTILS/GPSDRIVE/maps/map_koord.txt
deleted file mode 100644
index 77203b7a672b0d434948c08aa1c4d1cc3e18d8d4..0000000000000000000000000000000000000000
--- a/openair3/UTILS/GPSDRIVE/maps/map_koord.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-top_Africa.jpg 1.82500 26.57917 24167707
-top_Americas.jpg 4.25000 -91.50000 38529708
-top_AsiaMiddleEast.jpg 34.33333 54.87500 17638272
-top_AsiaEast.jpg 32.78333 139.37500 24646780
-top_Australia.jpg -26.96667 134.12500 10990784
-top_BritishIsles.jpg 54.54167 -4.20833 3135892
-top_Europe.jpg 52.91667 12.41667 11823932
-top_Germany.jpg 51.50833 11.05000 3909032
-top_GPSWORLD.jpg 0.00000 0.00000 88067900
-top_JapanKorea.jpg 38.45833 135.15833 5379458
-top_NewZealand.jpg -40.85000 172.50000 4240306
-top_NorthAmerica.jpg 39.96667 -95.52500 20982408
-top_SouthAmerica.jpg -21.58333 -63.14583 21456356
-top_WorldEast.jpg 12.40000 68.00000 43055416
-expedia/map_98750_41.516_2.088.gif 41.51642 2.08774 98750
-expedia/map_3950_41.516_2.087.gif 41.51642 2.08732 3950
-expedia/map_47400_41.282_1.989.gif 41.28168 1.98933 47400
-expedia/map_3950_41.282_1.989.gif 41.28160 1.98929 3950
-expedia/map_98750_41.516_2.088.gif 41.51600 2.08802 98750
-expedia/map_98750_41.516_2.088.gif 41.51597 2.08801 98750
-expedia/map_3950_41.502_2.113.gif 41.50223 2.11301 3950
-expedia/map_3950_41.501_2.111.gif 41.50111 2.11116 3950
-expedia/map_3950_43.735_7.421.gif 43.73466 7.42114 3950
-expedia/map_3950_43.883_7.355.gif 43.88309 7.35546 3950
-expedia/map_27650000_43.847_7.448.gif 43.84667 7.44823 27650000
-expedia/map_3950_43.912_7.516.gif 43.91186 7.51550 3950
-expedia/map_3950_43.923_7.527.gif 43.92305 7.52726 3950
-expedia/map_3950_43.735_7.421.gif 43.73466 7.42114 3950
-expedia/map_3950_43.735_7.421.gif 43.73466 7.42114 3950
diff --git a/openair3/UTILS/REMSERIAL-1.4.UDP/Makefile b/openair3/UTILS/REMSERIAL-1.4.UDP/Makefile
deleted file mode 100755
index 99eff328901bee61a54189b8f657124ec713a0b7..0000000000000000000000000000000000000000
--- a/openair3/UTILS/REMSERIAL-1.4.UDP/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-all: remserial
-
-REMOBJ=remserial.o stty.o
-remserial: $(REMOBJ)
-	$(CC) $(LDFLAGS) -o remserial $(REMOBJ)
-
-clean:
-	rm -f remserial *.o
diff --git a/openair3/UTILS/REMSERIAL-1.4.UDP/README.txt b/openair3/UTILS/REMSERIAL-1.4.UDP/README.txt
deleted file mode 100755
index a4c0bb1c0cbe183ae8061e3ed1ad126b5b6294d4..0000000000000000000000000000000000000000
--- a/openair3/UTILS/REMSERIAL-1.4.UDP/README.txt
+++ /dev/null
@@ -1,150 +0,0 @@
-Remserial
----------
-
-The remserial program acts as a communications bridge between a TCP/IP
-network port and a Linux device such as a serial port.  Any character-oriented
-Linux /dev device will work.
-
-The program can also use pseudo-ttys as the device.  A pseudo-tty is like
-a serial port in that it has a /dev entry that can be opened by a program
-that expects a serial port device, except that instead of belonging to
-a physical serial device, the data can be intercepted by another program.
-The remserial program uses this to connect a network port to the
-"master" (programming) side of the pseudo-tty allowing the device driver
-(slave) side to be used by some program expecting a serial port.  See example
-3 below for details.
-
-The program can operate as a server accepting network connections from
-other machines, or as a client, connecting to remote machine that
-is running the remserial program or some other program that accepts
-a raw network connection.  The network connection passes data as-is,
-there is no control protocol over the network socket.
-
-Multiple copies of the program can run on the same computer at the same
-time assuming each is using a different network port and device.
-
-Some examples:
-
-1) Give access to a RS232 device over a network.
-
-The computer with the serial port connected to the device (such as a
-data aquisition device) runs the remserial program:
-
-	remserial -d -p 23000 -s "9600 raw" /dev/ttyS0 &
-
-This starts the program in daemon mode so that it runs in the background,
-it waits for connections on port 23000 and sets up the serial port
-/dev/ttyS0 at 9600 baud.  Network connections to port 23000 from any
-machine can then read and write to the device attached to the serial port.
-
-This can be started from /etc/rc.local or as an entry in /etc/inittab
-or set up as a system service with a file in /etc/rc.init/.
-
-2) Connect an RS232 device to a specified server.
-
-The computer with the serial port connected to the device (such as a
-data aquisition device) runs the remserial program:
-
-	remserial -d -r server-name -p 23000 -s "9600 raw" /dev/ttyS0 &
-
-This would be used with case number 1 above creating an end-to-end serial
-port connection.  What goes in the serial port on one machine would come
-out the serial port of the other machine.  The ports could be running at
-different baud rates or other serial port settings.
-
-3) Connect a Linux program that needs a serial port to a remote serial port.
-
-Some programs are written to communicate directly with a serial port such
-as some data aquisition programs.  The remserial program can use
-pseudo-ttys to fool the program into thinking that it is talking to a
-real serial port on the local machine:
-
-	remserial -d -r server-name -p 23000 -l /dev/remserial1 /dev/ptmx &
-
-This creates a file called /dev/remserial1 which can be used by the
-data aquisition application as its serial port.  Any data sent or received
-is passed to the remote server-name on port 23000 where a computer configured
-in case number 1 above passes it to a real serial port.
-
-The remserial program uses the special pseudo-tty master device /dev/ptmx
-(see man ptmx) which creates a slave device that looks like a normal
-serial port named /dev/pts/something.  Unfortunately, the actual device
-name created isn't consistent, so the remserial program creates a symbol
-link from the device name specified with the -l option to the /dev/pts/
-name that was created allowing the other application to be configured
-with a consistent device name.
-
-4) Server farm console control.
-
-Assuming multiple Linux servers (such as web servers) are set up to have a
-serial port as their console instead of a monitor/keyboard, their serial
-ports could be connected to a control server using a multi-port serial board.
-On the control server, a copy of remserial is run for each server:
-
-	remserial -d -p 23000 -s "115200 raw" /dev/ttyS0 &
-	remserial -d -p 23001 -s "115200 raw" /dev/ttyS1 &
-	remserial -d -p 23002 -s "115200 raw" /dev/ttyS2 &
-	remserial -d -p 23003 -s "115200 raw" /dev/ttyS3 &
-	etc.
-
-From any computer on the local network, use a telnet program to connect
-to the control server on the appropriate port:
-
-	telnet control-server-name 23002
-
-This would connect through the associated serial port to the desired server's
-console.  This example would then give the user console access to the 3rd
-server.
-
-Careful scripting such as using the Linux "expect" program could allow
-batches of commands to be run on each server.
-
-Other Linux program useful with remserial
------------------------------------------
-
-- nc - The netcat program is similar to remserial except that it creates
-  connections between network ports and command line standard input and
-  output.
-
-  For example, with case number 1 above, the following command run on
-  another computer will send the contents of the named file out the
-  serial port used by the remserial program:
-
-  nc server-name 23000 <file-name
-
-  Similarily, the following command will store incoming serial data in a file
-  until the program is manually interrupted:
-
-  nc server-name 23000 >file-name
-
-- telnet - The telnet program is normally used to log into a remote computer,
-  but when used with network ports other than number 23, it operates in a
-  raw data mode.
-
-  For example, with case number 1 above, the following command will allow
-  the user of the telnet program to see incoming serial port data and
-  type data on the keyboard to send to the serial port:
-
-  telnet server-name 23000
-
-  This is ideal for controlling the device connected to the serial port
-  if it has some sort of command line interface usable over the serial port.
-
-
-remserial Usage:
----------------
-
-remserial [-r machinename] [-p netport] [-s "stty params"] device
-
--r machinename		The remote machine name to connect to.  If not
-			specified, then this is the server side.
--p netport		Specifiy IP port# (default 23000)
--s "stty params"	If serial port, specify stty parameters, see man stty
--d			Run as daemon programs
--x debuglevel		Set debug level, 0 is default, 1,2 give more info
--l linkname		If the device is /dev/ptmx, creates a symbolic link
-                        to the corresponding slave pseudo-tty so that another
-			application has a static device name to use.
--m max-connections	Maximum number of simultaneous client connections to allow
-device			Character oriented device node such as /dev/ttyS0.
-
diff --git a/openair3/UTILS/REMSERIAL-1.4.UDP/remserial.c b/openair3/UTILS/REMSERIAL-1.4.UDP/remserial.c
deleted file mode 100755
index 413fddeee4ad0eb1e5b1c7ff8bcf6d041d28c310..0000000000000000000000000000000000000000
--- a/openair3/UTILS/REMSERIAL-1.4.UDP/remserial.c
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
-* remserial
-* Copyright (C) 2000  Paul Davis, pdavis@lpccomp.bc.ca
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-*
-* This program acts as a bridge either between a socket(2) and a
-* serial/parallel port or between a socket and a pseudo-tty.
-*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <syslog.h>
-#include <signal.h>
-#include <errno.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-
-struct sockaddr_in addr,remoteaddr;
-int                sockfd            = -1;
-int                server_port       = 23000;
-int                client_port       = 22999;
-int                debug             = 0;
-int                devfd;
-int               *remotefd;
-char              *machinename       = NULL;
-char              *sttyparms         = NULL;
-static char       *sdevname          = NULL;
-char              *linkname          = NULL;
-int                isdaemon          = 0;
-fd_set             fdsread,fdsreaduse;
-struct hostent    *remotehost;
-extern char*       ptsname(int fd);
-int                curConnects       = 0;
-
-void sighandler (int sig);
-int  connect_to (struct sockaddr_in *addr);
-void usage      (char *progname);
-void link_slave (int fd);
-
-int main(int argc, char *argv[])
-{
-  int          result;
-  extern char *optarg;
-  extern int   optind;
-  int          maxfd = -1;
-  char         devbuf[512];
-  int          devbytes;
-  int          remoteaddrlen;
-  int          c;
-  int          waitlogged = 0;
-  int          maxConnects = 1;
-  int          writeonly = 0;
-  register int i;
-
-  while ( (c=getopt(argc,argv,"dl:m:p:r:s:wx:")) != EOF )
-    switch (c) {
-    case 'd':
-      isdaemon = 1;
-      break;
-
-    case 'l':
-      linkname = optarg;
-      break;
-
-    case 'x':
-      debug = atoi(optarg);
-      break;
-
-    case 'm':
-      maxConnects = atoi(optarg);
-      break;
-
-    case 'p':
-      server_port = atoi(optarg);
-      break;
-
-    case 'r':
-      machinename = optarg;
-      break;
-
-    case 's':
-      sttyparms = optarg;
-      break;
-
-    case 'w':
-      writeonly = 1;
-      break;
-
-    case '?':
-      usage(argv[0]);
-      exit(1);
-    }
-
-  sdevname = argv[optind];
-  remotefd = (int *) malloc (maxConnects * sizeof(int));
-
-  // struct group *getgrgid(gid_t gid);
-
-  printf("sdevname=%s,server_port=%d,stty=%s\n",sdevname,server_port,sttyparms);
-
-  openlog("remserial", LOG_PID, LOG_USER);
-
-  if (writeonly)
-    devfd = open(sdevname,O_WRONLY);
-  else
-    devfd = open(sdevname,O_RDWR);
-
-  if ( devfd == -1 ) {
-    syslog(LOG_ERR, "Open of %s failed: %m",sdevname);
-    printf("Open of %s failed: %m",sdevname);
-    exit(1);
-  }
-
-  if (linkname)
-    link_slave(devfd);
-
-  if ( sttyparms ) {
-    set_tty(devfd,sttyparms);
-  }
-
-  signal(SIGINT,sighandler);
-  signal(SIGHUP,sighandler);
-  signal(SIGTERM,sighandler);
-
-  if ( machinename ) {
-    //-----------------------------------------------------------------
-    // We are the client, Find the IP address for the remote machine
-    //-----------------------------------------------------------------
-
-    remotehost = gethostbyname(machinename);
-
-    if ( !remotehost ) {
-      syslog(LOG_ERR, "Couldn't determine address of %s", machinename );
-      exit(1);
-    }
-
-    /* Copy it into the addr structure */
-    addr.sin_family = AF_INET;
-    addr.sin_addr.s_addr = 0;
-
-    //memcpy(&(addr.sin_addr),remotehost->h_addr_list[0], sizeof(struct in_addr));
-    //addr.sin_port = htons(server_port);
-    addr.sin_port = htons(0);
-
-    remotefd[curConnects] = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
-
-    if ( remotefd[curConnects] == -1 ) {
-      syslog(LOG_ERR, "Can't open socket: %m");
-      exit(1);
-    }
-
-
-    /* Set up to listen on the given port */
-    if( bind( remotefd[curConnects], (struct sockaddr*)(&addr), sizeof(struct sockaddr_in)) < 0 ) {
-      syslog(LOG_ERR, "Couldn't bind port %d, aborting: %m",client_port );
-      exit(1);
-    }
-
-
-    addr.sin_family = AF_INET;
-    memcpy(&(addr.sin_addr),remotehost->h_addr_list[0], sizeof(struct in_addr));
-    addr.sin_port = htons(server_port);
-
-    if (connect(remotefd[curConnects], (struct sockaddr*)(&addr), sizeof(struct sockaddr_in)) < 0 ) {
-      syslog(LOG_ERR, "Couldn't connect client socket to server socket, aborting: %m");
-      exit(1);
-    }
-
-    if ( debug>1 )
-      syslog(LOG_NOTICE,"Connected to remote UDP socket");
-
-    curConnects += 1;
-  } else {
-    //-------------------------------
-    // We are the server
-    //-------------------------------
-
-    /* Open the initial socket for communications */
-    sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
-
-    if ( sockfd == -1 ) {
-      syslog(LOG_ERR, "Can't open socket: %m");
-      exit(1);
-    }
-
-    addr.sin_family = AF_INET;
-    addr.sin_addr.s_addr = 0;
-    addr.sin_port = htons(server_port);
-
-    /* Set up to listen on the given port */
-    if( bind( sockfd, (struct sockaddr*)(&addr),
-              sizeof(struct sockaddr_in)) < 0 ) {
-      syslog(LOG_ERR, "Couldn't bind port %d, aborting: %m",server_port );
-      exit(1);
-    }
-
-    if ( debug>1 )
-      syslog(LOG_NOTICE,"Bound port");
-  }
-
-
-  if ( isdaemon ) {
-    setsid();
-    close(0);
-    close(1);
-    close(2);
-  }
-
-  /* Set up the files/sockets for the select() call */
-  if ( sockfd != -1 ) {
-    FD_SET(sockfd,&fdsread);
-
-    if ( sockfd >= maxfd )
-      maxfd = sockfd + 1;
-  }
-
-  for (i=0 ; i<curConnects ; i++) {
-    FD_SET(remotefd[i],&fdsread);
-
-    if ( remotefd[i] >= maxfd )
-      maxfd = remotefd[i] + 1;
-  }
-
-  if (!writeonly) {
-    FD_SET(devfd,&fdsread);
-
-    if ( devfd >= maxfd )
-      maxfd = devfd + 1;
-  }
-
-  while (1) {
-
-    /* Wait for data from the listening socket, the device
-    or the remote connection */
-    fdsreaduse = fdsread;
-
-    if ( select(maxfd,&fdsreaduse,NULL,NULL,NULL) == -1 )
-      break;
-
-    /* Activity on the controlling socket, only on server */
-    if ( !machinename && FD_ISSET(sockfd,&fdsreaduse) ) {
-      remoteaddrlen = sizeof(struct sockaddr_in);
-      devbytes = recvfrom(sockfd, devbuf, 512, 0, (struct sockaddr *) &remoteaddr, &remoteaddrlen);
-
-
-      //if ( debug>1 && devbytes>0 )
-      if (debug>1) {
-        syslog(LOG_INFO,"Remote: %d bytes",devbytes);
-      }
-
-      printf("Socket Remote read: %d bytes\n",devbytes);
-
-      if ( devbytes == 0 ) {
-      } else if ( devfd != -1 ) {
-        if (connect(sockfd, (struct sockaddr*)(&remoteaddr), remoteaddrlen) < 0 ) {
-          syslog(LOG_ERR, "Couldn't connect server socket to client socket, aborting: %m");
-          exit(1);
-        }
-
-        // socket read/write
-        //remotefd[curConnects] = sockfd;
-
-        /* Write the data to the device */
-        result = write(devfd,devbuf,devbytes);
-
-        if (result < 0) {
-          printf("write(%d,devbuf,%d):%s", devfd, devbytes,strerror(result));
-        } else {
-          printf("Write to device returned %d", result);
-        }
-
-        fflush(NULL);
-      }
-    }
-
-    /* Data to read from the device */
-    if ( FD_ISSET(devfd,&fdsreaduse) ) {
-      devbytes = read(devfd,devbuf,512);
-
-      //if ( debug>1 && devbytes>0 )
-      if (debug>1) {
-        syslog(LOG_INFO,"Device: %d bytes",devbytes);
-      }
-
-      printf("Device: %d bytes", devbytes);
-
-      if ( devbytes <= 0 ) {
-        if ( debug>0 ) {
-          syslog(LOG_INFO,"%s closed",sdevname);
-          printf("%s closed",sdevname);
-        }
-
-        close(devfd);
-        FD_CLR(devfd,&fdsread);
-
-        while (1) {
-          devfd = open(sdevname,O_RDWR);
-
-          if ( devfd != -1 )
-            break;
-
-          syslog(LOG_ERR, "Open of %s failed: %m", sdevname);
-
-          if ( errno != EIO )
-            exit(1);
-
-          sleep(1);
-        }
-
-        if ( debug>0 )
-          syslog(LOG_INFO,"%s re-opened",sdevname);
-
-        if ( sttyparms )
-          set_tty(devfd,sttyparms);
-
-        if (linkname)
-          link_slave(devfd);
-
-        FD_SET(devfd,&fdsread);
-
-        if ( devfd >= maxfd )
-          maxfd = devfd + 1;
-      } else {
-        for (i=0 ; i<curConnects ; i++) {
-          result = write(remotefd[i],devbuf,devbytes);
-
-          if (result < 0) {
-            printf("write(remotefd[%d]=%d,devbuf,%d):%s", i, remotefd[i], devbytes, strerror(result));
-          } else {
-            printf("Write to remotefd[%d]=%d returned %d", i, remotefd[i], result);
-          }
-
-          fflush(NULL);
-        }
-
-        if ( !machinename) {
-          result = write(sockfd, devbuf,devbytes);
-
-          if (result < 0) {
-            printf("write(sockfd=%d,devbuf,%d):%s", sockfd, devbytes, strerror(result));
-          } else {
-            printf("Write to sockfd=%d returned %d", sockfd, result);
-          }
-
-          fflush(NULL);
-        }
-      }
-    }
-
-    /* Data to read from the remote system */
-    for (i=0 ; i<curConnects ; i++)
-      if (FD_ISSET(remotefd[i],&fdsreaduse) ) {
-
-        devbytes = read(remotefd[i],devbuf,512);
-
-        //if ( debug>1 && devbytes>0 )
-        if (debug>1) {
-          syslog(LOG_INFO,"Remote: %d bytes",devbytes);
-        }
-
-        printf("Remote: %d bytes",devbytes);
-
-        if ( devbytes == 0 ) {
-          /*register int j;
-
-          syslog(LOG_NOTICE,"Connection closed");
-          printf("Connection closed");
-          close(remotefd[i]);
-          FD_CLR(remotefd[i],&fdsread);
-          curConnects--;
-          for (j=i ; j<curConnects ; j++)
-              remotefd[j] = remotefd[j+1];
-          if ( machinename ) {
-              // Wait for the server again
-              remotefd[curConnects++] = connect_to(&addr);
-              FD_SET(remotefd[curConnects-1],&fdsread);
-              if ( remotefd[curConnects-1] >= maxfd )
-                  maxfd = remotefd[curConnects-1] + 1;
-          }*/
-        } else if ( devfd != -1 ) {
-          /* Write the data to the device */
-          result = write(devfd,devbuf,devbytes);
-
-          if (result < 0) {
-            printf("write(devfd=%d,devbuf,%d):%s", devfd, devbytes, strerror(result));
-          } else {
-            printf("Write to devfd=%d returned %d", devfd, result);
-          }
-
-          fflush(NULL);
-        }
-      }
-  }
-
-  close(sockfd);
-
-  for (i=0 ; i<curConnects ; i++)
-    close(remotefd[i]);
-
-  printf("End of program, normal exit\n");
-}
-
-void sighandler(int sig)
-{
-  int i;
-
-  if ( sockfd != -1 )
-    close(sockfd);
-
-  for (i=0 ; i<curConnects ; i++)
-    close(remotefd[i]);
-
-  if ( devfd != -1 )
-    close(devfd);
-
-  if (linkname)
-    unlink(linkname);
-
-  syslog(LOG_ERR,"Terminating on signal %d",sig);
-  exit(0);
-}
-
-void link_slave(int fd)
-{
-  char *slavename;
-  int status = grantpt(devfd);
-
-  if (status != -1)
-    status = unlockpt(devfd);
-
-  if (status != -1) {
-    slavename = ptsname(devfd);
-
-    if (slavename) {
-      // Safety first
-      unlink(linkname);
-      status = symlink(slavename, linkname);
-    } else
-      status = -1;
-  }
-
-  if (status == -1) {
-    syslog(LOG_ERR, "Cannot create link for pseudo-tty: %m");
-    printf("Cannot create link for pseudo-tty: %m");
-    exit(1);
-  }
-}
-
-int
-connect_to(struct sockaddr_in *addr)
-{
-  int waitlogged = 0;
-  int stat;
-  extern int errno;
-  int sockfd;
-
-  if ( debug>0 ) {
-    unsigned long ip = ntohl(addr->sin_addr.s_addr);
-    syslog(LOG_NOTICE, "Trying to connect to %d.%d.%d.%d",
-           (int)(ip>>24)&0xff,
-           (int)(ip>>16)&0xff,
-           (int)(ip>>8)&0xff,
-           (int)(ip>>0)&0xff);
-  }
-
-  while (1) {
-    /* Open the socket for communications */
-    sockfd = socket(AF_INET, SOCK_STREAM, 6);
-
-    if ( sockfd == -1 ) {
-      syslog(LOG_ERR, "Can't open socket: %m");
-      exit(1);
-    }
-
-    /* Try to connect to the remote server,
-    if it fails, keep trying */
-
-    stat = connect(sockfd, (struct sockaddr*)addr,
-                   sizeof(struct sockaddr_in));
-
-    if ( debug>1 )
-      if (stat == -1)
-        syslog(LOG_NOTICE, "Connect status %d, errno %d: %m\n", stat,errno);
-      else
-        syslog(LOG_NOTICE, "Connect status %d\n", stat);
-
-    if ( stat == 0 )
-      break;
-
-    /* Write a message to syslog once */
-    if ( ! waitlogged ) {
-      syslog(LOG_NOTICE, "Waiting for server on %s port %d: %m", machinename,server_port );
-      waitlogged = 1;
-    }
-
-    close(sockfd);
-    sleep(10);
-  }
-
-  if ( waitlogged || debug>0 )
-    syslog(LOG_NOTICE, "Connected to server %s port %d", machinename,server_port );
-
-  return sockfd;
-}
-
-void usage(char *progname)
-{
-  printf("Remserial version 1.3.  Usage:\n");
-  printf("remserial [-r machinename] [-p netport] [-s \"stty params\"] [-m maxconnect] device\n\n");
-
-  printf("-r machinename		The remote machine name to connect to.  If not\n");
-  printf("			specified, then this is the server side.\n");
-  printf("-p netport		Specifiy IP port# (default 23000)\n");
-  printf("-s \"stty params\"	If serial port, specify stty parameters, see man stty\n");
-  printf("-m max-connections	Maximum number of simultaneous client connections to allow\n");
-  printf("-d			Run as a daemon program\n");
-  printf("-x debuglevel		Set debug level, 0 is default, 1,2 give more info\n");
-  printf("-l linkname		If the device name is a pseudo-tty, create a link to the slave\n");
-  printf("-w          		Only write to the device, no reading\n");
-  printf("device			I/O device, either serial port or pseudo-tty master\n");
-}
diff --git a/openair3/UTILS/REMSERIAL-1.4.UDP/stty.c b/openair3/UTILS/REMSERIAL-1.4.UDP/stty.c
deleted file mode 100755
index f7953be063016899b50d66d423ee3468f64c18dc..0000000000000000000000000000000000000000
--- a/openair3/UTILS/REMSERIAL-1.4.UDP/stty.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * remserial
- * Copyright (C) 2000  Paul Davis, pdavis@lpccomp.bc.ca
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <stdlib.h>
-#include <termios.h>
-#include <unistd.h>
-#include <string.h>
-
-#define CFLG  0
-#define IFLG  1
-#define OFLG  2
-#define LFLG  3
-#define RFLG  4
-#define BFLG  5
-
-extern int errno;
-
-static struct sttyset {
-  char *name;
-  int which;
-  int mask;
-  int value;
-} sttynames[] = {
-  { "0",    BFLG, 0,    B0  },
-  { "50",   BFLG, 0,    B50 },
-  { "75",   BFLG, 0,    B75 },
-  { "110",  BFLG, 0,    B110  },
-  { "134",  BFLG, 0,    B134  },
-  { "150",  BFLG, 0,    B150  },
-  { "200",  BFLG, 0,    B200  },
-  { "300",  BFLG, 0,    B300  },
-  { "600",  BFLG, 0,    B600  },
-  { "1200", BFLG, 0,    B1200 },
-  { "1800", BFLG, 0,    B1800 },
-  { "2400", BFLG, 0,    B2400 },
-  { "4800", BFLG, 0,    B4800 },
-  { "9600", BFLG, 0,    B9600 },
-  { "19200",  BFLG, 0,    B19200  },
-  { "38400",  BFLG, 0,    B38400  },
-#ifdef B57600
-  { "57600",  BFLG, 0,    B57600  },
-#endif
-#ifdef B115200
-  { "115200", BFLG, 0,    B115200 },
-#endif
-#ifdef B230400
-  { "230400", BFLG, 0,    B230400 },
-#endif
-  { "cs7",  CFLG, CSIZE,    CS7 },
-  { "cs8",  CFLG, CSIZE,    CS8 },
-  { "cstopb", CFLG, CSTOPB,   CSTOPB  },
-  { "cread",  CFLG, CREAD,    CREAD },
-  { "parenb", CFLG, PARENB,   PARENB  },
-  { "parodd", CFLG, PARODD,   PARODD  },
-  { "hubcl",  CFLG, HUPCL,    HUPCL },
-  { "clocal", CFLG, CLOCAL,   CLOCAL  },
-#ifdef CRTSCTS
-  { "crtscts",  CFLG, CRTSCTS,  CRTSCTS },
-#endif
-#ifdef ORTSFL
-  { "ortsfl", CFLG, ORTSFL,   ORTSFL  },
-#endif
-#ifdef CTSFLOW
-  { "ctsflow",  CFLG, CTSFLOW,  CTSFLOW },
-#endif
-#ifdef RTSFLOW
-  { "rtsflow",  CFLG, RTSFLOW,  RTSFLOW },
-#endif
-  { "ignbrk", IFLG, IGNBRK,   IGNBRK  },
-  { "brkint", IFLG, BRKINT,   BRKINT  },
-  { "ignpar", IFLG, IGNPAR,   IGNPAR  },
-  { "parmrk", IFLG, PARMRK,   PARMRK  },
-  { "inpck",  IFLG, INPCK,    INPCK },
-  { "istrip", IFLG, ISTRIP,   ISTRIP  },
-  { "inlcr",  IFLG, INLCR,    INLCR },
-  { "igncr",  IFLG, IGNCR,    IGNCR },
-  { "icrnl",  IFLG, ICRNL,    ICRNL },
-#ifdef IUCLC  // Missing on OSX, FreeBSD
-  { "iuclc",  IFLG, IUCLC,    IUCLC },
-#endif
-  { "ixon", IFLG, IXON,   IXON  },
-  { "ixany",  IFLG, IXANY,    IXANY },
-  { "ixoff",  IFLG, IXOFF,    IXOFF },
-#ifdef IMAXBEL
-  { "imaxbel",  IFLG, IMAXBEL,  IMAXBEL },
-#endif
-  { "opost",  OFLG, OPOST,    OPOST },
-#ifdef ILCUC  // Missing on OSX, FreeBSD
-  { "olcuc",  OFLG, OLCUC,    OLCUC },
-#endif
-  { "onlcr",  OFLG, ONLCR,    ONLCR },
-  { "ocrnl",  OFLG, OCRNL,    OCRNL },
-  { "onocr",  OFLG, ONOCR,    ONOCR },
-  { "onlret", OFLG, ONLRET,   ONLRET  },
-  { "ofil", OFLG, OFILL,    OFILL },
-  { "ofdel",  OFLG, OFDEL,    OFDEL },
-  { "nl0",  OFLG, NLDLY,    NL0 },
-  { "nl1",  OFLG, NLDLY,    NL1 },
-  { "cr0",  OFLG, CRDLY,    CR0 },
-  { "cr1",  OFLG, CRDLY,    CR1 },
-  { "cr2",  OFLG, CRDLY,    CR2 },
-  { "cr3",  OFLG, CRDLY,    CR3 },
-  { "tab0", OFLG, TABDLY,   TAB0  },
-  { "tab1", OFLG, TABDLY,   TAB1  },
-  { "tab2", OFLG, TABDLY,   TAB2  },
-  { "tab3", OFLG, TABDLY,   TAB3  },
-  { "bs0",  OFLG, BSDLY,    BS0 },
-  { "bs1",  OFLG, BSDLY,    BS1 },
-  { "vt0",  OFLG, VTDLY,    VT0 },
-  { "vt1",  OFLG, VTDLY,    VT1 },
-  { "ff0",  OFLG, FFDLY,    FF0 },
-  { "ff1",  OFLG, FFDLY,    FF1 },
-  { "isig", LFLG, ISIG,   ISIG  },
-  { "icanon", LFLG, ICANON,   ICANON  },
-#ifdef XCASE  // Missing on OSX, FreeBSD
-  { "xcase",  LFLG, XCASE,    XCASE },
-#endif
-  { "echo", LFLG, ECHO,   ECHO  },
-  { "echoe",  LFLG, ECHOE,    ECHOE },
-  { "echok",  LFLG, ECHOK,    ECHOK },
-  { "echonl", LFLG, ECHONL,   ECHONL  },
-  { "noflsh", LFLG, NOFLSH,   NOFLSH  },
-  { "tostop", LFLG, TOSTOP,   TOSTOP  },
-#ifdef ECHOCTL
-  { "echoctl",  LFLG, ECHOCTL,  ECHOCTL },
-#endif
-#ifdef ECHOPRT
-  { "echoprt",  LFLG, ECHOPRT,  ECHOPRT },
-#endif
-#ifdef ECHOKE
-  { "echoke", LFLG, ECHOKE,   ECHOKE  },
-#endif
-#ifdef FLUSHO
-  { "flusho", LFLG, FLUSHO,   FLUSHO  },
-#endif
-#ifdef PENDIN
-  { "pendin", LFLG, PENDIN,   PENDIN  },
-#endif
-  { "iexten", LFLG, IEXTEN,   IEXTEN  },
-#ifdef TOSTOP
-  { "tostop", LFLG, TOSTOP,   TOSTOP  },
-#endif
-  { "raw",  RFLG, 0,    0 },
-  { NULL,   0,  0,    0 }
-};
-
-static void
-set_this_tty(struct termios *term,struct sttyset *p,int turnon)
-{
-  /*
-  pdebug(5,"set_this_tty: setting %s on? %d\n",p->name,turnon);
-  */
-  switch ( p->which ) {
-  case CFLG:
-    term->c_cflag &= ~(p->mask);
-
-    if ( turnon )
-      term->c_cflag |= p->value;
-
-    break;
-
-  case IFLG:
-    term->c_iflag &= ~(p->mask);
-
-    if ( turnon )
-      term->c_iflag |= p->value;
-
-    break;
-
-  case OFLG:
-    term->c_oflag &= ~(p->mask);
-
-    if ( turnon )
-      term->c_oflag |= p->value;
-
-    break;
-
-  case LFLG:
-    term->c_lflag &= ~(p->mask);
-
-    if ( turnon )
-      term->c_lflag |= p->value;
-
-    break;
-
-  case RFLG:
-    term->c_iflag = 0;
-    term->c_oflag = 0;
-    term->c_lflag = 0;
-    term->c_cc[VMIN] = 1;
-    term->c_cc[VTIME] = 0;
-    break;
-
-  case BFLG:
-    cfsetispeed(term, p->value);
-    cfsetospeed(term, p->value);
-    break;
-  }
-}
-
-int
-set_tty(int fd,char *settings)
-{
-  register char *p;
-  register char *s;
-  struct termios term;
-  register int i;
-  int mode;
-
-  /*
-  pdebug(4,"set_tty: fd %d settings %s\n",fd,settings);
-  */
-  if ( tcgetattr(fd,&term) == -1 ) {
-    /*
-    pdebug(4,"set_tty: cannot get settings for fd %d, error %d\n",
-      fd,errno);
-    */
-    return -1;
-  }
-
-  s = strdup(settings);
-  p = strtok(s," \t\n");
-
-  while (p) {
-    mode = 1;
-
-    if ( *p == '-' ) {
-      mode = 0;
-      p++;
-    }
-
-    for ( i=0 ; sttynames[i].name ; i++ ) {
-      if ( !strcmp(p,sttynames[i].name) ) {
-        set_this_tty(&term,&sttynames[i],mode);
-        break;
-      }
-    }
-
-    p = strtok(NULL," \t\n");
-  }
-
-  free(s);
-
-  if ( tcsetattr(fd,TCSANOW,&term) == -1 ) {
-    /*
-    pdebug(4,"set_tty: cannot get settings for fd %d error %d\n",
-      fd,errno);
-    */
-    return -1;
-  } else
-    return 0;
-}
diff --git a/openair3/history.txt b/openair3/history.txt
deleted file mode 100644
index b3523124feae133b56941fd9c88030a5c70e2b1d..0000000000000000000000000000000000000000
--- a/openair3/history.txt
+++ /dev/null
@@ -1,7 +0,0 @@
--------------------------
-11 Jun: 
-Description: 1st Importation. Forgive me if I make some error :-P
-Features: (released on 5 may 2008) 
-	PMIPv6 + IPv6-in-IPv6 + IPv6-Movement Detection
-	Configuration files (radvd for MR1 & MR2 only)
-	
\ No newline at end of file