text:
Orla Tinsley
FEBURARY CREATIVE WRIITNG WORKSHOP
JANUARY CREATIVE WRITING WORKSHOP
WINTER SOLSTICE: WRITING THE BODY
BIO, WRITING LESSONS AND CREATIVE SOLUTIONS :
Orla Tinsley is an award winning writer, educator, editor and multimedia artist based in New York. She began writing about injustice around healthcare access at the age of 18 and immediately created a national impact with her writing in The Irish Times and interviews on key current affairs programs. She published her first book of Creative Nonfiction at the age of 24 and it became an instant best-seller.
WRITING LESSONS AND CONSULTANCY:
Orla is deeply passionate about access to education and healthcare and believes in the importance of the development of the voice and the right a person has to use the tools of Creative Writing to communicate their passions, ideas and dreams for the future. Since 2006 Orla has worked as a Creative Arts Facilitator and more recently she began working as a Creative Writing Instructor at Columbia University
For WRITING LESSONS or CREATIVE SOLUTIONS scroll down to the contact page or email:
INFO@ORLATINSLEY.COM
"I believe in that the power of the individual and collective voice can change our worlds. I want everyone to feel confident in expressing their ideas and dreams through writing and creative expression. All age groups are welcome and affordable rates are available.
Classes previously taught include : Poetry, The Short Story, Fiction Fundamentals, Introduction to Journalism, Essential Journalism Tools, Creative Writing 101, Pre-college Creative Writing, Beginners, Intermediate and Advanced Creative Writing Workshop.
Creative Consultancy includes evaluation of the strengths and weakness of the text and the idea. We will work on creating clarity of purpose and clean, crisp accessible copy."
*Private Lessons are available
*Group classes are available
*English Junior Certificate grinds and Leaving Certificate grinds available at affordable rates.
Selected Awards Include:
Young Medical Journalist of the Year Tatler Magazine's Woman of the Year
The Bar of Ireland Award for Human Rights Activism 2018
The American Ireland Funds "Spirit of Ireland Award" 2019
Most recently she was awarded the President's Medal from The PR Association of Ireland for her work on organ donation awareness. In 2020 she graduated with an MFA from Columbia University where in her final year, her creative non-fiction narrative documentary, Warrior was nominated for a New York Film and TV Award.
©2020 by orlatinsley. Proudly created with Wix.com


text:
Milo Ventimiglia
TV 09/07/2018 at 4:42 PM
The 'This Is Us' Season 3 Preview Goes Back to Jack and Rebecca Pearson's First Date
If there's anything guaranteed from season 3 of This Is Us, it's that more tears will flow as viewers witness the unraveling of the complex storylines of the characters featured on NBC's beloved family drama….
Kate Pearson Slipped "Something Old" From Dad Jack in Her Wedding Bouquet on 'This Is Us'
Kate Pearson included more than one tribute to her late father, Jack Pearson, when she walked down the aisle in the season finale of This Is Us on Tuesday, March 13. Chrissy Metz, who portrays…
Celebrity, TV 09/25/2017 at 11:00 AM
Mandy Moore's 'This Is Us' Husband Milo Ventimiglia Reacts to Her Engagement
There's so much love here. Mandy Moore recently got engaged to boyfriend Taylor Goldsmith, and among the first batch of people she alerted was her This Is Us family. Of course that included Moore's TV husband…
Exclusive, TV 05/05/2017 at 1:56 PM
Wedding Photographer Flawlessly Recreates Jack and Rebecca's 'This Is Us' Nuptials With a Real Couple
On-screen couple goals. Like countless This Is Us viewers, Maryland-based wedding photographer Karen Rainier was so inspired by Jack and Rebecca Pearson's relationship, that she decided to recreate their City Hall ceremony—and the result was nothing short…
TV 03/16/2017 at 11:00 AM
Mandy Moore Praises 'This Is Us' Husband Milo Ventimiglia Following the Season Finale
Focus on what matters. Actress Mandy Moore responded to critics demanding answers about the fate of Milo Ventimiglia's character on This Is Us following this week's season finale. The final episode of NBC's lauded drama…
Celebrity, TV 02/22/2017 at 12:00 PM
Mandy Moore Was Inspired By Her 'This Is Us' Wedding Dress: "I Feel Like I Have to Do This in Real Life"
Rebecca and Jack Pearson's This Is Us wedding was the event of the season, and as it turns out, the emotional episode left a lasting impression on Mandy Moore, who plays the bride on the…
'This Is Us' Will Feature Jack and Rebecca's Wedding: See the First Photos!
This is fantastic. The latest episode of NBC's smash, new drama This Is Us features Jack and Rebecca's wedding, and the photos are wonderfully nostalgic. The emotional series, which oscillates back and forth between decades, will highlight the…
Celebrity, TV 01/08/2017 at 8:30 PM
This Is Us' Milo Ventimiglia Says TV Wife Mandy Moore Is His "Best" On-Screen Kiss
This is everything. This Is Us star Milo Ventimiglia hit the red carpet of the 74th annual Golden Globe Awards on Sunday, January 8, and spilled a few things about smooching his on-screen wife Mandy…
Mandy Moore's TV Husband Milo Ventimiglia Informed Her of 'This Is Us' Golden Globes Nomination
This is her time to shine. Mandy Moore learned that she was nominated for a 2017 Golden Globe from her This Is Us co-star and on-screen husband, Milo Ventimiglia. Moore was up early on Monday, December 12—West…

redpajama_set_name: RedPajamaCommonCrawl


text:
Warren on Fury-Joshua: In Future, Everyone Should Keep Mouths Shut Until It's Signed
By BoxingScene Staff
Published Thu Jun 03, 2021, 11:15 PM EDT
Frank Warren, co-promoter for WBC heavyweight champion Tyson Fury, is taking no blame for the issues with finalizing a high stakes unification with IBF, IBO, WBA, WBO champion Anthony Joshua.
Last month. the fight was nearing an agreement for August 14 in Saudi Arabia.
However, an arbitrator ordered Fury to honor a rematch clause that was due to Deontay Wilder.
The contractual clause stems from their encounter in February 2020, when Fury stopped Wilder in seven rounds to capture the WBC title.
Their third fight is now set for July 24 in Las Vegas.
John Fury, father of Tyson, recently conducted an interview with BT Sport - where he blamed his son's promoters, Warren and Bob Arum of Top Rank, for failing to finalize the deal with Joshua.
But, both sides were well aware that Wilder had an active legal action to enforce the rematch clause.
Warren explains that everyone should have stayed quiet - and strongly felt that Joshua's promoter, Eddie Hearn of Matchroom, had a breached a confidentiality agreement by discussing the negotiations on a weekly basis.
If everyone had stayed quiet, says Warren, there would not have been such a strong backlash when Fury-Joshua fell apart.
"I don't accept any blame at all. So don't come dumping anything on my doorstep. Everyone's frustrated, but I'm sick to death of talking about the same bullsh-t all the time," Warren told IFL TV.
"[In future] just keep your mouth shut until something is signed. With a fight of this magnitude, until it's signed and all the obstacles are cleared, why make statements about it?"
Frank Warren
Fury vs. Joshua


CI installed in http://localhost:8888/SiteWDC_WP/codeigniter with the controller "Activeprojects".
1. I installed your plugin (thanks) and went to WP->Settings/WordPressIgniter. In "Page override" I put "activeprojects" and in "CodeIgniter Path" I put "codeigniter" and saved.
2. I was expecting to access http://localhost:8888/SiteWDC_WP/activeprojects/ and see the result of my CI controller "Activeprojects", but I just saw my WP initial page. Looking at the other topic, I discovered that putting "http://localhost:8888/SiteWDC_WP/codeigniter/activeprojects/" I was able to see my CI page, but even when I checked the "CodeIgniter grabs all SEO urls" option I still couldn't achieve my goal (mysite/mycontroller).
3. After I tried changing the "CodeIgniter Path" to "http://localhost:8888/SiteWDC_WP/codeigniter" and nothing changed.
Arthur, I think there's an issue with the SiteWDC_WP segment in the url. CodeIgniter, I believe, is expecting to find a controller named SiteWDC_WP.php as that is the first "segment".
I recommend getting the latest (v1.3 as of this writing) plugin version, and using the [wordpressigniter] shortcode as a means of triggering CodeIgniter's content. This is a new feature, and I intend it to replace and deprecate the "Page Override" setting.
The topic 'How to access my_site/controller_function directly' is closed to new replies.


text:
Q: How to connect textfield with function of open_button class Currently, I learn Java guI, swing.
I would like to link the j1('open' button) in Yam class with a Open_Button Class's function.
If I write a file name in "textField" which is a global variable in Yam class, and press the 'open', the "TextArea" has to show an output the opened file's content.
but somehow it doesn't work. I think the open_button class's function is not connected with the "textField" in Yam class.
But I really can't find what's wrong.
(sorry for my poor Engish..;( i'll show you full code. I want to follow Minimal, Complete, and Verifiable rull but I really don't know where is wrong part..)
 Yam class )

   import javax.swing.*;
   import java.awt.*;
   import java.awt.event.*;
   import java.io.File.*;
   import java.io.*;
   import java.nio.file.*;

   public class Yam extends JFrame {
   Container contentPane;
   JButton j1, j2, j3, j4, j5, j6;
   JTextField textField;
   JTextField textField_1;
   TextArea textArea, textArea_1;

  public Yam() {
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  contentPane = getContentPane();
  contentPane.setLayout(null);

  textField = new JTextField();
  textField.setBounds(14, 12, 240, 24);
  contentPane.add(textField);
  textField.setColumns(20);

  j1 = new JButton("Open");
  j1.setBounds(294, 11, 105, 27);
  j1.addActionListener(new AB());
  contentPane.add(j1);

  textField_1 = new JTextField();
  textField_1.setBounds(14, 48, 240, 24);
  contentPane.add(textField_1);
  textField_1.setColumns(20);

  j2 = new JButton("Save");
  j2.setBounds(294, 47, 105, 27);
  contentPane.add(j2);

  textArea = new TextArea();
  textArea.setBounds(10, 105, 405, 190);
  contentPane.add(textArea);

  j3 = new JButton("Compile");
  j3.setBounds(10, 319, 87, 25);
  j3.addActionListener(new AB());
  contentPane.add(j3);

  j4 = new JButton("Save Errors");
  j4.setBounds(111, 319, 87, 25);
  contentPane.add(j4);

  j5 = new JButton("Delete");
  j5.setBounds(217, 319, 87, 25);
  contentPane.add(j5);

  j6 = new JButton("Clear");
  j6.setBounds(321, 319, 87, 25);
  j6.addActionListener(new AB());
  contentPane.add(j6);

  textArea_1 = new TextArea();
  textArea_1.setBounds(10, 391, 405, 253);
  contentPane.add(textArea_1);

  setSize(506, 698);
  setVisible(true); }

 class AB implements ActionListener {
 private TextArea args;

  public void actionPerformed(ActionEvent e) {
  Object source = e.getSource();
  CmdClass cmd = new CmdClass();
  Open_button open = new Open_button();
  JFrame f = new JFrame("what");

     if(source == j1) {
             }
     else if(source == j2) {
         }

     else if(source == j3) {
        if(cmd.main(args))
           textArea_1.append("Compile Success\n");
     }
     else if(source == j4) { }
     else if(source == j5) { }
     else {
        textField.setText(" ");
        textField_1.setText(" ");
        textArea.setText(" ");
        textArea_1.setText(" "); }}}

     public static void main(String[] args) {
      new Yam();
       }

       public static String getFileName() {
  // TODO Auto-generated method stub
    return null;}}

     Open_button class)

import java.io.*;
import java.nio.file.*;
import java.io.File;

public class Open_button {
    Path Path;

    public void main(String Str_paths){
        Yam y = new Yam();

        Str_paths = y.textField.getText();
        Path = FileSystems.getDefault().getPath(Str_paths);
        File file = Path.toFile();

        if(Path.toFile() != null)
            y.textArea.append("file exist!");
        else {
            y.textArea_1.append("file not exist");
            BufferedReader br = null;
            try {
                br = new BufferedReader(new FileReader(Str_paths));
                String line;
                while ((line = br.readLine()) != null) {
                    y.textArea.append(line);
                }
            } catch (FileNotFoundException e1) {
                e1.printStackTrace();
            } catch (IOException e2) {
                e2.printStackTrace();
            }
        }
    }
}

A: I think you want for some reason to open and read a file which the filepath is designated on the jtextfield; Simplest way would be:
JButton openButton = new JButton("Open File");
openButton.addActionListener(new ActionListener() {
     public void actionPerformed(ActionEvent e) {
         String thePath = textfield.getText();
         File theFile = new File(thePath);
         ...read..write..
     }
});

I would declare this directly on the Yam class;
From what I have seen, your code has two issues: first, there are two Yam (y) instances (the one declared in OpenButton class is different than the one located above) and, second, you assume that the file is readable and always located on Filesystem view...I think you should also consider a JFileChooser dialog.
Regards, André

redpajama_set_name: RedPajamaStackExchange


Carey Kish is thru-hiking the 2,200-mile Appalachian Trail from Georgia to Maine. He is currently in Pennsylvania. Entries from Carey's trail journal are presented here. You can also follow his journey on Facebook.
June 25, 2015: Boiling Springs to Darlington Shelter, 14.3 miles, 11:30am to 7pm.
Next to last to break camp this morning, but no worries, because I'd planned a relatively easy day.
Slept like a baby I think, felt like it anyway, even if I did hear every train rumble past during the night. The tracks can't be 200 feet from the campsite. I love trains, though, and all their associated noise, the horns and wheels grinding and all that.
Into the village by 9 to have breakfast at Caffe 101. Was really wowed by the most excellent plate of bacon and eggs they served for a very reasonable price. Hung out there for several hours drinking coffee, playing on the Internet, writing blog posts, and reading several newspapers. A relaxing start to the day.
Walking amid the soybeans of the Cumberland Valley. Carey Kish photo.
But the miles would not happen on their own, so after a brief visit at the ATC regional office, I hiked out of town. Loved my time in Boiling Springs!
Today's walk across the Cumberland Valley was through woods and across fields of corn and soynbeans, and at no time was I far from civilized sights and sounds. Crossed a bunch of roads, including the Penna Turnpike, Middlesex Turnpike, and I-81.
Crossing the busy Middlesex Turnpike. Carey Kish photo.
At the Middlesex Turnpike (US11), I veered off trail a half-mile to the Middlesex Diner, where I enjoyed a hearty late lunch of hot roast beef and mashed potatoes, salad and blueberry. Good food, and plenty of it for not a lot of money. Worth the side trip for sure.
The rain that had threatened all day started in earnest on my walk back to the trail. The steady but light shower followed me the rest of the afternoon. I gave it a short break at the pedestrian tunnel under PA944, then I grunted up the final couple miles to Darlington Shelter. I was prepared to tent, but was happy to grab the last spot in the shelter.
Darlington Shelter. Carey Kish photo.
The family of 7 were there, as were a handful of other thru's, including Mak and Cheese. Some were around in their tents and hammocks. With no need to cook supper after the big meal at lunch, I got myself situated and was in bed at 7:30. Funny thing, so was everybody else, guess we were all tired. I know I was. Rain continued into the night, at least until I fell asleep.


We finished the segment about Kelsey's family with the problem he had with his foot and finally having surgery to correct a problem that he had been suffering with for almost 2 years.
The fairy tale ending would be then he lived happily ever after with no more pain, but he did not have a fairy tale ending and he stills suffers from foot pain.
After the surgery, Kelsey finally was pain free and had full range of motion in his foot for approximately the next year.
On our way to take him to a national bow shoot, we first went by his doctor's office for a yearly checkup. He had been experiencing some pain again and restricted movement in the foot for a few weeks. The doctor took x-rays and told us the bones that he had removed were growing back. Very fast. My son was going to need another surgery.
We really liked this doctor and although he was only an hour away from our home, he was in another state. The surgery center where the operation had been performed was in our home state. Because of this, our insurance had refused to pay the doctor's bill. They had paid the surgical center bill.
So, we had to find another doctor within our state. I felt like we were starting back at square one.
After meeting again with Kelsey's pediatrician, we were sent to the closest Chrildren's Hospital, which was a two hour drive.
This is where we met the doctor who would perform the next two surgeries on Kelsey's foot. Yes, I wrote that correctly, the next TWO surgeries.
Whereas the previous doctor had removed two bones from Kelsey's foot, this doctor said there were actually three bones that needed to be addressed. So he under went surgery again to remove three bones this time. The two that had grown back and another one.
During the healing process, Kelsey had to wear a cast. One day while still in the cast, his foot became very sore. He felt like something had come loose. We made the 2 hour trip to see his doctor. One of the screws that had been placed in his foot had come loose. It was corrected and we were on our way home once again.
And he was pain free for awhile.
When the pain began again, we made another appointment to see this doctor . After x-rays were taken, the findings were again the same. The bones that had been removed were growing back again.
So now Kelsey had an option, remove the bones again or fuse them together. He would lose the range of motion in his foot, but the pain should greatly subside.
At this time Kelsey was 18 years old so I told him it was his choice. He opted to have the bones fused together.
Kelsey underwent surgery again on March 14, 2006. I remember that date well because my daughter also had Dylan the same day. My husband went to the hospital with Kelsey while I stayed with my daughter while she delivered. The next day we traded places.
Although the bones were fused together with hopes that there would be no more pain, that was not the case. Kelsey did well for several years before the pain came back. By this time, he was married with a son of his own.
Obviously, he was no longer under a pediatrician's care so he found a podiatrist at our local medical facility. He was new to our area.
After examining Kelsey, he determined that the coalition was not only affecting the bone, but also the tissue and muscle that surrounds the bone. So he went through another surgery.
Kelsey is still to this day under the care of this podiatrist. He has had to go in to have another screw redone and he has developed a condition called neuropathy in his foot.
There have been several times that he has had to come home from work on the boat to get steroid injections and medication for his foot pain.
His doctor has even told him he will eventually need to find another job other than that of a deckhand where he is on his feet a lot. Luckily, he has passed his pilot's test and is working on his piloting hours before being able to pilot his own boat. With this advancement, he will not be on his feet as much.
Foot problems seem to run in our family. I have problems with my feet and so does my youngest daughter. Not to the extent Kelsey does though.
Have you or any of your family members have any medical problems that can't seem to be diagnosed?
Does your blog have a contact page? I'm having problems locating it but, I'd like to shoot you an e-mail. I've got some suggestions for your blog you might be interested in hearing. Either way, great site and I look forward to seeing it develop over time.
Thank you for bringing this to my attention. I have placed contact information at the bottom of the last post and plan to put it on each post.
Previous Previous post: Wordless Wednesday: Show us your week with pictures.


The u-shaped prong sets the diamonds with maximum visibility for each and every diamond in this 14k yellow gold bridal set. The 8-prong center secures a one carat round brilliant-cut diamond raised by the width of the standing halo diamonds. The matching wedding band sits snugly under the halo against the band of the engagement ring to complete this stunning bridal set.


My child studies in VHS. I bought dozens of agarbatti and sold them at a higher price.With the profit earned I paid the school fees of a poor child. Of all the incense I have tried, I find that innoscent is my favorite.It seems to keep me in much more centered place, I use them daily.
Every time I light an innoscenct, the smoke seems to blend and disappear quickly.
I have purchased 110 packets to spread the innocent aroma of innoscent sticks to the world out.
I have purchased 100 packets to give it to my relatives during my daughter's wedding celebrations.


text:
Trump promotes health care 'vision' but gaps remain
CHARLOTTE, N.C. (AP) — More than three-and-a-half years into his presidency and 40 days from an election, President Donald Trump on Thursday launched what aides termed a "vision" for health care heavy on unfulfilled aspirations.
"This is affirmed, signed, and done, so we can put that to rest," Trump said. He signed an executive order on a range of issues, including protecting people with preexisting medical conditions from insurance discrimination.
But that right is already guaranteed in the Obama-era health law his administration is asking the Supreme Court to overturn.
House Speaker Nancy Pelosi dismissively said Trump's "bogus executive order on pre-existing conditions isn't worth the paper it's signed on." Democrats are betting heavily that they have the edge on health care this election season.
Trump spoke at an airport hangar in swing-state North Carolina to a crowd that included white-coated, mask-wearing health care workers. He stood on a podium in front of a blue background emblazoned with "America First Healthcare Plan." His latest health care pitch won accolades from administration officials and political supporters but failed to impress others.
"Executive orders issued close to elections are not the same thing as actual policies," said Katherine Hempstead, a senior policy adviser with the nonpartisan Robert Wood Johnson Foundation, which works on a range of health care issues, from coverage to quality.
Trump's speech served up a clear political attack, as he accused Democrats of wanting to unleash a "socialist nightmare" on the U.S. health care system, complete with rationing. But Democratic nominee Joe Biden has rejected calls from his party's left for a government-run plan for all. Instead, the former vice president wants to expand the Affordable Care Act, and add a new public program as an option.
Trump returned to health care amid disapproval of his administration's handling of the coronavirus pandemic and growing uncertainty about the future of the Obama-era law.
In a rambling speech, he promised quality health care at affordable prices, lower prescription drug costs, more consumer choice and greater transparency. His executive order would also to try to end surprise medical bills.
"'If we win we will have a better and less expensive plan that will always protect individuals with preexisting conditions," Trump declared.
But while his administration has made some progress on its health care goals, the sweeping changes Trump promised as a candidate in 2016 have eluded him.
The clock has all but run out in Congress for major legislation on lowering drug costs or ending surprise bills, much less replacing the Affordable Care Act, or "Obamacare."
Pre-election bill signing ceremonies on prescription drugs and surprise medical charges were once seen as achievable — if challenging — goals for the president. No longer.
Trump's speech Thursday conflated some of his administration's achievements with policies that are in stages of implementation and ones that remain aspirational.
Democrats are warning Trump would turn back the clock if given another four years in the White House, and they're promising coverage for all and lower drug prices.
Health and Human Services Secretary Alex Azar said Trump's executive order would declare it the policy of the U.S. government to protect people with preexisting conditions, even if the ACA is declared unconstitutional. However, such protections are already the law, and Trump would have to go to Congress to cement a new policy.
On surprise billing, Azar said the president's order will direct him to work with Congress on legislation, and if there's no progress, move ahead with regulatory action. However, despite widespread support among lawmakers for ending surprise bills, the White House has been unable to forge a compromise that steers around determined lobbying by interest groups affected.
Health care consultant and commentator Robert Laszewski said he's particularly puzzled by Trump's order on preexisting conditions.
"So, after 20 years of national public policy debate and hard-fought congressional and presidential approval, how does Trump conclude he can restore these protections, should the Republican Supreme Court suit overturn them, with a simple executive order?" asked Laszewski.
The American Cancer Society Cancer Action Network said the president's order is not the equivalent of Obama's law. "Should the administration succeed in its case to throw out the law, the executive order will offer no guaranteed patient protections in its place," said Lisa Lacasse, the group's president.
For Trump, health care represents a major piece of unfinished business.
Prescription drug inflation has stabilized when generics are factored in, but the dramatic price rollbacks he once teased have not materialized. In his speech the president highlighted another executive order directing Medicare to pay no more than what other nations pay for medications, but it remains yet to be seen how that policy will work in practice, if it can overcome fierce opposition from the drug industry.
Trump said millions of Medicare recipients will soon receive a card in the mail containing $200 that they can use to help pay for prescription medications. "I will always take care of our wonderful senior citizens," he promised. No detail was immediately available on when seniors would get such a card or how the cost of the assistance would be paid for.
More broadly, the number of uninsured Americans started edging up under Trump even before job losses in the economic shutdown to try to contain the coronavirus pandemic. Various studies have tried to estimate the additional coverage losses this year, but the most authoritative government statistics have a long time lag. Larry Levitt of the nonpartisan Kaiser Family Foundation says his best guess is "several million."
Meanwhile, Trump is pressing the Supreme Court to invalidate the entire Obama health law, which provides coverage to more than 20 million people and protects Americans with medical problems from insurance discrimination. That case will be argued a week after Election Day.
The death of Supreme Court Justice Ruth Bader Ginsburg has added another layer of uncertainty. Without Ginsburg, there's no longer a majority of five justices who previously had voted to uphold the ACA.
Democrats, unable to slow the Republican march to Senate confirmation of a replacement for Ginsburg, are ramping up their election-year health care messaging. It's a strategy that helped them win the House in 2018.
A recent Kaiser Foundation poll found Biden had an edge over Trump among registered voters as the candidate with the better approach on making sure everyone has access to health care and insurance, 52% to 40%. The gap narrowed for lowering costs of health care: 48% named Biden, while 42% picked Trump.
Trump unveiled his agenda at the start of a two-day swing to several battleground states, including the all-important Florida. There, he held a rally in Jacksonville and was to court Latino voters at an event in Doral on Friday. From there, Trump will court black voters in Atlanta and attend a fundraiser at his Washington hotel before ending Friday with another rally in Newport News, Virginia.
The scramble to show concrete accomplishments on health care comes as Trump is chafing under criticism that he never delivered a Republican alternative to Obamacare.
"We've really become the healthcare party — the Republican Party — and nobody knows that," he said Thursday. "The news doesn't talk about it."


text:
PPRS Prison Match™
Federal PSR / Sentencing Preparation- We appreciate your patience and our website undergoes its final edit.
PSR Prison MatchTM
What is the Presentence Report (PSR)?
Challenges with the Presentence Report (PSR)
Physician Presentence Report Service (PPRS) is here to help
Facing Federal Prison?
Family BOP Resources
Probation Officers and the PSR
BOP Resources
Attorney BOP Resources
BOP Mental Healthcare – Care Levels I-IV
Federal BOP Medical Care Levels I-IV
All posts by Dr. M. Blatstein
Privatized Prisons – FOIA Requests – The Supreme Court Weighs In
By Dr. M. Blatstein inDr. B's Blog
I've included several articles that provide a brief overview of their current state.
Open record laws should apply to private prisons, too;
BY CHANDRA BOZELKO, OPINION CONTRIBUTOR – 08/09/1
USA: Supreme Court rejects private prisons' request to limit release of govt. documents on their immigration detention practices
"Supreme Court Rules in Favor of Government Transparency Against Private Prison Corporations", 10 Oct 2017 ..
Author: Detention Watch Network (DWN) & Center for Constitutional Rights (CCR), Published on: 13 October 2017
The Problem with Private Prisons
February 2, 2018, by Tara Joy, Assistant Opinion Editor
Lastly, from Lisa Rosenberg, Executive Director of Open the Government, at lrosenberg@openthegovernment.org,
The Private Prison Information Act (S.1728) would strengthen accountability and oversight by requiring non-Federal prison, correctional, and detention facilities holding Federal prisoners or detainees under a contract with the Federal Government to make the same information available to the public as is required of Federal prisons and correctional facilities by FOIA.
Uncertain Futures, Being Released from Prison Without Healthcare
By Cassie M. Chew | May 1, 2019
In addition to the rest of us, there are hundreds of inmates being released from prison, only to face the reality that the Trump administration is going all out to dismantle the ACA. As the ACA also provides Medicaid for those who are either unemployed or at the poverty level; the formerly incarcerated now face the possibility of no health insurance.
Of Note: Short on funding, and then healthcare following release.
I) First Step Act Comes Up Short in Trump's 2020 Budget
Supporters worry because law seeks $75 million a year for five years, but president's plan lists $14 million. By JUSTIN GEORGE
II) Trump Administration Files Formal Request to Strike Down All of Obamacare
By Jan Hoffman and Abby Goodnough, May 1, 2019
Then there are the governors (Republican only) who refused to allow the medicaid expansion into their states! How can they govern over their constituents, while at the same time going out of their way to in effect, deny healthcare to their poorest populations. We all as a nation are facing an historic constitutional crisis in Washington, but this also disproportionately affects the poorest among us.
Photo by Chris Marchant via Flickr
For those who are being released from prison(s), many have been treated for both medical and mental healthcare problems, as well as being treated for addictions. What they now face is returning into our communities without any medical safety net. Without access to medical care, for some their only resource may be to the streets, a cycle that we've tried to change, the "in and out" of of the prison cycle.
This result ultimately impacts all of us, and our communities for we are all only as strong as our weakest link.
Do they get a Second Chance? No, plus they face an Uncertain Future; Post-Prison, Without Health Care.
Autism and Access to Dentistry – Challenges those Incarcerated
Presenting with autism (or other developmental disabilities), getting a routine root canal is not routine because here, general anesthesia is required, and most dentists are not prepared to provide this service within their office settings.
Even on the outside, most insurers do not cover general anesthesia for these routine dental procedures, leaving the guardians to cover this cost out of pocket. Being incarcerated makes this routine experience even more challenging.
Autism's many faces
Social Interactions:
New Drug Improves Empathy And Social Skills In People With Autism.
2 May 2019, 7:00 am EDTBy Rina Doctor Tech Times.
Specifically this drug shows improved adaptive behaviors in men with autism spectrum disorder; Science Translational Medicine 08 May 2019
Ongoing substandard care and treatment of Immigrant Detainees at the GEO Group's Privatized Adelanto, California Facility
During our May 2018 unannounced inspection of the Adelanto ICE Processing Center in Adelanto, California, OIG identified a number of serious issues that violate ICE's 2011 Performance-Based National Detention Standards and pose significant health and safety risks at the facility. Specifically, we are concerned about the following:
Nooses in Detainee Cells (Page 3)
Improper and Overly Restrictive Segregation (Page 4-7)
Untimely and Inadequate Detainee Medical Care (Page 7-9)
The Adelanto Center was to comply with ICE's 2011 Performance-
Based National Detention Standards, as revised in December 2016. These detention standards establish requirements for areas such as:
environmental health and safety: e.g., cleanliness, sanitation, security, admission into facilities, classification, detainee searches, segregation 2 (Special Management Units), and disciplinary system;
detainee care: e.g., food service, medical care, and personal hygiene;
activities: e.g., religious practices, telephone access, and visitation; and
grievance system.
GEO's (a privatized federal prison) facility's deficiency's continue to demonstrate:
1. Under the Obama Adm., the Justice Department phased out its use of private prisons after officials concluded the facilities are both less safe and less effective at providing correctional services than those run by the government.
2. The OIG's most recent report: 9/2018 continues to demonstrate GEO's inability to function without oversight.
How we treat immigrants is a reflection of our core value history, is this us?
Please click the link and read the report if full.
The Benefits Of A College Program In Prison
Programs like the Education Justice Project out of St. Louis University Prison Program brought classes to Danville Correctional Center — a medium security, all male prison with about 1,700 inmates in east central Illinois, and California's San Quentin's 'The last Mile' are both great steps in addressing the recidivism paradigm.
Photo credit: SEBASTIÁN HIDALGO
Currently, there is no pathway 'within the PSR' process that addresses recidivism. This could match a defendant with a facility that supports an interest the defendant may have in either college, or in learning a specific occupational or trade.
In an attempt to positively change their and their family's future, this would go a long way towards ensuring a successful reentry back into their communities, while being a first step towards reducing the recidivism paradigm.
Prison Design and Mental Health Outcomes
Can Prison Design Affect Inmates' Mental Health Outcomes?
by Joyce Frieden, News Editor, MedPage Today October 31, 2018
As written in the article:
The researchers listed two theories of prison design:
Deprivation Theory: This is the idea that when an inmate is subjected to a restrictive environment, certain basic needs may go unsatisfied and an inmate may adapt to the situation by satisfying needs via maladaptive behaviors.
Situational Theory: This is the idea that architectural and social determinants can impact one's perception of his/her experience (safety, available resources, relationships) and the likelihood of engaging in violence.
Reading the article in full should be considered in future building contracts.
Email: Use Contact Form
Dr. B's Blog
Copyright © 2018 Physician Presentence Report Service LLC. All right reserved
/srv/bindings/2d4be93f29294a51aac22b7ddb82fd13/code/wp-content/themes/spicepress/archive.php


text:
Alessandro Bianchi (born 19 July 1989) is a former San Marino international footballer who played mainly as a right winger, but also as a forward and midfielder.

International career
He made his senior debut on 14 August 2012, in a 3–2 defeat to Malta.

References

External links

1989 births
Living people
Sammarinese footballers
San Marino international footballers
Association football forwards

redpajama_set_name: RedPajamaWikipedia


Population served: Patients and families facing a life threatening illness.
The Rainy Day Fund provides emergency payments directly to the utility companies and landlords, ensuring that each patient has a warm, safe place to call home while recovering. The Rainy Day Fund also provides grocery gift cards & hospital transportation and parking costs. Shine Through The Rain also reviews special requests for consideration above and beyond the scope of services already covered.


text:
#include "cmdline.h"
#include "oor_config_functions.h"
#include "oor_config_uci.h"
#include "../oor_external.h"
#include "../iface_list.h"
#include "../control/oor_ctrl_device.h"
#include "../control/lisp_xtr.h"
#include "../control/lisp_ms.h"
#include "../control/oor_control.h"
#include "../data-plane/data-plane.h"
#include "../lib/shash.h"
#include "../lib/oor_log.h"
#include "../lib/prefixes.h"
#include <libgen.h>
#include <string.h>
#include <uci.h>

/***************************** FUNCTIONS DECLARATION *************************/

int
configure_xtr(
        struct uci_context      *ctx,
        struct uci_package      *pck);
int
configure_mn(
        struct uci_context      *ctx,
        struct uci_package      *pck);
int
configure_rtr(
        struct uci_context      *ctx,
        struct uci_package      *pck);
int
configure_ms(
        struct uci_context      *ctx,
        struct uci_package      *pck);
static mapping_t*
parse_mapping(
        struct uci_context      *ctx,
        struct uci_section      *sect,
        oor_ctrl_dev_t         *dev,
        shash_t                *rloc_set_ht,
        shash_t                *lcaf_ht,
        glist_t                 *no_addr_loct_l,
        uint8_t                 is_local);

static shash_t *
parse_rlocs(
        struct uci_context      *ctx,
        struct uci_package      *pck,
        shash_t                *lcaf_ht,
        glist_t                 *no_addr_loct_list);

static shash_t *
parse_rloc_sets(
        struct uci_context      *ctx,
        struct uci_package      *pck,
        shash_t                *rlocs_ht,
        shash_t                *lcaf_ht);
static shash_t *
parse_lcafs(
        struct uci_context      *ctx,
        struct uci_package      *pck);

static int
parse_elp_node(
        struct uci_context      *ctx,
        struct uci_section      *section,
        shash_t                *ht);

/********************************** FUNCTIONS ********************************/

int
handle_config_file()
{
    char *uci_conf_dir;
    char *uci_conf_file;
    struct uci_context *ctx;
    struct uci_package *pck = NULL;
    struct uci_section *sect;
    struct uci_element *element;
    int uci_debug;
    char *uci_log_file;
    char *uci_op_mode;
    int res = BAD;

    if (config_file == NULL){
    	config_file = strdup("/etc/config/oor");
    }

    ctx = uci_alloc_context();

    if (ctx == NULL) {
        OOR_LOG(LCRIT, "Could not create UCI context. Exiting ...");
        return (BAD);
    }

    uci_conf_dir = dirname(strdup(config_file));
    uci_conf_file = basename(strdup(config_file));

    uci_set_confdir(ctx, uci_conf_dir);

    OOR_LOG(LDBG_1,"Conf dir: %s\n",ctx->confdir);

    uci_load(ctx,uci_conf_file,&pck);

    if (pck == NULL) {
        OOR_LOG(LCRIT, "Could not load conf file: %s. Exiting ...",uci_conf_file);
        uci_perror(ctx,"Error while loading file ");
        uci_free_context(ctx);
        return (BAD);
    }

    OOR_LOG(LDBG_3,"package uci: %s\n",pck->ctx->confdir);

    uci_foreach_element(&pck->sections, element) {

        sect = uci_to_section(element);

        if (strcmp(sect->type, "daemon") == 0){

            uci_debug = strtol(uci_lookup_option_string(ctx, sect, "debug"),NULL,10);

            if (debug_level == -1){//Used to not overwrite debug level passed by console
                if (uci_debug > 0)
                    debug_level = uci_debug;
                else
                    debug_level = 0;
                if (debug_level > 3)
                    debug_level = 3;
            }

            uci_log_file = (char *)uci_lookup_option_string(ctx, sect, "log_file");
            if (daemonize == TRUE){
                open_log_file(uci_log_file);
            }

            uci_op_mode = (char *)uci_lookup_option_string(ctx, sect, "operating_mode");

            if (uci_op_mode != NULL) {
                if (strcmp(uci_op_mode, "xTR") == 0) {
                    res = configure_xtr(ctx, pck);
                } else if (strcmp(uci_op_mode, "MS") == 0) {
                    res = configure_ms(ctx, pck);
                } else if (strcmp(uci_op_mode, "RTR") == 0) {
                    res = configure_rtr(ctx, pck);
                }else if (strcmp(uci_op_mode, "MN") == 0) {
                    res = configure_mn(ctx, pck);
                }else {
                    OOR_LOG(LCRIT, "Configuration file: Unknown operating mode: %s",uci_op_mode);
                    return (BAD);
                }
            }
            continue;
        }
    }
    return (res);
}

int
configure_xtr(struct uci_context *ctx, struct uci_package *pck)
{
    struct uci_section *sect;
    struct uci_element *element;
    struct uci_element *elem_addr;
    struct uci_option *opt;
    int uci_retries;
    char *uci_address;
    char *uci_nat_aware;
    int uci_key_type;
    char *uci_key;
    int uci_proxy_reply;
    int uci_priority;
    int uci_weigth;
    shash_t *lcaf_ht;
    shash_t *rlocs_ht;
    shash_t *rloc_set_ht;
    lisp_xtr_t *xtr;
    map_local_entry_t *map_loc_e;
    mapping_t *mapping;
    glist_t *no_addr_loct_list;

    /* CREATE AND CONFIGURE XTR */
    if (ctrl_dev_create(xTR_MODE, &ctrl_dev) != GOOD) {
        OOR_LOG(LCRIT, "Failed to create xTR. Aborting!");
        return (BAD);
    }

    xtr = CONTAINER_OF(ctrl_dev, lisp_xtr_t, super);

    /* FWD POLICY STRUCTURES */
    xtr->fwd_policy = fwd_policy_class_find("flow_balancing");
    xtr->fwd_policy_dev_parm = xtr->fwd_policy->new_dev_policy_inf(ctrl_dev,NULL);

    /* CREATE LCAFS HTABLE */

    /* get a hash table of all the elps. If any are configured,
     * their names could appear in the rloc field of database mappings
     * or static map cache entries  */
    lcaf_ht = parse_lcafs(ctx,pck);

    /* CREATE RLOCs sets HTABLE */
    no_addr_loct_list = glist_new_managed((glist_del_fct)no_addr_loct_del);
    rlocs_ht = parse_rlocs(ctx,pck,lcaf_ht,no_addr_loct_list);
    rloc_set_ht = parse_rloc_sets(ctx,pck,rlocs_ht,lcaf_ht);

    uci_foreach_element(&pck->sections, element) {
        sect = uci_to_section(element);
        /* NAT Traversal options */

        if (strcmp(sect->type, "nat-traversal") == 0){
            uci_nat_aware = uci_lookup_option_string(ctx, sect, "nat_traversal_support");
            if (uci_nat_aware && strcmp(uci_nat_aware, "on") == 0){
                xtr->nat_aware  = TRUE;
                nat_set_xTR_ID(xtr);
                nat_set_site_ID(xtr, 0);
                default_rloc_afi = AF_INET;
                OOR_LOG(LDBG_1, "NAT support enabled. Set defaul RLOC to IPv4 family");
            }else{
                xtr->nat_aware = FALSE;
            }
            break;
        }
    }

    uci_foreach_element(&pck->sections, element) {
            sect = uci_to_section(element);
            if (strcmp(sect->type, "daemon") == 0){

                /* RETRIES */
                if (uci_lookup_option_string(ctx, sect, "map_request_retries") != NULL){
                    uci_retries = strtol(uci_lookup_option_string(ctx, sect, "map_request_retries"),NULL,10);
                    if (uci_retries >= 0 && uci_retries <= OOR_MAX_RETRANSMITS){
                        xtr->map_request_retries = uci_retries;
                    }else if (uci_retries > OOR_MAX_RETRANSMITS){
                        xtr->map_request_retries = OOR_MAX_RETRANSMITS;
                        OOR_LOG(LWRN, "Map-Request retries should be between 0 and %d. "
                                "Using default value: %d",OOR_MAX_RETRANSMITS, OOR_MAX_RETRANSMITS);
                    }
                }else{
                    OOR_LOG(LWRN,"Configuration file: Map Request Retries not specified."
                            " Setting default value: %d sec.",DEFAULT_MAP_REQUEST_RETRIES);
                    xtr->map_request_retries = DEFAULT_MAP_REQUEST_RETRIES;
                    continue;
                }
            }

            /* RLOC PROBING CONFIG */

            if (strcmp(sect->type, "rloc-probing") == 0){
                if (uci_lookup_option_string(ctx, sect, "rloc_probe_interval") != NULL){
                    xtr->probe_interval = strtol(uci_lookup_option_string(ctx, sect, "rloc_probe_interval"),NULL,10);
                }else{
                    OOR_LOG(LWRN,"Configuration file: RLOC probe interval not specified."
                            " Disabling RLOC Probing");
                    xtr->probe_interval = 0;
                    continue;
                }
                if (uci_lookup_option_string(ctx, sect, "rloc_probe_retries") != NULL){
                    xtr->probe_retries = strtol(uci_lookup_option_string(ctx, sect, "rloc_probe_retries"),NULL,10);
                }else{
                    OOR_LOG(LWRN,"Configuration file: RLOC Probe Retries not specified."
                            " Setting default value: %d sec.",DEFAULT_RLOC_PROBING_RETRIES);
                    xtr->probe_retries = DEFAULT_RLOC_PROBING_RETRIES;
                }
                if (uci_lookup_option_string(ctx, sect, "rloc_probe_retries_interval") != NULL){
                    xtr->probe_retries_interval = strtol(uci_lookup_option_string(ctx, sect, "rloc_probe_retries_interval"),NULL,10);
                }else{
                    OOR_LOG(LWRN,"Configuration file: RLOC Probe Retries Intervals not specified."
                            " Setting default value: %d sec.",DEFAULT_RLOC_PROBING_RETRIES_INTERVAL);
                    xtr->probe_retries_interval = DEFAULT_RLOC_PROBING_RETRIES_INTERVAL;
                }

                validate_rloc_probing_parameters(&xtr->probe_interval,
                        &xtr->probe_retries, &xtr->probe_retries_interval);
                continue;
            }

            /* MAP-RESOLVER CONFIG */
            if (strcmp(sect->type, "map-resolver") == 0){
                opt  = uci_lookup_option(ctx, sect, "address");
                if (opt != NULL){
                    uci_foreach_element(&(opt->v.list), elem_addr){
                        if (add_server(elem_addr->name, xtr->map_resolvers) != GOOD){
                            OOR_LOG(LCRIT,"Can't add %s Map Resolver.",elem_addr->name);
                        }else{
                            OOR_LOG(LDBG_1, "Added %s to map-resolver list", elem_addr->name);
                        }
                    }
                }
                continue;
            }

            /* MAP-SERVER CONFIG */
            if (strcmp(sect->type, "map-server") == 0){

                uci_address = (char *)uci_lookup_option_string(ctx, sect, "address");
                if (uci_lookup_option_string(ctx, sect, "key_type") != NULL){
                    uci_key_type = strtol(uci_lookup_option_string(ctx, sect, "key_type"),NULL,10);
                }else{
                    OOR_LOG(LWRN,"Configuration file: No ket type assigned to the map server \"%s\"."
                            " Set default value: HMAC_SHA_1_96",uci_address);
                    uci_key_type = HMAC_SHA_1_96;
                }

                uci_key = (char *)uci_lookup_option_string(ctx, sect, "key");

                if (strcmp(uci_lookup_option_string(ctx, sect, "proxy_reply"), "on") == 0){
                    uci_proxy_reply = TRUE;
                }else{
                    uci_proxy_reply = FALSE;
                }

                if (add_map_server(xtr->map_servers,uci_address,
                        uci_key_type,
                        uci_key,
                        uci_proxy_reply) != GOOD ){
                    OOR_LOG(LCRIT, "Can't add %s Map Server.", uci_address);
                }else{
                    OOR_LOG(LDBG_1, "Added %s to map-server list", uci_address);
                }
                continue;
            }

            /* PROXY-ETR CONFIG */

            if (strcmp(sect->type, "proxy-etr") == 0){
                uci_address = (char *)uci_lookup_option_string(ctx, sect, "address");
                if (uci_lookup_option_string(ctx, sect, "priority") != NULL){
                    uci_priority = strtol(uci_lookup_option_string(ctx, sect, "priority"),NULL,10);
                }else{
                    OOR_LOG(LWRN,"Configuration file: No priority assigned to the proxy-etr \"%s\"."
                            " Set default value: 10",uci_address);
                    uci_priority = 10;
                }
                if (uci_lookup_option_string(ctx, sect, "weight") != NULL){
                    uci_weigth = strtol(uci_lookup_option_string(ctx, sect, "weight"),NULL,10);
                }else{
                    OOR_LOG(LWRN,"Configuration file: No weight assigned to the proxy-etr \"%s\"."
                            " Set default value: 100",uci_address);
                    uci_weigth = 100;
                }

                if (add_proxy_etr_entry(xtr->petrs,uci_address,uci_priority,uci_weigth) != GOOD ){
                    OOR_LOG(LERR, "Can't add proxy-etr %s", uci_address);
                }else{
                    OOR_LOG(LDBG_1, "Added %s to proxy-etr list", uci_address);
                }
                continue;
            }

            /* PROXY-ITR CONFIG */
            if (strcmp(sect->type, "proxy-itr") == 0){
                opt  = uci_lookup_option(ctx, sect, "address");
                if (opt != NULL){
                    uci_foreach_element(&(opt->v.list), elem_addr){
                        if (add_server(elem_addr->name, xtr->pitrs) != GOOD){
                            OOR_LOG(LERR, "Can't add %s to proxy-itr list. Discarded ...", elem_addr->name);
                        }else{
                            OOR_LOG(LDBG_1, "Added %s to proxy-itr list", elem_addr->name);
                        }
                    }
                }
                continue;
            }

            if (strcmp(sect->type, "database-mapping") == 0){
                mapping = parse_mapping(ctx,sect,&(xtr->super),rloc_set_ht,lcaf_ht,no_addr_loct_list,TRUE);
                if (mapping == NULL){
                    OOR_LOG(LERR, "Can't add EID prefix %s. Discarded ...",
                            uci_lookup_option_string(ctx, sect, "eid_prefix"));
                    continue;
                }
                map_loc_e = map_local_entry_new_init(mapping);
                if (map_loc_e == NULL){
                    mapping_del(mapping);
                    continue;
                }

                if (xtr->fwd_policy->init_map_loc_policy_inf(
                        xtr->fwd_policy_dev_parm,map_loc_e,NULL,
                        xtr->fwd_policy->del_map_loc_policy_inf) != GOOD){
                    OOR_LOG(LERR, "Couldn't initiate forward information for mapping with EID: %s. Discarding it...",
                            lisp_addr_to_char(mapping_eid(mapping)));
                    map_local_entry_del(map_loc_e);
                    continue;
                }

                if (add_local_db_map_local_entry(map_loc_e,xtr) != GOOD){
                    map_local_entry_del(map_loc_e);
                    continue;
                }

                continue;
            }

            /* STATIC MAP-CACHE CONFIG */
            if (strcmp(sect->type, "static-map-cache") == 0){
                mapping = parse_mapping(ctx,sect,&(xtr->super),rloc_set_ht,lcaf_ht,no_addr_loct_list,FALSE);
                if (mapping == NULL){
                    OOR_LOG(LERR, "Can't add static Map Cache entry with EID prefix %s. Discarded ...",
                            uci_lookup_option_string(ctx, sect, "eid_prefix"));
                    continue;
                }
                if (mcache_lookup_exact(xtr->map_cache, mapping_eid(mapping)) == NULL){
                    if (tr_mcache_add_static_mapping(xtr, mapping) == GOOD){
                        OOR_LOG(LDBG_1, "Added static Map Cache entry with EID prefix %s in the database.",
                                lisp_addr_to_char(mapping_eid(mapping)));
                    }else{
                        OOR_LOG(LERR, "Can't add static Map Cache entry with EID prefix %s. Discarded ...",
                                mapping_eid(mapping));
                        mapping_del(mapping);
                    }
                }else{
                    OOR_LOG(LERR, "Configuration file: Duplicated static Map Cache entry with EID prefix %s."
                            "Discarded ...",uci_lookup_option_string(ctx, sect, "eid_prefix"));
                    mapping_del(mapping);
                    continue;
                }
                continue;
            }
    }
    /* Calculate forwarding info por proxy-etrs */
    if (xtr->fwd_policy->init_map_cache_policy_inf(xtr->fwd_policy_dev_parm,xtr->petrs,
            xtr->fwd_policy->del_map_cache_policy_inf) != GOOD){
        OOR_LOG(LDBG_1, "Couldn't initiate routing info for PeTRs!.");
        mcache_entry_del(xtr->petrs);
        return(BAD);
    }

    /* destroy the hash table */
    shash_destroy(lcaf_ht);
    shash_destroy(rlocs_ht);
    shash_destroy(rloc_set_ht);
    glist_destroy(no_addr_loct_list);

    return(GOOD);
}

int
configure_mn(struct uci_context *ctx, struct uci_package *pck)
{
    struct uci_section *sect;
    struct uci_element *element;
    struct uci_element *elem_addr;
    struct uci_option *opt;
    int uci_retries;
    char *uci_address;
    int uci_key_type;
    char *uci_key;
    char *uci_nat_aware;
    int uci_proxy_reply;
    int uci_priority;
    int uci_weigth;
    shash_t *lcaf_ht;
    shash_t *rlocs_ht;
    shash_t *rloc_set_ht;
    lisp_xtr_t *xtr;
    map_local_entry_t *map_loc_e;
    mapping_t *mapping;
    glist_t *no_addr_loct_list;

    /* CREATE AND CONFIGURE XTR */
    if (ctrl_dev_create(MN_MODE, &ctrl_dev) != GOOD) {
        OOR_LOG(LCRIT, "Failed to create Mobile Node device. Aborting!");
        return (BAD);
    }

    xtr = CONTAINER_OF(ctrl_dev, lisp_xtr_t, super);

    /* FWD POLICY STRUCTURES */
    xtr->fwd_policy = fwd_policy_class_find("flow_balancing");
    xtr->fwd_policy_dev_parm = xtr->fwd_policy->new_dev_policy_inf(ctrl_dev,NULL);

    /* CREATE LCAFS HTABLE */

    /* get a hash table of all the elps. If any are configured,
     * their names could appear in the rloc field of database mappings
     * or static map cache entries  */
    lcaf_ht = parse_lcafs(ctx,pck);

    /* CREATE RLOCs sets HTABLE */
    no_addr_loct_list = glist_new_managed((glist_del_fct)no_addr_loct_del);
    rlocs_ht = parse_rlocs(ctx,pck,lcaf_ht,no_addr_loct_list);
    rloc_set_ht = parse_rloc_sets(ctx,pck,rlocs_ht,lcaf_ht);

    uci_foreach_element(&pck->sections, element) {
        sect = uci_to_section(element);
        /* NAT Traversal options */
        /* NAT Traversal options */
        if (strcmp(sect->type, "nat-traversal") == 0){
            uci_nat_aware = uci_lookup_option_string(ctx, sect, "nat_traversal_support");
            if (uci_nat_aware && strcmp(uci_nat_aware, "on") == 0){
                xtr->nat_aware  = TRUE;
                nat_set_xTR_ID(xtr);
                nat_set_site_ID(xtr, 0);
                default_rloc_afi = AF_INET;
                OOR_LOG(LDBG_1, "NAT support enabled. Set defaul RLOC to IPv4 family");
            }else{
                xtr->nat_aware = FALSE;
            }
            break;
        }
    }

    uci_foreach_element(&pck->sections, element) {
        sect = uci_to_section(element);
        if (strcmp(sect->type, "daemon") == 0){

            /* RETRIES */
            if (uci_lookup_option_string(ctx, sect, "map_request_retries") != NULL){
                uci_retries = strtol(uci_lookup_option_string(ctx, sect, "map_request_retries"),NULL,10);
                if (uci_retries >= 0 && uci_retries <= OOR_MAX_RETRANSMITS){
                    xtr->map_request_retries = uci_retries;
                }else if (uci_retries > OOR_MAX_RETRANSMITS){
                    xtr->map_request_retries = OOR_MAX_RETRANSMITS;
                    OOR_LOG(LWRN, "Map-Request retries should be between 0 and %d. "
                            "Using default value: %d",OOR_MAX_RETRANSMITS, OOR_MAX_RETRANSMITS);
                }
            }else{
                OOR_LOG(LWRN,"Configuration file: Map Request Retries not specified."
                        " Setting default value: %d sec.",DEFAULT_MAP_REQUEST_RETRIES);
                xtr->map_request_retries = DEFAULT_MAP_REQUEST_RETRIES;
                continue;
            }
        }

        /* RLOC PROBING CONFIG */

        if (strcmp(sect->type, "rloc-probing") == 0){
            if (uci_lookup_option_string(ctx, sect, "rloc_probe_interval") != NULL){
                xtr->probe_interval = strtol(uci_lookup_option_string(ctx, sect, "rloc_probe_interval"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: RLOC probe interval not specified."
                        " Disabling RLOC Probing");
                xtr->probe_interval = 0;
                continue;
            }
            if (uci_lookup_option_string(ctx, sect, "rloc_probe_retries") != NULL){
                xtr->probe_retries = strtol(uci_lookup_option_string(ctx, sect, "rloc_probe_retries"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: RLOC Probe Retries not specified."
                        " Setting default value: %d sec.",DEFAULT_RLOC_PROBING_RETRIES);
                xtr->probe_retries = DEFAULT_RLOC_PROBING_RETRIES;
            }
            if (uci_lookup_option_string(ctx, sect, "rloc_probe_retries_interval") != NULL){
                xtr->probe_retries_interval = strtol(uci_lookup_option_string(ctx, sect, "rloc_probe_retries_interval"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: RLOC Probe Retries Intervals not specified."
                        " Setting default value: %d sec.",DEFAULT_RLOC_PROBING_RETRIES_INTERVAL);
                xtr->probe_retries_interval = DEFAULT_RLOC_PROBING_RETRIES_INTERVAL;
            }

            validate_rloc_probing_parameters(&xtr->probe_interval,
                    &xtr->probe_retries, &xtr->probe_retries_interval);
            continue;
        }

        /* MAP-RESOLVER CONFIG */
        if (strcmp(sect->type, "map-resolver") == 0){
            opt  = uci_lookup_option(ctx, sect, "address");
            if (opt != NULL){
                uci_foreach_element(&(opt->v.list), elem_addr){
                    if (add_server(elem_addr->name, xtr->map_resolvers) != GOOD){
                        OOR_LOG(LCRIT,"Can't add %s Map Resolver.",elem_addr->name);
                    }else{
                        OOR_LOG(LDBG_1, "Added %s to map-resolver list", elem_addr->name);
                    }
                }
            }
            continue;
        }

        /* MAP-SERVER CONFIG */
        if (strcmp(sect->type, "map-server") == 0){

            uci_address = (char *)uci_lookup_option_string(ctx, sect, "address");
            if (uci_lookup_option_string(ctx, sect, "key_type") != NULL){
                uci_key_type = strtol(uci_lookup_option_string(ctx, sect, "key_type"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: No ket type assigned to the map server \"%s\"."
                        " Set default value: HMAC_SHA_1_96",uci_address);
                uci_key_type = HMAC_SHA_1_96;
            }
            uci_key = (char *)uci_lookup_option_string(ctx, sect, "key");

            if (strcmp(uci_lookup_option_string(ctx, sect, "proxy_reply"), "on") == 0){
                uci_proxy_reply = TRUE;
            }else{
                uci_proxy_reply = FALSE;
            }

            if (add_map_server(xtr->map_servers,uci_address,
                    uci_key_type,
                    uci_key,
                    uci_proxy_reply) != GOOD ){
                OOR_LOG(LCRIT, "Can't add %s Map Server.", uci_address);
            }else{
                OOR_LOG(LDBG_1, "Added %s to map-server list", uci_address);
            }
            continue;
        }

        /* PROXY-ETR CONFIG */

        if (strcmp(sect->type, "proxy-etr") == 0){
            uci_address = (char *)uci_lookup_option_string(ctx, sect, "address");
            if (uci_lookup_option_string(ctx, sect, "priority") != NULL){
                uci_priority = strtol(uci_lookup_option_string(ctx, sect, "priority"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: No priority assigned to the proxy-etr \"%s\"."
                        " Set default value: 10",uci_address);
                uci_priority = 10;
            }
            if (uci_lookup_option_string(ctx, sect, "weight") != NULL){
                uci_weigth = strtol(uci_lookup_option_string(ctx, sect, "weight"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: No weight assigned to the proxy-etr \"%s\"."
                        " Set default value: 100",uci_address);
                uci_weigth = 100;
            }

            if (add_proxy_etr_entry(xtr->petrs,uci_address,uci_priority,uci_weigth) != GOOD ){
                OOR_LOG(LERR, "Can't add proxy-etr %s", uci_address);
            }else{
                OOR_LOG(LDBG_1, "Added %s to proxy-etr list", uci_address);
            }
            continue;
        }

        /* PROXY-ITR CONFIG */
        if (strcmp(sect->type, "proxy-itr") == 0){
            opt  = uci_lookup_option(ctx, sect, "address");
            if (opt != NULL){
                uci_foreach_element(&(opt->v.list), elem_addr){
                    if (add_server(elem_addr->name, xtr->pitrs) != GOOD){
                        OOR_LOG(LERR, "Can't add %s to proxy-itr list. Discarded ...", elem_addr->name);
                    }else{
                        OOR_LOG(LDBG_1, "Added %s to proxy-itr list", elem_addr->name);
                    }
                }
            }
            continue;
        }

        if (strcmp(sect->type, "database-mapping") == 0){
            mapping = parse_mapping(ctx,sect,&(xtr->super),rloc_set_ht,lcaf_ht,no_addr_loct_list,TRUE);
            if (mapping == NULL){
                OOR_LOG(LERR, "Can't add EID prefix %s. Discarded ...",
                        uci_lookup_option_string(ctx, sect, "eid_prefix"));
                continue;
            }

            map_loc_e = map_local_entry_new_init(mapping);
            if (map_loc_e == NULL){
                mapping_del(mapping);
                continue;
            }

            if ( xtr->fwd_policy->init_map_loc_policy_inf(
                    xtr->fwd_policy_dev_parm,map_loc_e,NULL,
                    xtr->fwd_policy->del_map_loc_policy_inf) != GOOD){
                OOR_LOG(LERR, "Couldn't initiate forward information for mapping with EID: %s. Discarding it...",
                        lisp_addr_to_char(mapping_eid(mapping)));
                map_local_entry_del(map_loc_e);
                continue;
            }

            if (add_local_db_map_local_entry(map_loc_e,xtr) != GOOD){
                map_local_entry_del(map_loc_e);
                continue;
            }

            continue;
        }

        /* STATIC MAP-CACHE CONFIG */
        if (strcmp(sect->type, "static-map-cache") == 0){
            mapping = parse_mapping(ctx,sect,&(xtr->super),rloc_set_ht,lcaf_ht,no_addr_loct_list,FALSE);
            if (mapping == NULL){
                OOR_LOG(LERR, "Can't add static Map Cache entry with EID prefix %s. Discarded ...",
                        uci_lookup_option_string(ctx, sect, "eid_prefix"));
                continue;
            }
            if (mcache_lookup_exact(xtr->map_cache, mapping_eid(mapping)) == NULL){
                if (tr_mcache_add_static_mapping(xtr, mapping) == GOOD){
                    OOR_LOG(LDBG_1, "Added static Map Cache entry with EID prefix %s in the database.",
                            lisp_addr_to_char(mapping_eid(mapping)));
                }else{
                    OOR_LOG(LERR, "Can't add static Map Cache entry with EID prefix %s. Discarded ...",
                            mapping_eid(mapping));
                    mapping_del(mapping);
                }
            }else{
                OOR_LOG(LERR, "Configuration file: Duplicated static Map Cache entry with EID prefix %s."
                        "Discarded ...",uci_lookup_option_string(ctx, sect, "eid_prefix"));
                mapping_del(mapping);
                continue;
            }
            continue;
        }
    }

    /* Calculate forwarding info por proxy-etrs */
    if (xtr->fwd_policy->init_map_cache_policy_inf(xtr->fwd_policy_dev_parm,xtr->petrs,
            xtr->fwd_policy->del_map_cache_policy_inf) != GOOD){
        OOR_LOG(LDBG_1, "Couldn't initiate routing info for PeTRs!.");
        mcache_entry_del(xtr->petrs);
        return(BAD);
    }

    /* destroy the hash table */
    shash_destroy(lcaf_ht);
    shash_destroy(rlocs_ht);
    shash_destroy(rloc_set_ht);
    glist_destroy(no_addr_loct_list);

    return(GOOD);
}

int
configure_rtr(struct uci_context *ctx, struct uci_package *pck)
{
    lisp_xtr_t *xtr;
    struct uci_section *sect;
    struct uci_element *element;
    struct uci_element *elem_addr;
    struct uci_option *opt;
    shash_t *lcaf_ht;
    shash_t *rlocs_ht;
    shash_t *rloc_set_ht;
    int uci_retries;
    char *uci_address;
    int uci_key_type;
    char *uci_key;
    int uci_proxy_reply;
    char *uci_iface;
    mapping_t *mapping;
    int uci_afi;
    int uci_priority;
    int uci_weigth;
    glist_t *no_addr_loct_list;

    /* CREATE AND CONFIGURE RTR (xTR in fact) */
    if (ctrl_dev_create(RTR_MODE, &ctrl_dev) != GOOD) {
        OOR_LOG(LCRIT, "Failed to create RTR. Aborting!");
        return (BAD);
    }

    xtr = CONTAINER_OF(ctrl_dev, lisp_xtr_t, super);

    /* FWD POLICY STRUCTURES */
    xtr->fwd_policy = fwd_policy_class_find("flow_balancing");
    xtr->fwd_policy_dev_parm = xtr->fwd_policy->new_dev_policy_inf(ctrl_dev,NULL);

    /* CREATE LCAFS HTABLE */

    /* get a hash table of all the elps. If any are configured,
     * their names could appear in the rloc field of database mappings
     * or static map cache entries  */
    lcaf_ht = parse_lcafs(ctx,pck);

    /* CREATE RLOCs sets HTABLE */
    no_addr_loct_list = glist_new_managed((glist_del_fct)no_addr_loct_del);
    rlocs_ht = parse_rlocs(ctx,pck,lcaf_ht,no_addr_loct_list);
    rloc_set_ht = parse_rloc_sets(ctx,pck,rlocs_ht,lcaf_ht);

    uci_foreach_element(&pck->sections, element) {
        sect = uci_to_section(element);
        if (strcmp(sect->type, "daemon") == 0){

            /* RETRIES */
            if (uci_lookup_option_string(ctx, sect, "map_request_retries") != NULL){
                uci_retries = strtol(uci_lookup_option_string(ctx, sect, "map_request_retries"),NULL,10);
                if (uci_retries >= 0 && uci_retries <= OOR_MAX_RETRANSMITS){
                    xtr->map_request_retries = uci_retries;
                }else if (uci_retries > OOR_MAX_RETRANSMITS){
                    xtr->map_request_retries = OOR_MAX_RETRANSMITS;
                    OOR_LOG(LWRN, "Map-Request retries should be between 0 and %d. "
                            "Using default value: %d",OOR_MAX_RETRANSMITS, OOR_MAX_RETRANSMITS);
                }
            }else{
                OOR_LOG(LWRN,"Configuration file: Map Request Retries not specified."
                        " Setting default value: %d sec.",DEFAULT_MAP_REQUEST_RETRIES);
                xtr->map_request_retries = DEFAULT_MAP_REQUEST_RETRIES;
                continue;
            }
        }

        /* RLOC PROBING CONFIG */

        if (strcmp(sect->type, "rloc-probing") == 0){
            if (uci_lookup_option_string(ctx, sect, "rloc_probe_interval") != NULL){
                xtr->probe_interval = strtol(uci_lookup_option_string(ctx, sect, "rloc_probe_interval"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: RLOC probe interval not specified."
                        " Disabling RLOC Probing");
                xtr->probe_interval = 0;
                continue;
            }
            if (uci_lookup_option_string(ctx, sect, "rloc_probe_retries") != NULL){
                xtr->probe_retries = strtol(uci_lookup_option_string(ctx, sect, "rloc_probe_retries"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: RLOC Probe Retries not specified."
                        " Setting default value: %d sec.",DEFAULT_RLOC_PROBING_RETRIES);
                xtr->probe_retries = DEFAULT_RLOC_PROBING_RETRIES;
            }
            if (uci_lookup_option_string(ctx, sect, "rloc_probe_retries_interval") != NULL){
                xtr->probe_retries_interval = strtol(uci_lookup_option_string(ctx, sect, "rloc_probe_retries_interval"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: RLOC Probe Retries Intervals not specified."
                        " Setting default value: %d sec.",DEFAULT_RLOC_PROBING_RETRIES_INTERVAL);
                xtr->probe_retries_interval = DEFAULT_RLOC_PROBING_RETRIES_INTERVAL;
            }

            validate_rloc_probing_parameters(&xtr->probe_interval,
                    &xtr->probe_retries, &xtr->probe_retries_interval);
            continue;
        }

        /* MAP-RESOLVER CONFIG */
        if (strcmp(sect->type, "map-resolver") == 0){
            opt  = uci_lookup_option(ctx, sect, "address");
            if (opt != NULL){
                uci_foreach_element(&(opt->v.list), elem_addr){
                    if (add_server(elem_addr->name, xtr->map_resolvers) != GOOD){
                        OOR_LOG(LCRIT,"Can't add %s Map Resolver.",elem_addr->name);
                    }else{
                        OOR_LOG(LDBG_1, "Added %s to map-resolver list", elem_addr->name);
                    }
                }
            }
            continue;
        }

        /* MAP-SERVER CONFIG */
        if (strcmp(sect->type, "map-server") == 0){

            uci_address = (char *)uci_lookup_option_string(ctx, sect, "address");
            if (uci_lookup_option_string(ctx, sect, "key_type") != NULL){
                uci_key_type = strtol(uci_lookup_option_string(ctx, sect, "key_type"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: No ket type assigned to the map server \"%s\"."
                        " Set default value: HMAC_SHA_1_96",uci_address);
                uci_key_type = HMAC_SHA_1_96;
            }
            uci_key = (char *)uci_lookup_option_string(ctx, sect, "key");

            if (strcmp(uci_lookup_option_string(ctx, sect, "proxy_reply"), "on") == 0){
                uci_proxy_reply = TRUE;
            }else{
                uci_proxy_reply = FALSE;
            }

            if (add_map_server(xtr->map_servers,uci_address,
                    uci_key_type,
                    uci_key,
                    uci_proxy_reply) != GOOD ){
                OOR_LOG(LCRIT, "Can't add %s Map Server.", uci_address);
            }else{
                OOR_LOG(LDBG_1, "Added %s to map-server list", uci_address);
            }
            continue;
        }

        /* STATIC MAP-CACHE CONFIG */
        if (strcmp(sect->type, "static-map-cache") == 0){
            mapping = parse_mapping(ctx,sect,&(xtr->super),rloc_set_ht,lcaf_ht,no_addr_loct_list,FALSE);
            if (mapping == NULL){
                OOR_LOG(LERR, "Can't add static Map Cache entry with EID prefix %s. Discarded ...",
                        uci_lookup_option_string(ctx, sect, "eid_prefix"));
                continue;
            }
            if (mcache_lookup_exact(xtr->map_cache, mapping_eid(mapping)) == NULL){
                if (tr_mcache_add_static_mapping(xtr, mapping) == GOOD){
                    OOR_LOG(LDBG_1, "Added static Map Cache entry with EID prefix %s in the database.",
                            lisp_addr_to_char(mapping_eid(mapping)));
                }else{
                    OOR_LOG(LERR, "Can't add static Map Cache entry with EID prefix %s. Discarded ...",
                            mapping_eid(mapping));
                    mapping_del(mapping);
                }
            }else{
                OOR_LOG(LERR, "Configuration file: Duplicated static Map Cache entry with EID prefix %s."
                        "Discarded ...",uci_lookup_option_string(ctx, sect, "eid_prefix"));
                mapping_del(mapping);
                continue;
            }
            continue;
        }

        /* INTERFACES CONFIG */
        if (strcmp(sect->type, "rtr-iface") == 0){
            uci_iface = (char *)uci_lookup_option_string(ctx, sect, "iface");

            if (uci_lookup_option_string(ctx, sect, "ip_version") != NULL){
                uci_afi = strtol(uci_lookup_option_string(ctx, sect, "ip_version"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: No IP version selected for the rtr-iface \"%s\"."
                        ,uci_iface);
                return (BAD);
            }
            if (uci_lookup_option_string(ctx, sect, "priority") != NULL){
                uci_priority = strtol(uci_lookup_option_string(ctx, sect, "priority"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: No priority assigned to the rtr-iface \"%s\"."
                        " Set default value: 10",uci_iface);
                uci_priority = 10;
            }
            if (uci_lookup_option_string(ctx, sect, "weight") != NULL){
                uci_weigth = strtol(uci_lookup_option_string(ctx, sect, "weight"),NULL,10);
            }else{
                OOR_LOG(LWRN,"Configuration file: No weight assigned to the rtr-iface \"%s\"."
                        " Set default value: 100",uci_iface);
                uci_weigth = 100;
            }
            if (add_rtr_iface(xtr,
                    uci_iface,
                    uci_afi,
                    uci_priority,
                    uci_weigth) == GOOD) {
                OOR_LOG(LDBG_1, "Configured interface %s for RTR",uci_iface);
            } else{
                OOR_LOG(LERR, "Can't configure iface %s for RTR",uci_iface);
            }
        }
    }

    /* destroy the hash table */
    shash_destroy(lcaf_ht);
    shash_destroy(rlocs_ht);
    shash_destroy(rloc_set_ht);
    glist_destroy(no_addr_loct_list);

    return(GOOD);
}

int
configure_ms(struct uci_context *ctx,struct uci_package *pck)
{
    lisp_ms_t *ms;
    struct uci_section *sect;
    struct uci_element *element;
    char *uci_iface;
    char *uci_eid_prefix;
    int uci_iid = 0;
    int uci_key_type;
    char *uci_key;
    uint8_t uci_more_specifics;
    uint8_t uci_proxy_reply;
    uint8_t uci_merge;
    mapping_t *mapping;
    lisp_site_prefix_t *site;
    shash_t *lcaf_ht;
    shash_t *rlocs_ht;
    shash_t *rloc_set_ht;
    glist_t *no_addr_loct_list;
    iface_t *iface;

    /* create and configure xtr */
    if (ctrl_dev_create(MS_MODE, &ctrl_dev) != GOOD) {
        OOR_LOG(LCRIT, "Failed to create MS. Aborting!");
        return (BAD);
    }
    ms = CONTAINER_OF(ctrl_dev, lisp_ms_t, super);

    /* create lcaf hash table */
    lcaf_ht = parse_lcafs(ctx,pck);

    /* CREATE RLOCs sets HTABLE */
    no_addr_loct_list = glist_new_managed((glist_del_fct)no_addr_loct_del);
    rlocs_ht = parse_rlocs(ctx,pck,lcaf_ht,no_addr_loct_list);
    rloc_set_ht = parse_rloc_sets(ctx,pck,rlocs_ht,lcaf_ht);

    uci_foreach_element(&pck->sections, element) {
        sect = uci_to_section(element);

        /* CONTROL INTERFACE */
        /* TODO: should work with all interfaces in the future */
        if (strcmp(sect->type, "ms_basic") == 0){
            uci_iface = (char *)uci_lookup_option_string(ctx, sect, "control_iface");
            if (uci_iface == NULL){
                OOR_LOG(LERR,"Configuration file: No control iface assigned");
                return(BAD);
            }
            if ((iface = add_interface(uci_iface))==NULL) {
                return(BAD);
            }

            if (iface_address(iface, AF_INET) == NULL){
                iface_setup_addr(iface, AF_INET);
                data_plane->datap_add_iface_addr(iface,AF_INET);
                lctrl->control_data_plane->control_dp_add_iface_addr(lctrl,iface,AF_INET);
            }

            if (iface_address(iface, AF_INET6) == NULL){
                iface_setup_addr(iface, AF_INET6);
                data_plane->datap_add_iface_addr(iface,AF_INET6);
                lctrl->control_data_plane->control_dp_add_iface_addr(lctrl,iface,AF_INET6);
            }
        }

        /* LISP-SITE CONFIG */
        if (strcmp(sect->type, "lisp-site") == 0){
            uci_eid_prefix = (char *)uci_lookup_option_string(ctx, sect, "eid_prefix");
            if (!uci_eid_prefix){
                OOR_LOG(LERR,"Configuration file: No eid_prefix assigned");
                return (BAD);
            }
            if (uci_lookup_option_string(ctx, sect, "key_type") != NULL){
                uci_key_type =  strtol(uci_lookup_option_string(ctx, sect, "key_type"),NULL,10);
            }else {
                OOR_LOG(LERR,"Configuration file: No key-type specified");
                return (BAD);
            }
            uci_key = (char *)uci_lookup_option_string(ctx, sect, "key");
            if (!uci_key){
                OOR_LOG(LERR,"Configuration file: Key could not be null");
                return (BAD);
            }

            if (uci_lookup_option_string(ctx, sect, "accept_more_specifics") != NULL &&
                    strcmp(uci_lookup_option_string(ctx, sect, "accept_more_specifics"), "on") == 0){
                uci_more_specifics = TRUE;
            }else{
                uci_more_specifics = FALSE;
            }
            if (uci_lookup_option_string(ctx, sect, "proxy_reply") != NULL &&
                    strcmp(uci_lookup_option_string(ctx, sect, "proxy_reply"), "on") == 0){
                uci_proxy_reply = TRUE;
            }else{
                uci_proxy_reply = FALSE;
            }
            if (uci_lookup_option_string(ctx, sect, "merge") != NULL &&
                    strcmp(uci_lookup_option_string(ctx, sect, "merge"), "on") == 0){
                uci_merge = TRUE;
            }else{
                uci_merge = FALSE;
            }
            if (uci_lookup_option_string(ctx, sect, "iid") == NULL){
                uci_iid = 0;
            }else{
                uci_iid = strtol(uci_lookup_option_string(ctx, sect, "iid"),NULL,10);
            }

            site = build_lisp_site_prefix(ms,
                    uci_eid_prefix,
                    uci_iid,
                    uci_key_type,
                    uci_key,
                    uci_more_specifics,
                    uci_proxy_reply,
                    uci_merge,
                    lcaf_ht);
            if (site) {
                OOR_LOG(LDBG_1, "Adding lisp site prefix %s to the lisp-sites "
                        "database", lisp_addr_to_char(site->eid_prefix));
                ms_add_lisp_site_prefix(ms, site);
            }else{
                OOR_LOG(LERR, "Can't add lisp-site prefix %s. Discarded ...",
                        uci_eid_prefix);
            }
        }

        /* LISP REGISTERED SITES CONFIG */
        if (strcmp(sect->type, "ms-static-registered-site") == 0){
            mapping = parse_mapping(ctx,sect,&(ms->super),rloc_set_ht,lcaf_ht,no_addr_loct_list,FALSE);
            if (mapping == NULL){
                OOR_LOG(LERR, "Can't create static register site for %s",
                        uci_lookup_option_string(ctx, sect, "eid_prefix"));
                continue;
            }
            if (mdb_lookup_entry_exact(ms->reg_sites_db, mapping_eid(mapping)) == NULL){
                if (ms_add_registered_site_prefix(ms, mapping) == GOOD){
                    OOR_LOG(LDBG_1, "Added static registered site for %s to the registered sites list!",
                                        lisp_addr_to_char(mapping_eid(mapping)));
                }else{
                    OOR_LOG(LERR, "Failed to add static registered site for %s to the registered sites list!",
                            lisp_addr_to_char(mapping_eid(mapping)));
                    mapping_del(mapping);
                }
            }else{
                OOR_LOG(LERR, "Configuration file: Duplicated static registered site for %s. Discarded ...",
                        uci_lookup_option_string(ctx, sect, "eid_prefix"));
                mapping_del(mapping);
                continue;
            }
            continue;
        }
    }

    /* destroy the hash table */
    shash_destroy(lcaf_ht);
    shash_destroy(rlocs_ht);
    shash_destroy(rloc_set_ht);
    glist_destroy(no_addr_loct_list);

    return(GOOD);
}

static mapping_t*
parse_mapping(struct uci_context *ctx, struct uci_section *sect,
        oor_ctrl_dev_t *dev, shash_t *rloc_set_ht, shash_t *lcaf_ht,
        glist_t *no_addr_loct_l, uint8_t is_local)
{
    mapping_t *map;
    locator_t *loct;
    locator_t *aux_loct;
    glist_t *addr_list;
    lisp_addr_t *eid_prefix, *ip_eid_prefix;
    char *uci_eid;
    char *uci_rloc_set;
    int uci_iid,iidmlen;
    glist_t *rloc_list;
    glist_entry_t *it;
    lisp_xtr_t *xtr;

    switch (dev->mode){
    case xTR_MODE:
    case MN_MODE:
        xtr  = CONTAINER_OF(ctrl_dev, lisp_xtr_t, super);
        break;
    default:
        break;
    }

    uci_eid = (char *)uci_lookup_option_string(ctx, sect, "eid_prefix");

    uci_rloc_set = (char *)uci_lookup_option_string(ctx, sect, "rloc_set");
    if (uci_eid == NULL || uci_rloc_set == NULL){
        return (NULL);
    }
    /* Check if the rloc-set exists */
    rloc_list = (glist_t *)shash_lookup(rloc_set_ht,uci_rloc_set);
    if (rloc_list == NULL){
        OOR_LOG(LWRN,"Configuration file: The rloc set %s doesn't exist", uci_rloc_set);
        return (NULL);
    }
    /* Get EID prefix */
    addr_list = parse_lisp_addr(uci_eid, lcaf_ht);
    if (addr_list == NULL || glist_size(addr_list) != 1){
        return (NULL);
    }
    ip_eid_prefix = (lisp_addr_t *)glist_first_data(addr_list);
    pref_conv_to_netw_pref(ip_eid_prefix);

    if (uci_lookup_option_string(ctx, sect, "iid") == NULL){
        uci_iid = 0;
    }else{
        uci_iid = strtol(uci_lookup_option_string(ctx, sect, "iid"),NULL,10);
    }
    if (uci_iid > MAX_IID || uci_iid < 0) {
        OOR_LOG(LERR, "Configuration file: Instance ID %d out of range [0..%d], "
                "disabling...",uci_iid, MAX_IID);
        uci_iid = 0;
    }
    if (uci_iid > 0){
        iidmlen = (lisp_addr_ip_afi(ip_eid_prefix) == AF_INET) ? 32: 128;
        eid_prefix = lisp_addr_new_init_iid(uci_iid, ip_eid_prefix, iidmlen);
    }else{
        eid_prefix = lisp_addr_clone(ip_eid_prefix);
    }

    /* Create mapping */
    if ( is_local){
        map = mapping_new_init(eid_prefix);
        if (map != NULL){
            mapping_set_ttl(map, DEFAULT_DATA_CACHE_TTL);
            mapping_set_auth(map, 1);
        }
    }else{
        map = mapping_new_init(eid_prefix);
    }

    /* no need for the prefix */
    lisp_addr_del(eid_prefix);
    glist_destroy(addr_list);

    if (map == NULL){
        return (NULL);
    }

    /* Add the locators of the rloc-set to the mapping */
    glist_for_each_entry(it,rloc_list){
        aux_loct = (locator_t*)glist_entry_data(it);
        loct = clone_customize_locator(dev,aux_loct,no_addr_loct_l,is_local);
        if (loct == NULL){
            continue;
        }
        if (mapping_add_locator(map, loct) != GOOD){
            if (xtr != NULL && is_local){
                iface_locators_unattach_locator(xtr->iface_locators_table,loct);
            }
            locator_del(loct);
            continue;
        }

    }

    return(map);
}

static shash_t *
parse_rlocs(struct uci_context *ctx, struct uci_package *pck, shash_t *lcaf_ht,
        glist_t *no_addr_loct_l)
{
    struct uci_section *section;
    struct uci_element *element;
    shash_t *rlocs_ht;
    locator_t *locator;
    glist_t *addr_list;
    lisp_addr_t *address;
    iface_t *iface;
    char *uci_rloc_name;
    char *uci_address;
    char *uci_iface_name;
    int uci_afi;
    int uci_priority;
    int uci_weight;
    int afi;
    no_addr_loct *nloct;

    /* create lcaf hash table */
    rlocs_ht = shash_new_managed((free_value_fn_t)locator_del);

    uci_foreach_element(&pck->sections, element) {
        section = uci_to_section(element);

        if (strcmp(section->type, "rloc-address") == 0){
            uci_rloc_name = (char *)uci_lookup_option_string(ctx, section, "name");
            uci_address = (char *)uci_lookup_option_string(ctx, section, "address");
            if (uci_lookup_option_string(ctx, section, "priority") == NULL){
                OOR_LOG(LERR,"Configuration file: No priority assigned to the rloc \"%s\"",uci_rloc_name);
                return (BAD);
            }
            uci_priority = strtol(uci_lookup_option_string(ctx, section, "priority"),NULL,10);
            if (uci_lookup_option_string(ctx, section, "weight") == NULL){
                OOR_LOG(LERR,"Configuration file: No weight assigned to the rloc \"%s\"",uci_rloc_name);
                return (BAD);
            }
            uci_weight = strtol(uci_lookup_option_string(ctx, section, "weight"),NULL,10);

            if (validate_priority_weight(uci_priority, uci_weight) != GOOD) {
                continue;
            }
            if (shash_lookup(rlocs_ht,uci_rloc_name) != NULL){
                OOR_LOG(LDBG_1,"Configuration file: The RLOC %s is duplicated. Discarding ...", uci_rloc_name);
                continue;
            }
            addr_list = parse_lisp_addr(uci_address, lcaf_ht);
            if (addr_list == NULL || glist_size(addr_list) == 0){
                continue;
            }
            if (glist_size(addr_list) > 1){
                OOR_LOG(LDBG_1,"Configuration file: With OpenWrt, RLOCs configured with FQDN address "
                        "only use the first IP of the DNS resolution.");
            }
            address = (lisp_addr_t *)glist_first_data(addr_list);

            if (lisp_addr_lafi(address) == LM_AFI_IPPREF){
                OOR_LOG(LERR, "Configuration file: RLOC address can not be a prefix: %s ",
                        lisp_addr_to_char(address));
                continue;
            }

            /* Create a basic locator. Locaor or remote information will be added later according
             * who is using the locator*/
            locator = locator_new_init(address,UP,1,1,uci_priority,uci_weight,255,0);
            if (locator != NULL){
                shash_insert(rlocs_ht, strdup(uci_rloc_name), locator);
            }
            lisp_addr_del(address);
        }

        if (strcmp(section->type, "rloc-iface") == 0){
            uci_rloc_name = (char *)uci_lookup_option_string(ctx, section, "name");
            uci_iface_name = (char *)uci_lookup_option_string(ctx, section, "interface");
            if (uci_lookup_option_string(ctx, section, "ip_version") == NULL){
                OOR_LOG(LERR,"Configuration file: No afi assigned to the rloc \"%s\"",uci_rloc_name);
                return (BAD);
            }
            uci_afi = strtol(uci_lookup_option_string(ctx, section, "ip_version"),NULL,10);
            if (uci_lookup_option_string(ctx, section, "priority") == NULL){
                OOR_LOG(LERR,"Configuration file: No priority assigned to the rloc \"%s\"",uci_rloc_name);
                return (BAD);
            }
            uci_priority = strtol(uci_lookup_option_string(ctx, section, "priority"),NULL,10);
            if (uci_lookup_option_string(ctx, section, "weight") == NULL){
                OOR_LOG(LERR,"Configuration file: No weight assigned to the rloc \"%s\"",uci_rloc_name);
                return (BAD);
            }
            uci_weight = strtol(uci_lookup_option_string(ctx, section, "weight"),NULL,10);

            if (validate_priority_weight(uci_priority, uci_weight) != GOOD) {
                continue;
            }

            if (uci_afi != 4 && uci_afi !=6){
                OOR_LOG(LERR, "Configuration file: The afi of the locator should be \"4\" (IPv4)"
                        " or \"6\" (IPv6)");
                return (NULL);
            }

            if (shash_lookup(rlocs_ht,uci_rloc_name) != NULL){
                OOR_LOG(LDBG_1,"Configuration file: The RLOC %s is duplicated. Discarding ...", uci_rloc_name);
                continue;
            }

            /* Find the interface */
            if (!(iface = get_interface(uci_iface_name))) {
                if (!(iface = add_interface(uci_iface_name))) {
                    return (BAD);
                }
            }

            if (uci_afi == 4){
                if (iface_address(iface, AF_INET) == NULL){
                    /* Configure address of the interface */
                    iface_setup_addr(iface, AF_INET);
                    data_plane->datap_add_iface_addr(iface,AF_INET);
                    lctrl->control_data_plane->control_dp_add_iface_addr(lctrl,iface,AF_INET);
                }
                address = iface->ipv4_address;
                afi = AF_INET;
            }else{
                if (iface_address(iface, AF_INET6) == NULL){
                    /* Configure address of the interface */
                    iface_setup_addr(iface, AF_INET6);
                    data_plane->datap_add_iface_addr(iface,AF_INET6);
                    lctrl->control_data_plane->control_dp_add_iface_addr(lctrl,iface,AF_INET6);
                }
                address = iface->ipv6_address;
                afi = AF_INET6;
            }

            /* Create a basic locator. Locaor or remote information will be added later according
             * who is using the locator*/
            locator = locator_new_init(address,UP,1,1,uci_priority,uci_weight,255,0);
            if (locator != NULL){
                shash_insert(rlocs_ht, strdup(uci_rloc_name), locator);
            }
            /* If iface is not initialized, modify addres of the aux locator indicating the IP afi.
             * This information will be used during the process of association of the cloned locator
             * with the iface */
            if (lisp_addr_is_no_addr(address)){
                nloct = no_addr_loct_new_init(locator, uci_iface_name, afi);
                glist_add(nloct,no_addr_loct_l);
            }
        }
    }

    return (rlocs_ht);
}

static shash_t *
parse_rloc_sets(struct uci_context *ctx, struct uci_package *pck, shash_t *rlocs_ht,
        shash_t *lcaf_ht)
{
    struct uci_section *section;
    struct uci_element *element;
    struct uci_element *element_loct;
    struct uci_option *opt;
    char *uci_rloc_set_name;
    shash_t *rloc_sets_ht;
    glist_t *rloc_list;
    locator_t *loct;

    /* create lcaf hash table */
    rloc_sets_ht = shash_new_managed((free_value_fn_t)glist_destroy);

    uci_foreach_element(&pck->sections, element) {
        section = uci_to_section(element);

        if (strcmp(section->type, "rloc-set") == 0){
            uci_rloc_set_name = (char *)uci_lookup_option_string(ctx, section, "name");
            if (uci_rloc_set_name == NULL){
                continue;
            }
            rloc_list = (glist_t*)shash_lookup(rloc_sets_ht,uci_rloc_set_name);
            if (rloc_list == NULL){
                rloc_list = glist_new();
                if (rloc_list != NULL){
                    shash_insert(rloc_sets_ht, strdup(uci_rloc_set_name), rloc_list);
                }else{
                    OOR_LOG(LWRN, "parse_rloc_sets: Error creating rloc list");
                    continue;
                }
            }else{
                OOR_LOG(LWRN, "Configuration file: The RLOC set %s is duplicated. Discarding... ",
                        uci_rloc_set_name);
                continue;
            }
            opt  = uci_lookup_option(ctx, section, "rloc_name");
            if (opt != NULL){
                uci_foreach_element(&(opt->v.list), element_loct){
                    loct = shash_lookup(rlocs_ht, element_loct->name);
                    if (loct == NULL){
                        OOR_LOG(LWRN,"Configuration file: The RLOC name %s of the RLOC set %s doesn't exist",
                                element_loct->name, uci_rloc_set_name);
                        continue;
                    }

                    if (glist_add_tail(loct,rloc_list)!=GOOD){
                        OOR_LOG(LDBG_1,"parse_rloc_sets: Error adding locator to the rloc-set");
                    }
                }
            }else{
                OOR_LOG(LWRN, "Configuration file: The RLOC set %s has no rlocs "
                        "associated.",uci_rloc_set_name);
            }

        }
    }

    return (rloc_sets_ht);
}

static shash_t *
parse_lcafs(struct uci_context *ctx, struct uci_package *pck)
{
    struct uci_section *section;
    struct uci_element *element;
    shash_t *lcaf_ht;

    /* create lcaf hash table */
    lcaf_ht = shash_new_managed((free_value_fn_t)lisp_addr_del);

    uci_foreach_element(&pck->sections, element) {
        section = uci_to_section(element);

        if (strcmp(section->type, "elp-node") == 0){
            parse_elp_node(ctx,section,lcaf_ht);
        }
    }

    //parse_rle_list(cfg, lcaf_ht);
    //parse_mcinfo_list(cfg, lcaf_ht);

    return(lcaf_ht);
}

static int
parse_elp_node(struct uci_context *ctx, struct uci_section *section, shash_t *ht)
{
    char *uci_elp_name;
    char *uci_address;
    lisp_addr_t *laddr;
    elp_node_t *elp_node;

    uci_elp_name = (char *)uci_lookup_option_string(ctx, section, "elp_name");
    laddr = (lisp_addr_t *)shash_lookup(ht, uci_elp_name);

    if (laddr == NULL){
        laddr = lisp_addr_elp_new();
        if (laddr == NULL){
            OOR_LOG(LWRN,"parse_elp_node: Couldn't create ELP address");
            return (BAD);
        }
        shash_insert(ht, strdup(uci_elp_name), laddr);
        OOR_LOG(LDBG_3,"parse_elp_node: Added ELP %s to the hash table of LCAF addresses",uci_elp_name);
    }else {
        if (lisp_addr_is_elp(laddr) == FALSE){
            OOR_LOG(LWRN,"Configuration file: Address %s composed of LCAF addresses of different type",
                    uci_elp_name);
            return (BAD);
        }
    }

    elp_node = xzalloc(sizeof(elp_node_t));
    elp_node->addr = lisp_addr_new();

    uci_address = (char *)uci_lookup_option_string(ctx, section, "address");

    if (lisp_addr_ip_from_char(uci_address, elp_node->addr) != GOOD) {
        elp_node_del(elp_node);
        OOR_LOG(LDBG_1, "parse_elp_list: Couldn't parse ELP node %s",
                uci_address);
        return (BAD);
    }

    if (strcmp(uci_lookup_option_string(ctx, section, "strict"), "on") == 0){
        elp_node->S = TRUE;
    }else{
        elp_node->S = FALSE;
    }

    if (strcmp(uci_lookup_option_string(ctx, section, "probe"), "on") == 0){
        elp_node->P = TRUE;
    }else{
        elp_node->P = FALSE;
    }

    if (strcmp(uci_lookup_option_string(ctx, section, "lookup"), "on") == 0){
        elp_node->L = TRUE;
    }else{
        elp_node->L = FALSE;
    }

    elp_add_node(lcaf_elp_get_elp(lisp_addr_get_lcaf(laddr)),elp_node);
    OOR_LOG(LDBG_3,"parse_elp_node: Added %s to the ELP %s",uci_address,uci_elp_name);

    return (GOOD);
}

redpajama_set_name: RedPajamaGithub


text:
Miejscowości w Kanada:
 New Carlisle – miejscowość w prowincji Quebec, w regionie Gaspésie–Îles-de-la-Madeleine

Miejscowości w USA:
 New Carlisle – miejscowość w stanie Indiana, w hrabstwie St. Joseph
 New Carlisle – miasto w stanie Ohio, w hrabstwie Clark