• Stars
    star
    2
  • Language
  • License
    Apache License 2.0
  • Created about 4 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

<!DOCTYPE html> <html> <head> <title>Biblioteca</title> </head> <body> <pre style='color:#d1d1d1;background:#000000;'><span style='color:#008073; '>&lt;!DOCTYPE html></span> <span style='color:#ff8906; '>&lt;</span><span style='color:#e66170; font-weight:bold; '>html</span><span style='color:#ff8906; '>></span> <span style='color:#ff8906; '>&lt;</span><span style='color:#e66170; font-weight:bold; '>head</span><span style='color:#ff8906; '>></span> <span style='color:#ff8906; '>&lt;</span><span style='color:#e66170; font-weight:bold; '>title</span><span style='color:#ff8906; '>></span>Biblioteca<span style='color:#ff8906; '>&lt;/</span><span style='color:#e66170; font-weight:bold; '>title</span><span style='color:#ff8906; '>></span> <span style='color:#ff8906; '>&lt;/</span><span style='color:#e66170; font-weight:bold; '>head</span><span style='color:#ff8906; '>></span> <span style='color:#ff8906; '>&lt;</span><span style='color:#e66170; font-weight:bold; '>body</span><span style='color:#ff8906; '>></span> <span style='color:#ff8906; '>&lt;</span><span style='color:#e66170; font-weight:bold; '>h2</span> id<span style='color:#d2cd86; '>=</span><span style='color:#00c4c4; '>"fly"</span><span style='color:#ff8906; '>></span>White flag Juan Angel / Montevideo Uruguay<span style='color:#ff8906; '>&lt;/</span><span style='color:#e66170; font-weight:bold; '>h2</span><span style='color:#ff8906; '>></span> <span style='color:#ff8906; '>&lt;</span><span style='color:#e66170; font-weight:bold; '>script</span> type<span style='color:#d2cd86; '>=</span><span style='color:#00c4c4; '>"text/javascript"</span><span style='color:#ff8906; '>></span> message <span style='color:#d2cd86; '>=</span> document<span style='color:#d2cd86; '>.</span>getElementById<span style='color:#d2cd86; '>(</span><span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>fly</span><span style='color:#02d045; '>"</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>.</span>innerHTML<span style='color:#b060b0; '>;</span> distance <span style='color:#d2cd86; '>=</span> <span style='color:#008c00; '>50</span><span style='color:#b060b0; '>;</span> speed <span style='color:#d2cd86; '>=</span> <span style='color:#008c00; '>200</span><span style='color:#b060b0; '>;</span> <span style='color:#e66170; font-weight:bold; '>var</span> txt<span style='color:#d2cd86; '>=</span><span style='color:#02d045; '>"</span><span style='color:#02d045; '>"</span><span style='color:#d2cd86; '>,</span> num<span style='color:#d2cd86; '>=</span><span style='color:#008c00; '>0</span><span style='color:#d2cd86; '>,</span> num4<span style='color:#d2cd86; '>=</span><span style='color:#008c00; '>0</span><span style='color:#d2cd86; '>,</span> flyofle<span style='color:#d2cd86; '>=</span><span style='color:#02d045; '>"</span><span style='color:#02d045; '>"</span><span style='color:#d2cd86; '>,</span> flyofwi<span style='color:#d2cd86; '>=</span><span style='color:#02d045; '>"</span><span style='color:#02d045; '>"</span><span style='color:#d2cd86; '>,</span> flyofto<span style='color:#d2cd86; '>=</span><span style='color:#02d045; '>"</span><span style='color:#02d045; '>"</span><span style='color:#d2cd86; '>,</span> fly<span style='color:#d2cd86; '>=</span>document<span style='color:#d2cd86; '>.</span>getElementById<span style='color:#d2cd86; '>(</span><span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>fly</span><span style='color:#02d045; '>"</span><span style='color:#d2cd86; '>)</span><span style='color:#b060b0; '>;</span> <span style='color:#e66170; font-weight:bold; '>function</span> stfly<span style='color:#d2cd86; '>(</span><span style='color:#d2cd86; '>)</span> <span style='color:#b060b0; '>{</span> <span style='color:#e66170; font-weight:bold; '>for</span><span style='color:#d2cd86; '>(</span>i<span style='color:#d2cd86; '>=</span><span style='color:#008c00; '>0</span><span style='color:#b060b0; '>;</span>i <span style='color:#d2cd86; '>!=</span> message<span style='color:#d2cd86; '>.</span><span style='color:#e66170; font-weight:bold; '>length</span><span style='color:#b060b0; '>;</span>i<span style='color:#d2cd86; '>++</span><span style='color:#d2cd86; '>)</span> <span style='color:#b060b0; '>{</span> <span style='color:#e66170; font-weight:bold; '>if</span><span style='color:#d2cd86; '>(</span>message<span style='color:#d2cd86; '>.</span><span style='color:#e66170; font-weight:bold; '>charAt</span><span style='color:#d2cd86; '>(</span>i<span style='color:#d2cd86; '>)</span> <span style='color:#d2cd86; '>!=</span> <span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>$</span><span style='color:#02d045; '>"</span><span style='color:#d2cd86; '>)</span> txt <span style='color:#d2cd86; '>+=</span> <span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>&lt;span style='position:relative;visibility:hidden;' id='n</span><span style='color:#02d045; '>"</span><span style='color:#d2cd86; '>+</span>i<span style='color:#d2cd86; '>+</span><span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>'></span><span style='color:#02d045; '>"</span><span style='color:#d2cd86; '>+</span>message<span style='color:#d2cd86; '>.</span><span style='color:#e66170; font-weight:bold; '>charAt</span><span style='color:#d2cd86; '>(</span>i<span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>+</span><span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>&lt;\/span></span><span style='color:#02d045; '>"</span><span style='color:#b060b0; '>;</span> <span style='color:#e66170; font-weight:bold; '>else</span> txt <span style='color:#d2cd86; '>+=</span> <span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>&lt;br></span><span style='color:#02d045; '>"</span><span style='color:#b060b0; '>;</span> <span style='color:#b060b0; '>}</span> fly<span style='color:#d2cd86; '>.</span>innerHTML <span style='color:#d2cd86; '>=</span> txt<span style='color:#b060b0; '>;</span> txt <span style='color:#d2cd86; '>=</span> <span style='color:#02d045; '>"</span><span style='color:#02d045; '>"</span><span style='color:#b060b0; '>;</span> flyofle <span style='color:#d2cd86; '>=</span> fly<span style='color:#d2cd86; '>.</span>offsetLeft<span style='color:#b060b0; '>;</span> flyofwi <span style='color:#d2cd86; '>=</span> fly<span style='color:#d2cd86; '>.</span>offsetWidth<span style='color:#b060b0; '>;</span> flyofto <span style='color:#d2cd86; '>=</span> fly<span style='color:#d2cd86; '>.</span>offsetTop<span style='color:#b060b0; '>;</span> fly2b<span style='color:#d2cd86; '>(</span><span style='color:#d2cd86; '>)</span><span style='color:#b060b0; '>;</span> <span style='color:#b060b0; '>}</span> <span style='color:#e66170; font-weight:bold; '>function</span> fly2b<span style='color:#d2cd86; '>(</span><span style='color:#d2cd86; '>)</span> <span style='color:#b060b0; '>{</span> <span style='color:#e66170; font-weight:bold; '>if</span><span style='color:#d2cd86; '>(</span>num4 <span style='color:#d2cd86; '>!=</span> message<span style='color:#d2cd86; '>.</span><span style='color:#e66170; font-weight:bold; '>length</span><span style='color:#d2cd86; '>)</span> <span style='color:#b060b0; '>{</span> <span style='color:#e66170; font-weight:bold; '>if</span><span style='color:#d2cd86; '>(</span>message<span style='color:#d2cd86; '>.</span><span style='color:#e66170; font-weight:bold; '>charAt</span><span style='color:#d2cd86; '>(</span>num4<span style='color:#d2cd86; '>)</span> <span style='color:#d2cd86; '>!=</span> <span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>$</span><span style='color:#02d045; '>"</span><span style='color:#d2cd86; '>)</span> <span style='color:#b060b0; '>{</span> <span style='color:#e66170; font-weight:bold; '>var</span> then <span style='color:#d2cd86; '>=</span> document<span style='color:#d2cd86; '>.</span>getElementById<span style='color:#d2cd86; '>(</span><span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>n</span><span style='color:#02d045; '>"</span> <span style='color:#d2cd86; '>+</span> num4<span style='color:#d2cd86; '>)</span><span style='color:#b060b0; '>;</span> then<span style='color:#d2cd86; '>.</span>style<span style='color:#d2cd86; '>.</span>left <span style='color:#d2cd86; '>=</span> flyofle <span style='color:#d2cd86; '>-</span> then<span style='color:#d2cd86; '>.</span>offsetLeft <span style='color:#d2cd86; '>+</span> flyofwi <span style='color:#02d045; '>/</span><span style='color:#00c4c4; '> 2 </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '> 'px';</span> <span style='color:#00c4c4; '>then</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>top = flyofto - then</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>offsetTop </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '> distance </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '> 'px';</span> <span style='color:#00c4c4; '>fly3</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>then</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>id, parseInt</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>then</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>left</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '>, parseInt</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>then</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>left</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> / 5, parseInt</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>then</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>top</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '>, parseInt</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>then</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>top</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> / 5</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '>;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;}</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;num4</span><span style='color:#d2cd86; '>+</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;setTimeout</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>"fly2b</span><span style='color:#d2cd86; '>(</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '>", speed</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '>;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;}</span> <span style='color:#00c4c4; '>}</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>function fly3</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>target,lef2,num2,top2,num3</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> {</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;if</span><span style='color:#d2cd86; '>(</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>Math</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>floor</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>top2</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> != 0 &amp;&amp; Math</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>floor</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>top2</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> != -1</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> </span><span style='color:#b060b0; '>|</span><span style='color:#b060b0; '>|</span><span style='color:#00c4c4; '> </span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>Math</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>floor</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>lef2</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> != 0 &amp;&amp; Math</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>floor</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>lef2</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> != -1</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> {</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;if</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>lef2 >= 0</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;lef2 -= num2;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;else</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;lef2 </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>= num2 </span><span style='color:#d2cd86; '>*</span><span style='color:#00c4c4; '> -1;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;if</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>Math</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>floor</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>lef2</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> != -1</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> {</span> <span style='color:#00c4c4; '>document</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>getElementById</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>target</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>visibility = "visible";</span> <span style='color:#00c4c4; '>document</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>getElementById</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>target</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>left = Math</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>floor</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>lef2</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '> 'px';</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;} else {</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;document</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>getElementById</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>target</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>visibility = "visible";</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;document</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>getElementById</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>target</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>left = Math</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>floor</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>lef2 </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '> 1</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '> 'px';</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;}</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;if</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>lef2 >= 0</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;top2 -= num3</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;else</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;top2 </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>= num3 </span><span style='color:#d2cd86; '>*</span><span style='color:#00c4c4; '> -1;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;if</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>Math</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>floor</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>top2</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> != -1</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;document</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>getElementById</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>target</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>top = Math</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>floor</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>top2</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '> 'px';</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;else</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;document</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>getElementById</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>target</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>style</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>top = Math</span><span style='color:#d2cd86; '>.</span><span style='color:#00c4c4; '>floor</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>top2 </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '> 1</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '> </span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '> 'px';</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;setTimeout</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>"fly3</span><span style='color:#d2cd86; '>(</span><span style='color:#00c4c4; '>'"</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>target</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>"',"</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>lef2</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>","</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>num2</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>","</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>top2</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>","</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>num3</span><span style='color:#d2cd86; '>+</span><span style='color:#00c4c4; '>"</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '>",50</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;}</span> <span style='color:#00c4c4; '>}</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>stfly</span><span style='color:#d2cd86; '>(</span><span style='color:#d2cd86; '>)</span><span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>&lt;</span><span style='color:#02d045; '>/</span>script<span style='color:#d2cd86; '>></span> <span style='color:#d2cd86; '>&lt;</span>h2<span style='color:#d2cd86; '>></span>LIBRARY SSH<span style='color:#d2cd86; '>&lt;</span><span style='color:#d2cd86; '>/</span>h2<span style='color:#d2cd86; '>></span> <span style='color:#d2cd86; '>&lt;</span>strong<span style='color:#d2cd86; '>></span><span style='color:#d2cd86; '>&lt;</span>h1<span style='color:#d2cd86; '>></span>libssh <span style='color:#009f00; '>0.8</span><span style='color:#d2cd86; '>.</span><span style='color:#008c00; '>90</span><span style='color:#d2cd86; '>&lt;</span><span style='color:#d2cd86; '>/</span>h1<span style='color:#d2cd86; '>></span><span style='color:#d2cd86; '>&lt;</span><span style='color:#d2cd86; '>/</span>strong<span style='color:#d2cd86; '>></span><span style='color:#d2cd86; '>&lt;</span>br <span style='color:#d2cd86; '>/</span><span style='color:#d2cd86; '>></span> <span style='color:#d2cd86; '>&lt;</span>p<span style='color:#d2cd86; '>></span> <span style='color:#d2cd86; '>&lt;</span>button<span style='color:#d2cd86; '>></span><span style='color:#d2cd86; '>&lt;</span>li<span style='color:#d2cd86; '>></span>La biblioteca SSH<span style='color:#d2cd86; '>&lt;</span><span style='color:#d2cd86; '>/</span>li<span style='color:#d2cd86; '>></span><span style='color:#d2cd86; '>&lt;</span><span style='color:#d2cd86; '>/</span>button<span style='color:#d2cd86; '>></span> <span style='color:#d2cd86; '>&lt;</span>button<span style='color:#d2cd86; '>></span><span style='color:#d2cd86; '>&lt;</span>i<span style='color:#d2cd86; '>></span>PAGINA PRINCIPAL<span style='color:#d2cd86; '>&lt;</span><span style='color:#d2cd86; '>/</span>li<span style='color:#d2cd86; '>></span><span style='color:#d2cd86; '>&lt;</span><span style='color:#d2cd86; '>/</span>button<span style='color:#d2cd86; '>></span> <span style='color:#d2cd86; '>&lt;</span>button<span style='color:#d2cd86; '>></span><span style='color:#d2cd86; '>&lt;</span>li<span style='color:#d2cd86; '>></span>PÁGINAS RELACIONADAS<span style='color:#d2cd86; '>&lt;</span><span style='color:#d2cd86; '>/</span>li<span style='color:#d2cd86; '>></span><span style='color:#d2cd86; '>&lt;</span><span style='color:#d2cd86; '>/</span>button<span style='color:#d2cd86; '>></span> <span style='color:#d2cd86; '>&lt;</span>button<span style='color:#d2cd86; '>></span><span style='color:#d2cd86; '>&lt;</span>li<span style='color:#d2cd86; '>></span>M�<span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>DULOS&lt;/li>&lt;/button></span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&lt;button>&lt;li>ESTRUCTURAS DE DATOS&lt;/li>&lt;/button></span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&lt;button>&lt;li>ARCHIVOS&lt;/li>&lt;/button></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&lt;/p></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&lt;ul></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&lt;button>&lt;h3> incluir &lt;/h3>&lt;/button></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&lt;button>&lt;h3> libssh &lt;/h3>&lt;/button></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&lt;button>&lt;h3> libssh.h &lt;/h3>&lt;/button></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&lt;br /></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&lt;/ul> </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;  &lt;small>Esta biblioteca es software gratuito; </span> <span style='color:#00c4c4; '>puedes redistribuirlo y / o</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>7   * modificarlo según los términos del GNU Lesser General Public</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>8   * Licencia publicada por la Free Software Foundation; ya sea</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>9   * versión 2.1 de la Licencia, o (a su elección) </span> <span style='color:#00c4c4; '>cualquier versión posterior.</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>10  *</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>11  * Esta biblioteca se distribuye con la esperanza de que sea útil,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>12  * pero SIN NINGUNA GARANTÍA; sin siquiera la garantía implícita de</span> <span style='color:#00c4c4; '> </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>21  #ifndef _LIBSSH_H</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>22  #define _LIBSSH_H</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>23 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>24  #si está definido _WIN32 || definido __CYGWIN__</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>25   #ifdef LIBSSH_STATIC</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>26   #define LIBSSH_API</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>27   #más</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>28   #ifdef LIBSSH_EXPORTS</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>29   #ifdef __GNUC__</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>30   #define LIBSSH_API __attribute __ ((dllexport))</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>31   #más</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>32   #define LIBSSH_API __declspec (dllexport)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>33   #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>34   #más</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>35   #ifdef __GNUC__</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>36   #define LIBSSH_API __attribute __ ((dllimport))</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>37   #más</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>38   #define LIBSSH_API __declspec (dllimport)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>39   #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>40   #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>41   #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>42  #más</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>43   #if __GNUC__> = 4 &amp;&amp;! Definido (__ OS2__)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>44   #define LIBSSH_API __attribute __ </span> <span style='color:#00c4c4; '>((visibilidad (</span><span style='color:#02d045; '>"</span>predeterminado<span style='color:#02d045; '>"</span><span style='color:#00c4c4; '>)))</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>45   #más</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>46   #define LIBSSH_API</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>47   #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>48  #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>49 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>50  #ifdef _MSC_VER</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>51   / * Visual Studio no tiene inttypes.h </span> <span style='color:#00c4c4; '>así que no conoce uint32_t * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>52   typedef int int32_t;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>53   typedef unsigned int uint32_t;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>54   typedef unsigned short uint16_t;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>55   typedef unsigned char uint8_t;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>56   typedef unsigned long long uint64_t;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>57   typedef int mode_t;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>58  #else / * _MSC_VER * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>59   #include &lt;unistd.h></span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>60   #include &lt;inttypes.h></span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>61   #include &lt;sys / types.h></span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>62  #endif / * _MSC_VER * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>63 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>64  #ifdef _WIN32</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>65   #include &lt;winsock2.h></span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>66  #else / * _WIN32 * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>67  #include &lt;sys / select.h> / * para fd_set * * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>68  #include &lt;netdb.h></span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>69  #endif / * _WIN32 * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>70 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>71  #define SSH_STRINGIFY (s) SSH_TOSTRING (s)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>72  #define SSH_TOSTRING (s) #s</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>73 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>74  / * macros de versión libssh * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>75  #define SSH_VERSION_INT (a, b, c) ((a) &lt;&lt; 16 | (b) &lt;&lt; 8 | (c))</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>76  #define SSH_VERSION_DOT (a, b, c) a ##. ## b ##. ## c</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>77  #define SSH_VERSION (a, b, c) SSH_VERSION_DOT (a, b, c)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>78 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>79  / * versión libssh * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>80  #define LIBSSH_VERSION_MAJOR 0</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>81  #define LIBSSH_VERSION_MINOR 8</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>82  #define LIBSSH_VERSION_MICRO 90</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>83 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>84  #define LIBSSH_VERSION_INT SSH_VERSION_INT </span> <span style='color:#00c4c4; '>(LIBSSH_VERSION_MAJOR, \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>85   LIBSSH_VERSION_MINOR, \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>86   LIBSSH_VERSION_MICRO)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>87  #define LIBSSH_VERSION SSH_VERSION (LIBSSH_VERSION_MAJOR, \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>88   LIBSSH_VERSION_MINOR, \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>89   LIBSSH_VERSION_MICRO)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>90 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>91  / * GCC tiene verificación de atributo de </span> <span style='color:#00c4c4; '>tipo printf. * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>92  #ifdef __GNUC__</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>93  #define PRINTF_ATTRIBUTE (a, b) __attribute__ </span> <span style='color:#00c4c4; '>((__format__ (__printf__, a, b)))</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>94  #más</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>95  #define PRINTF_ATTRIBUTE (a, b)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>96  #endif / * __GNUC__ * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>97 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>98  #ifdef __GNUC__</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>99  #define SSH_DEPRECATED __attribute__ ((obsoleto))</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>100  #más</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>101  #define SSH_DEPRECATED</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>102  #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>103 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>104  #ifdef __cplusplus</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>105  externa </span><span style='color:#02d045; '>"</span>C<span style='color:#02d045; '>"</span><span style='color:#00c4c4; '> {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>106  #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>107 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>108  struct ssh_counter_struct {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>109   uint64_t in_bytes;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>110   uint64_t out_bytes;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>111   uint64_t in_packets;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>112   uint64_t out_packets;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>113  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>114  typedef struct ssh_counter_struct * ssh_counter ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>115 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>116  typedef struct ssh_agent_struct * ssh_agent ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>117  typedef struct ssh_buffer_struct * ssh_buffer ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>118  typedef struct ssh_channel_struct * ssh_channel ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>119  typedef struct ssh_message_struct * ssh_message ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>120  typedef struct ssh_pcap_file_struct </span> <span style='color:#00c4c4; '>* ssh_pcap_file;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>121  typedef struct ssh_key_struct * ssh_key ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>122  typedef struct ssh_scp_struct * ssh_scp ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>123  typedef struct ssh_session_struct * ssh_session ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>124  typedef struct ssh_string_struct * ssh_string ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>125  typedef struct ssh_event_struct * ssh_event ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>126  typedef struct ssh_connector_struct </span> <span style='color:#00c4c4; '>* ssh_connector ;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>127  typedef void * ssh_gssapi_creds;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>128 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>129  / * Tipo de enchufe * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>130  #ifdef _WIN32</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>131  #ifndef socket_t</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>132  typedef SOCKET socket_t;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>133  #endif / * socket_t * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>134  #else / * _WIN32 * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>135  #ifndef socket_t</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>136  typedef int socket_t;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>137  #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>138  #endif / * _WIN32 * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>139 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>140  #define SSH_INVALID_SOCKET ((socket_t) -1)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>141 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>142  / * las compensaciones de los métodos * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>143  enum ssh_kex_types_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>144   SSH_KEX = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>145   SSH_HOSTKEYS,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>146   SSH_CRYPT_C_S,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>147   SSH_CRYPT_S_C,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>148   SSH_MAC_C_S,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>149   SSH_MAC_S_C,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>150   SSH_COMP_C_S,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>151   SSH_COMP_S_C,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>152   SSH_LANG_C_S,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>153   SSH_LANG_S_C</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>154  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>155 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>156  #define SSH_CRYPT 2</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>157  #define SSH_MAC 3</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>158  #define SSH_COMP 4</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>159  #define SSH_LANG 5</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>160 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>161  enum ssh_auth_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>162   SSH_AUTH_SUCCESS = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>163   SSH_AUTH_DENIED,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>164   SSH_AUTH_PARTIAL,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>165   SSH_AUTH_INFO,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>166   SSH_AUTH_AGAIN,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>167   SSH_AUTH_ERROR = -1</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>168  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>169 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>170  / * banderas de autenticación * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>171  #define SSH_AUTH_METHOD_UNKNOWN 0</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>172  #define SSH_AUTH_METHOD_NONE 0x0001</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>173  #define SSH_AUTH_METHOD_PASSWORD 0x0002</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>174  #define SSH_AUTH_METHOD_PUBLICKEY 0x0004</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>175  #define SSH_AUTH_METHOD_HOSTBASED 0x0008</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>176  #define SSH_AUTH_METHOD_INTERACTIVE 0x0010</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>177  #define SSH_AUTH_METHOD_GSSAPI_MIC 0x0020</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>178 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>179  / * mensajes * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>180  enum ssh_requests_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>181   SSH_REQUEST_AUTH = 1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>182   SSH_REQUEST_CHANNEL_OPEN,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>183   SSH_REQUEST_CHANNEL,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>184   SSH_REQUEST_SERVICE,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>185   SSH_REQUEST_GLOBAL</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>186  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>187 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>188  enum ssh_channel_type_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>189   SSH_CHANNEL_UNKNOWN = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>190   SSH_CHANNEL_SESSION,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>191   SSH_CHANNEL_DIRECT_TCPIP,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>192   SSH_CHANNEL_FORWARDED_TCPIP,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>193   SSH_CHANNEL_X11,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>194   SSH_CHANNEL_AUTH_AGENT</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>195  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>196 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>197  enum ssh_channel_requests_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>198   SSH_CHANNEL_REQUEST_UNKNOWN = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>199   SSH_CHANNEL_REQUEST_PTY,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>200   SSH_CHANNEL_REQUEST_EXEC,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>201   SSH_CHANNEL_REQUEST_SHELL,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>202   SSH_CHANNEL_REQUEST_ENV,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>203   SSH_CHANNEL_REQUEST_SUBSYSTEM,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>204   SSH_CHANNEL_REQUEST_WINDOW_CHANGE,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>205   SSH_CHANNEL_REQUEST_X11</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>206  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>207 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>208  enum ssh_global_requests_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>209   SSH_GLOBAL_REQUEST_UNKNOWN = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>210   SSH_GLOBAL_REQUEST_TCPIP_FORWARD,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>211   SSH_GLOBAL_REQUEST_CANCEL_TCPIP_FORWARD,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>212   SSH_GLOBAL_REQUEST_KEEPALIVE</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>213  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>214 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>215  enum ssh_publickey_state_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>216   SSH_PUBLICKEY_STATE_ERROR = -1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>217   SSH_PUBLICKEY_STATE_NONE = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>218   SSH_PUBLICKEY_STATE_VALID = 1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>219   SSH_PUBLICKEY_STATE_WRONG = 2</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>220  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>221 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>222  / * Indicadores de estado * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>224  #define SSH_CLOSED 0x01</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>225 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>226  #define SSH_READ_PENDING 0x02</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>227 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>228  #define SSH_CLOSED_ERROR 0x04</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>229 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>230  #define SSH_WRITE_PENDING 0x08</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>231 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>232  enum ssh_server_known_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>233   SSH_SERVER_ERROR = -1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>234   SSH_SERVER_NOT_KNOWN = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>235   SSH_SERVER_KNOWN_OK,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>236   SSH_SERVER_KNOWN_CHANGED,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>237   SSH_SERVER_FOUND_OTHER,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>238   SSH_SERVER_FILE_NOT_FOUND</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>239  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>240 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>241  enum ssh_known_hosts_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>245   SSH_KNOWN_HOSTS_ERROR = -2,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>246 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>251   SSH_KNOWN_HOSTS_NOT_FOUND = -1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>252 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>257   SSH_KNOWN_HOSTS_UNKNOWN = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>258 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>262   SSH_KNOWN_HOSTS_OK,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>263 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>269   SSH_KNOWN_HOSTS_CHANGED,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>270 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>275   SSH_KNOWN_HOSTS_OTHER,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>276  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>277 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>278  #ifndef MD5_DIGEST_LEN</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>279   #define MD5_DIGEST_LEN 16</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>280  #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>281  / * errores * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>282 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>283  enum ssh_error_types_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>284   SSH_NO_ERROR = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>285   SSH_REQUEST_DENIED,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>286   SSH_FATAL,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>287   SSH_EINTR</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>288  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>289 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>290  / * algunos tipos de claves * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>291  enum ssh_keytypes_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>292   SSH_KEYTYPE_UNKNOWN = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>293   SSH_KEYTYPE_DSS = 1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>294   SSH_KEYTYPE_RSA,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>295   SSH_KEYTYPE_RSA1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>296   SSH_KEYTYPE_ECDSA,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>297   SSH_KEYTYPE_ED25519,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>298   SSH_KEYTYPE_DSS_CERT01,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>299   SSH_KEYTYPE_RSA_CERT01</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>300  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>301 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>302  enum ssh_keycmp_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>303   SSH_KEY_CMP_PUBLIC = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>304   SSH_KEY_CMP_PRIVATE</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>305  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>306 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>307  #define SSH_ADDRSTRLEN 46</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>308 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>309  struct ssh_knownhosts_entry {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>310   char * nombre de host;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>311   char * sin analizar;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>312   ssh_key publickey;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>313   char * comentario;</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>314  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>315 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>316 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>317  / * Códigos de retorno de error * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>318  #define SSH_OK 0 / * Sin error * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>319  #define SSH_ERROR -1 / </span> <span style='color:#00c4c4; '>* Error de algún tipo * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>320  #define SSH_AGAIN -2 / </span> <span style='color:#00c4c4; '>* La llamada sin bloqueo debe repetirse * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>321  #define SSH_EOF -127 / * Ya tenemos un eof * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>322 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>329  enum {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>332  SSH_LOG_NOLOG = 0,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>335  SSH_LOG_WARNING ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>338  SSH_LOG_PROTOCOL ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>341  SSH_LOG_PACKET ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>344  SSH_LOG_FUNCTIONS</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>345  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>347  #define SSH_LOG_RARE SSH_LOG_WARNING</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>348 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>357  #define SSH_LOG_NONE 0</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>358 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>359  #define SSH_LOG_WARN 1</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>360 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>361  #define SSH_LOG_INFO 2</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>362 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>363  #define SSH_LOG_DEBUG 3</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>364 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>365  #define SSH_LOG_TRACE 4</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>366 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>369  enum ssh_options_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>370   SSH_OPTIONS_HOST,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>371   SSH_OPTIONS_PORT,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>372   SSH_OPTIONS_PORT_STR,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>373   SSH_OPTIONS_FD,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>374   SSH_OPTIONS_USER,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>375   SSH_OPTIONS_SSH_DIR,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>376   SSH_OPTIONS_IDENTITY,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>377   SSH_OPTIONS_ADD_IDENTITY,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>378   SSH_OPTIONS_KNOWNHOSTS,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>379   SSH_OPTIONS_TIMEOUT,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>380   SSH_OPTIONS_TIMEOUT_USEC,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>381   SSH_OPTIONS_SSH1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>382   SSH_OPTIONS_SSH2,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>383   SSH_OPTIONS_LOG_VERBOSITY,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>384   SSH_OPTIONS_LOG_VERBOSITY_STR,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>385   SSH_OPTIONS_CIPHERS_C_S,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>386   SSH_OPTIONS_CIPHERS_S_C,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>387   SSH_OPTIONS_COMPRESSION_C_S,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>388   SSH_OPTIONS_COMPRESSION_S_C,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>389   SSH_OPTIONS_PROXYCOMMAND,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>390   SSH_OPTIONS_BINDADDR,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>391   SSH_OPTIONS_STRICTHOSTKEYCHECK,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>392   SSH_OPTIONS_COMPRESSION,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>393   SSH_OPTIONS_COMPRESSION_LEVEL,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>394   SSH_OPTIONS_KEY_EXCHANGE,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>395   SSH_OPTIONS_HOSTKEYS,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>396   SSH_OPTIONS_GSSAPI_SERVER_IDENTITY,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>397   SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>398   SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>399   SSH_OPTIONS_HMAC_C_S,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>400   SSH_OPTIONS_HMAC_S_C,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>401   SSH_OPTIONS_PASSWORD_AUTH,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>402   SSH_OPTIONS_PUBKEY_AUTH,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>403   SSH_OPTIONS_KBDINT_AUTH,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>404   SSH_OPTIONS_GSSAPI_AUTH,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>405   SSH_OPTIONS_GLOBAL_KNOWNHOSTS,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>406   SSH_OPTIONS_NODELAY,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>407   SSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>408   SSH_OPTIONS_PROCESS_CONFIG,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>409   SSH_OPTIONS_REKEY_DATA,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>410   SSH_OPTIONS_REKEY_TIME,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>411  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>412 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>413  enum {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>415   SSH_SCP_WRITE,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>417   SSH_SCP_READ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>418   SSH_SCP_RECURSIVE = 0x10</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>419  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>420 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>421  enum ssh_scp_request_types {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>423   SSH_SCP_REQUEST_NEWDIR = 1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>425   SSH_SCP_REQUEST_NEWFILE,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>427   SSH_SCP_REQUEST_EOF,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>429   SSH_SCP_REQUEST_ENDDIR,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>431   SSH_SCP_REQUEST_WARNING</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>432  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>433 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>434  enum ssh_connector_flags_e {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>436   SSH_CONNECTOR_STDOUT = 1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>438   SSH_CONNECTOR_STDERR = 2,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>440   SSH_CONNECTOR_BOTH = 3</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>441  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>442 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>443  LIBSSH_API int ssh_blocking_flush </span> <span style='color:#00c4c4; '>( sesión ssh_session , int timeout);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>444  LIBSSH_API ssh_channel ssh_channel_accept_x11 </span> <span style='color:#00c4c4; '>( canal ssh_channel , int timeout_ms);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>445  LIBSSH_API int ssh_channel_change_pty_size </span> <span style='color:#00c4c4; '>( canal ssh_channel , int cols, int filas);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>446  LIBSSH_API int ssh_channel_close </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>447  LIBSSH_API void ssh_channel_free </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>448  LIBSSH_API int ssh_channel_get_exit_status </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>449  LIBSSH_API ssh_session ssh_channel_get_session </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>450  LIBSSH_API int ssh_channel_is_closed </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>451  LIBSSH_API int ssh_channel_is_eof </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>452  LIBSSH_API int ssh_channel_is_open </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>453  LIBSSH_API ssh_channel ssh_channel_new </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>454  LIBSSH_API int ssh_channel_open_auth_agent </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>455  LIBSSH_API int ssh_channel_open_forward </span> <span style='color:#00c4c4; '>( canal ssh_channel , const char * host remoto,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>456   int puerto remoto, const char </span> <span style='color:#00c4c4; '>* sourcehost, int localport);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>457  LIBSSH_API int ssh_channel_open_session </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>458  LIBSSH_API int ssh_channel_open_x11 </span> <span style='color:#00c4c4; '>( canal ssh_channel , const char * orig_addr, </span> <span style='color:#00c4c4; '>int orig_port);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>459  LIBSSH_API int ssh_channel_poll </span> <span style='color:#00c4c4; '>( canal ssh_channel , int is_stderr);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>460  LIBSSH_API int ssh_channel_poll_timeout </span> <span style='color:#00c4c4; '>( canal ssh_channel , int timeout, int is_stderr);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>461  LIBSSH_API int ssh_channel_read </span> <span style='color:#00c4c4; '>( canal ssh_channel , void * dest, uint32_t </span> <span style='color:#00c4c4; '>count, int is_stderr);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>462  LIBSSH_API int ssh_channel_read_timeout </span> <span style='color:#00c4c4; '>( ssh_channel channel, void * dest, </span> <span style='color:#00c4c4; '>uint32_t count, int is_stderr, int timeout_ms);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>463  LIBSSH_API int ssh_channel_read_nonblocking </span> <span style='color:#00c4c4; '>( canal ssh_channel , void * dest, uint32_t count,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>464   int is_stderr);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>465  LIBSSH_API int ssh_channel_request_env </span> <span style='color:#00c4c4; '>( canal ssh_channel , const char * nombre, const char </span> <span style='color:#00c4c4; '>* valor);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>466  LIBSSH_API int ssh_channel_request_exec </span> <span style='color:#00c4c4; '>( canal ssh_channel , const char * cmd);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>467  LIBSSH_API int ssh_channel_request_pty </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>468  LIBSSH_API int ssh_channel_request_pty_size </span> <span style='color:#00c4c4; '>( canal ssh_channel , const char * term,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>469   int cols, int filas);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>470  LIBSSH_API int ssh_channel_request_shell </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>471  LIBSSH_API int ssh_channel_request_send_signal </span> <span style='color:#00c4c4; '>( canal ssh_channel , const char * signum);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>472  LIBSSH_API int ssh_channel_request_send_break </span> <span style='color:#00c4c4; '>( ssh_channel canal, longitud uint32_t);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>473  LIBSSH_API int ssh_channel_request_sftp </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>474  LIBSSH_API int ssh_channel_request_subsystem </span> <span style='color:#00c4c4; '>( canal ssh_channel , const char * subsistema);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>475  LIBSSH_API int ssh_channel_request_x11 </span> <span style='color:#00c4c4; '>( canal ssh_channel , int single_connection, </span> <span style='color:#00c4c4; '>const char * protocolo,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>476   const char * cookie, int número_pantalla);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>477  LIBSSH_API int ssh_channel_request_auth_agent </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>478  LIBSSH_API int ssh_channel_send_eof </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>479  LIBSSH_API int ssh_channel_select </span> <span style='color:#00c4c4; '>( ssh_channel * readchans, ssh_channel * </span> <span style='color:#00c4c4; '>writechans, ssh_channel * exceptchans, struct</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>480   timeval * tiempo de espera);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>481  LIBSSH_API void ssh_channel_set_blocking </span> <span style='color:#00c4c4; '>( canal ssh_channel , bloqueo int );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>482  LIBSSH_API void ssh_channel_set_counter </span> <span style='color:#00c4c4; '>( canal ssh_channel ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>483  contador ssh_counter );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>484  LIBSSH_API int ssh_channel_write </span> <span style='color:#00c4c4; '>( canal ssh_channel , const void * datos, uint32_t len);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>485  LIBSSH_API int ssh_channel_write_stderr </span> <span style='color:#00c4c4; '>( canal ssh_channel ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>486   const void * datos,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>487   uint32_t len);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>488  LIBSSH_API uint32_t ssh_channel_window_size </span> <span style='color:#00c4c4; '>( canal ssh_channel );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>489 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>490  LIBSSH_API char * ssh_basename </span> <span style='color:#00c4c4; '>( const char * ruta);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>491  LIBSSH_API void ssh_clean_pubkey_hash (</span> <span style='color:#00c4c4; '>&#xa0;carácter sin firmar ** hash);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>492  LIBSSH_API int ssh_connect ( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>493 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>494  LIBSSH_API ssh_connector ssh_connector_new </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>495  LIBSSH_API void ssh_connector_free </span> <span style='color:#00c4c4; '>( conector ssh_connector );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>496  LIBSSH_API int ssh_connector_set_in_channel </span> <span style='color:#00c4c4; '>( conector ssh_connector ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>497  canal ssh_channel ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>498   enum ssh_connector_flags_e banderas);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>499  LIBSSH_API int ssh_connector_set_out_channel </span> <span style='color:#00c4c4; '>( conector ssh_connector ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>500  canal ssh_channel ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>501   enum ssh_connector_flags_e flags);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>502  LIBSSH_API void ssh_connector_set_in_fd </span> <span style='color:#00c4c4; '>( ssh_connector conector, fd socket_t);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>503  LIBSSH_API vacío ssh_connector_set_out_fd </span> <span style='color:#00c4c4; '>( ssh_connector conector, fd socket_t);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>504 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>505  LIBSSH_API const char * ssh_copyright ( void );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>506  LIBSSH_API void ssh_disconnect </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>507  LIBSSH_API char * ssh_dirname ( const char * ruta);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>508  LIBSSH_API int ssh_finalize ( void );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>509 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>510  / * REENVÍO DE PUERTO INVERSO * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>511  LIBSSH_API ssh_channel ssh_channel_accept_forward </span> <span style='color:#00c4c4; '>( sesión ssh_session ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>512   int timeout_ms,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>513   int * puerto_destino);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>514  LIBSSH_API int ssh_channel_cancel_forward </span> <span style='color:#00c4c4; '>( sesión ssh_session ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>515   const char * dirección,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>516   int puerto);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>517  LIBSSH_API int ssh_channel_listen_forward </span> <span style='color:#00c4c4; '>( sesión ssh_session ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>518   const char * dirección,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>519  puerto internacional ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>520   int * puerto_delimitado);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>521 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>522  LIBSSH_API void ssh_free ( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>523  LIBSSH_API const char * ssh_get_disconnect_message </span> <span style='color:#00c4c4; '>&#xa0;( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>524  LIBSSH_API const char * ssh_get_error </span> <span style='color:#00c4c4; '>( void * error);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>525  LIBSSH_API int ssh_get_error_code </span> <span style='color:#00c4c4; '>( void * error);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>526  LIBSSH_API socket_t ssh_get_fd </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>527  LIBSSH_API char * ssh_get_hexa </span> <span style='color:#00c4c4; '>( const unsigned char * what, size_t len);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>528  LIBSSH_API char * ssh_get_issue_banner </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>529  LIBSSH_API int ssh_get_openssh_version </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>530 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>531  LIBSSH_API int ssh_get_server_publickey </span> <span style='color:#00c4c4; '>( ssh_session sesión, clave ssh tecla *);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>532 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>533  enum ssh_publickey_hash_type {</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>534   SSH_PUBLICKEY_HASH_SHA1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>535   SSH_PUBLICKEY_HASH_MD5,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>536   SSH_PUBLICKEY_HASH_SHA256</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>537  };</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>538  LIBSSH_API int ssh_get_publickey_hash </span> <span style='color:#00c4c4; '>( clave const ssh_key ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>539   enum ssh_publickey_hash_type type,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>540   char ** hash sin firmar ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>541   size_t * HLEN);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>542 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>543  / * FUNCIONES ANULADAS * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>544  SSH_DEPRECATED LIBSSH_API int ssh_get_pubkey_hash </span> <span style='color:#00c4c4; '>( sesión ssh_session , carácter sin firmar ** hash);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>545  SSH_DEPRECATED LIBSSH_API ssh_channel </span> <span style='color:#00c4c4; '>ssh_forward_accept ( sesión ssh_session , int timeout_ms);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>546  SSH_DEPRECATED LIBSSH_API int ssh_forward_cancel </span> <span style='color:#00c4c4; '>( sesión ssh_session , const char * dirección, int puerto);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>547  SSH_DEPRECATED LIBSSH_API int ssh_forward_listen </span> <span style='color:#00c4c4; '>( sesión ssh_session , const char * dirección, int puerto, int * bound_port);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>548  SSH_DEPRECATED LIBSSH_API int ssh_get_publickey </span> <span style='color:#00c4c4; '>( ssh_session sesión, clave ssh tecla *);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>549  SSH_DEPRECATED LIBSSH_API int ssh_write_knownhost </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>550  SSH_DEPRECATED LIBSSH_API char * ssh_dump_knownhost </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>551  SSH_DEPRECATED LIBSSH_API int ssh_is_server_known </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>552  SSH_DEPRECATED LIBSSH_API void ssh_print_hexa ( const char * descr, const unsigned char * what, size_t len);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>553 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>554 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>555 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>556  LIBSSH_API int ssh_get_random </span> <span style='color:#00c4c4; '>( void * donde, int len, int fuerte);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>557  LIBSSH_API int ssh_get_version </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>558  LIBSSH_API int ssh_get_status </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>559  LIBSSH_API int ssh_get_poll_flags </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>560  LIBSSH_API int ssh_init ( vacío );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>561  LIBSSH_API int ssh_is_blocking </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>562  LIBSSH_API int ssh_is_connected </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>563 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>564  / * HOSTS CONOCIDOS * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>565  LIBSSH_API void ssh_knownhosts_entry_free </span> <span style='color:#00c4c4; '>( struct ssh_knownhosts_entry * entrada);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>566  #define SSH_KNOWNHOSTS_ENTRY_FREE (e) do {\</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>567   si ((e)! = NULO) {\</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>568   ssh_knownhosts_entry_free (e); \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>569   e = NULO; \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>570   } \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>571  } mientras (0)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>572 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>573  LIBSSH_API int ssh_known_hosts_parse_line </span> <span style='color:#00c4c4; '>( const char * host,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>574   const char * línea,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>575  entrada struct ssh_knownhosts_entry **);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>576  LIBSSH_API enumeración ssh_known_hosts_e </span> <span style='color:#00c4c4; '>ssh_session_has_known_hosts_entry ( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>577 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>578  LIBSSH_API int ssh_session_export_known_hosts_entry </span> <span style='color:#00c4c4; '>( sesión ssh_session ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>579   Char ** pentry_string);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>580  LIBSSH_API int ssh_session_update_known_hosts </span> <span style='color:#00c4c4; '>( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>581 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>582  LIBSSH_API enumeración ssh_known_hosts_e</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>583  ssh_session_get_known_hosts_entry </span> <span style='color:#00c4c4; '>( sesión ssh_session ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>584   struct ssh_knownhosts_entry ** pentry);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>585  LIBSSH_API enumeración ssh_known_hosts_e </span> <span style='color:#00c4c4; '>ssh_session_is_known_server ( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>586 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>587  / * REGISTRO * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>588  LIBSSH_API int ssh_set_log_level ( nivel int );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>589  LIBSSH_API int ssh_get_log_level ( void );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>590  LIBSSH_API void * ssh_get_log_userdata ( void );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>591  LIBSSH_API int ssh_set_log_userdata ( void * datos);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>592  LIBSSH_API void _ssh_log ( int verbosidad,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>593   const char * función ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>594   const char * formato, ...) PRINTF_ATTRIBUTE (3, 4);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>595 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>596  / * legado * /</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>597  SSH_DEPRECATED LIBSSH_API void ssh_log </span> <span style='color:#00c4c4; '>( sesión ssh_session ,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>598   int prioridad,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>599   const char * formato, ...) PRINTF_ATTRIBUTE (3, 4);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>600 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>601  LIBSSH_API ssh_channel ssh_message_channel_request_open_reply_accept </span> <span style='color:#00c4c4; '>( ssh_message msg);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>602  LIBSSH_API int ssh_message_channel_request_reply_success </span> <span style='color:#00c4c4; '>( ssh_message msg);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>603  #define SSH_MESSAGE_FREE (x) \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>604   hacer {if ((x)! = NULL) {ssh_message_free (x); (x) = NULO; }} mientras (0)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>605  LIBSSH_API void ssh_message_free ( ssh_message msg);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>606  LIBSSH_API ssh_message ssh_message_get ( sesión ssh_session );</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>607  LIBSSH_API int ssh_message_subtype ( ssh_message msg);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>608  LIBSSH_API int ssh_message_type ( ssh_message msg);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>609  LIBSSH_API int ssh_mkdir ( const char * nombre de ruta, modo_t);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>610 LIBSSH_API ssh_session ssh_new(void);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>611 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>612 LIBSSH_API int ssh_options_copy(ssh_session src, ssh_session *dest);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>613 LIBSSH_API int ssh_options_getopt(ssh_session session, int *argcptr, char **argv);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>614 LIBSSH_API int ssh_options_parse_config(ssh_session session, const char *filename);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>615 LIBSSH_API int ssh_options_set(ssh_session session, enum ssh_options_e type,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>616  const void *value);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>617 LIBSSH_API int ssh_options_get(ssh_session session, enum ssh_options_e type,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>618  char **value);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>619 LIBSSH_API int ssh_options_get_port(ssh_session session, unsigned int * port_target);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>620 LIBSSH_API int ssh_pcap_file_close(ssh_pcap_file pcap);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>621 LIBSSH_API void ssh_pcap_file_free(ssh_pcap_file pcap);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>622 LIBSSH_API ssh_pcap_file ssh_pcap_file_new(void);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>623 LIBSSH_API int ssh_pcap_file_open(ssh_pcap_file pcap, const char *filename);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>624 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>638 typedef int (*ssh_auth_callback) (const char *prompt, char *buf, size_t len,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>639  int echo, int verify, void *userdata);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>640 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>641 LIBSSH_API ssh_key ssh_key_new(void);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>642 #define SSH_KEY_FREE(x) \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>643  do { if ((x) != NULL) { ssh_key_free(x); x = NULL; } } while(0)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>644 LIBSSH_API void ssh_key_free (ssh_key key);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>645 LIBSSH_API enum ssh_keytypes_e ssh_key_type(const ssh_key key);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>646 LIBSSH_API const char *ssh_key_type_to_char(enum ssh_keytypes_e type);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>647 LIBSSH_API enum ssh_keytypes_e ssh_key_type_from_name(const char *name);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>648 LIBSSH_API int ssh_key_is_public(const ssh_key k);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>649 LIBSSH_API int ssh_key_is_private(const ssh_key k);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>650 LIBSSH_API int ssh_key_cmp(const ssh_key k1,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>651  const ssh_key k2,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>652  enum ssh_keycmp_e what);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>653 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>654 LIBSSH_API int ssh_pki_generate(enum ssh_keytypes_e type, int parameter,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>655  ssh_key *pkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>656 LIBSSH_API int ssh_pki_import_privkey_base64(const char *b64_key,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>657  const char *passphrase,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>658  ssh_auth_callback auth_fn,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>659  void *auth_data,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>660  ssh_key *pkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>661 LIBSSH_API int ssh_pki_export_privkey_base64(const ssh_key privkey,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>662  const char *passphrase,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>663  ssh_auth_callback auth_fn,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>664  void *auth_data,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>665  char **b64_key);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>666 LIBSSH_API int ssh_pki_import_privkey_file(const char *filename,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>667  const char *passphrase,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>668  ssh_auth_callback auth_fn,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>669  void *auth_data,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>670  ssh_key *pkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>671 LIBSSH_API int ssh_pki_export_privkey_file(const ssh_key privkey,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>672  const char *passphrase,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>673  ssh_auth_callback auth_fn,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>674  void *auth_data,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>675  const char *filename);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>676 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>677 LIBSSH_API int ssh_pki_copy_cert_to_privkey(const ssh_key cert_key,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>678  ssh_key privkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>679 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>680 LIBSSH_API int ssh_pki_import_pubkey_base64(const char *b64_key,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>681  enum ssh_keytypes_e type,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>682  ssh_key *pkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>683 LIBSSH_API int ssh_pki_import_pubkey_file(const char *filename,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>684  ssh_key *pkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>685 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>686 LIBSSH_API int ssh_pki_import_cert_base64(const char *b64_cert,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>687  enum ssh_keytypes_e type,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>688  ssh_key *pkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>689 LIBSSH_API int ssh_pki_import_cert_file(const char *filename,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>690  ssh_key *pkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>691 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>692 LIBSSH_API int ssh_pki_export_privkey_to_pubkey(const ssh_key privkey,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>693  ssh_key *pkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>694 LIBSSH_API int ssh_pki_export_pubkey_base64(const ssh_key key,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>695  char **b64_key);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>696 LIBSSH_API int ssh_pki_export_pubkey_file(const ssh_key key,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>697  const char *filename);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>698 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>699 LIBSSH_API const char *ssh_pki_key_ecdsa_name(const ssh_key key);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>700 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>701 LIBSSH_API char *ssh_get_fingerprint_hash(enum ssh_publickey_hash_type type,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>702  unsigned char *hash,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>703  size_t len);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>704 LIBSSH_API void ssh_print_hash</span> <span style='color:#00c4c4; '>(enum ssh_publickey_hash_type type, unsigned char *hash, size_t len);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>705 LIBSSH_API int ssh_send_ignore (ssh_session session, const char *data);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>706 LIBSSH_API int ssh_send_debug (ssh_session session, const char *message, int always_display);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>707 LIBSSH_API void ssh_gssapi_set_creds(ssh_session session, const ssh_gssapi_creds creds);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>708 LIBSSH_API int ssh_scp_accept_request(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>709 LIBSSH_API int ssh_scp_close(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>710 LIBSSH_API int ssh_scp_deny_request(ssh_scp scp, const char *reason);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>711 LIBSSH_API void ssh_scp_free(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>712 LIBSSH_API int ssh_scp_init(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>713 LIBSSH_API int ssh_scp_leave_directory(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>714 LIBSSH_API ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>715 LIBSSH_API int ssh_scp_pull_request(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>716 LIBSSH_API int ssh_scp_push_directory(ssh_scp scp, const char *dirname, int mode);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>717 LIBSSH_API int ssh_scp_push_file(ssh_scp scp, const char *filename, size_t size, int perms);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>718 LIBSSH_API int ssh_scp_push_file64(ssh_scp scp, const char *filename, uint64_t size, int perms);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>719 LIBSSH_API int ssh_scp_read(ssh_scp scp, void *buffer, size_t size);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>720 LIBSSH_API const char *ssh_scp_request_get_filename(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>721 LIBSSH_API int ssh_scp_request_get_permissions(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>722 LIBSSH_API size_t ssh_scp_request_get_size(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>723 LIBSSH_API uint64_t ssh_scp_request_get_size64(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>724 LIBSSH_API const char *ssh_scp_request_get_warning(ssh_scp scp);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>725 LIBSSH_API int ssh_scp_write(ssh_scp scp, const void *buffer, size_t len);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>726 LIBSSH_API int ssh_select(ssh_channel *channels, ssh_channel *outchannels, socket_t maxfd,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>727  fd_set *readfds, struct timeval *timeout);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>728 LIBSSH_API int ssh_service_request(ssh_session session, const char *service);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>729 LIBSSH_API int ssh_set_agent_channel(ssh_session session, ssh_channel channel);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>730 LIBSSH_API int ssh_set_agent_socket(ssh_session session, socket_t fd);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>731 LIBSSH_API void ssh_set_blocking(ssh_session session, int blocking);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>732 LIBSSH_API void ssh_set_counters(ssh_session session, ssh_counter scounter,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>733  ssh_counter rcounter);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>734 LIBSSH_API void ssh_set_fd_except(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>735 LIBSSH_API void ssh_set_fd_toread(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>736 LIBSSH_API void ssh_set_fd_towrite(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>737 LIBSSH_API void ssh_silent_disconnect(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>738 LIBSSH_API int ssh_set_pcap_file(ssh_session session, ssh_pcap_file pcapfile);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>739 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>740 /* USERAUTH */</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>741 LIBSSH_API int ssh_userauth_none(ssh_session session, const char *username);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>742 LIBSSH_API int ssh_userauth_list(ssh_session session, const char *username);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>743 LIBSSH_API int ssh_userauth_try_publickey(ssh_session session,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>744  const char *username,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>745  const ssh_key pubkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>746 LIBSSH_API int ssh_userauth_publickey(ssh_session session,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>747  const char *username,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>748  const ssh_key privkey);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>749 #ifndef _WIN32</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>750 LIBSSH_API int ssh_userauth_agent(ssh_session session,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>751  const char *username);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>752 #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>753 LIBSSH_API int ssh_userauth_publickey_auto(ssh_session session,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>754  const char *username,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>755  const char *passphrase);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>756 LIBSSH_API int ssh_userauth_password(ssh_session session,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>757  const char *username,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>758  const char *password);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>759 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>760 LIBSSH_API int ssh_userauth_kbdint(ssh_session session, const char *user, const char *submethods);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>761 LIBSSH_API const char *ssh_userauth_kbdint_getinstruction(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>762 LIBSSH_API const char *ssh_userauth_kbdint_getname(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>763 LIBSSH_API int ssh_userauth_kbdint_getnprompts(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>764 LIBSSH_API const char *ssh_userauth_kbdint_getprompt(ssh_session session, unsigned int i, char *echo);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>765 LIBSSH_API int ssh_userauth_kbdint_getnanswers(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>766 LIBSSH_API const char *ssh_userauth_kbdint_getanswer(ssh_session session, unsigned int i);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>767 LIBSSH_API int ssh_userauth_kbdint_setanswer(ssh_session session, unsigned int i,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>768  const char *answer);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>769 LIBSSH_API int ssh_userauth_gssapi(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>770 LIBSSH_API const char *ssh_version(int req_version);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>771 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>772 LIBSSH_API void ssh_string_burn(ssh_string str);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>773 LIBSSH_API ssh_string ssh_string_copy(ssh_string str);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>774 LIBSSH_API void *ssh_string_data(ssh_string str);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>775 LIBSSH_API int ssh_string_fill(ssh_string str, const void *data, size_t len);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>776 #define SSH_STRING_FREE(x) \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>777  do { if ((x) != NULL) { ssh_string_free(x); x = NULL; } } while(0)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>778 LIBSSH_API void ssh_string_free(ssh_string str);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>779 LIBSSH_API ssh_string ssh_string_from_char(const char *what);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>780 LIBSSH_API size_t ssh_string_len(ssh_string str);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>781 LIBSSH_API ssh_string ssh_string_new(size_t size);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>782 LIBSSH_API const char *ssh_string_get_char(ssh_string str);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>783 LIBSSH_API char *ssh_string_to_char(ssh_string str);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>784 #define SSH_STRING_FREE_CHAR(x) \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>785  do { if ((x) != NULL) { ssh_string_free_char(x); x = NULL; } } while(0)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>786 LIBSSH_API void ssh_string_free_char(char *s);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>787 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>788 LIBSSH_API int ssh_getpass(const char *prompt, char *buf, size_t len, int echo,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>789  int verify);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>790 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>791 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>792 typedef int (*ssh_event_callback)(socket_t fd, int revents, void *userdata);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>793 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>794 LIBSSH_API ssh_event ssh_event_new(void);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>795 LIBSSH_API int ssh_event_add_fd(ssh_event event, socket_t fd, short events,</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>796  ssh_event_callback cb, void *userdata);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>797 LIBSSH_API int ssh_event_add_session(ssh_event event, ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>798 LIBSSH_API int ssh_event_add_connector(ssh_event event, ssh_connector connector);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>799 LIBSSH_API int ssh_event_dopoll(ssh_event event, int timeout);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>800 LIBSSH_API int ssh_event_remove_fd(ssh_event event, socket_t fd);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>801 LIBSSH_API int ssh_event_remove_session(ssh_event event, ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>802 LIBSSH_API int ssh_event_remove_connector(ssh_event event, ssh_connector connector);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>803 LIBSSH_API void ssh_event_free(ssh_event event);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>804 LIBSSH_API const char* ssh_get_clientbanner(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>805 LIBSSH_API const char* ssh_get_serverbanner(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>806 LIBSSH_API const char* ssh_get_kex_algo(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>807 LIBSSH_API const char* ssh_get_cipher_in(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>808 LIBSSH_API const char* ssh_get_cipher_out(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>809 LIBSSH_API const char* ssh_get_hmac_in(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>810 LIBSSH_API const char* ssh_get_hmac_out(ssh_session session);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>811 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>812 LIBSSH_API ssh_buffer ssh_buffer_new(void);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>813 LIBSSH_API void ssh_buffer_free(ssh_buffer buffer);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>814 #define SSH_BUFFER_FREE(x) \</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>815  do { if ((x) != NULL) { ssh_buffer_free(x); x = NULL; } } while(0)</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>816 LIBSSH_API int ssh_buffer_reinit(ssh_buffer buffer);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>817 LIBSSH_API int ssh_buffer_add_data(ssh_buffer buffer, const void *data, uint32_t len);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>818 LIBSSH_API uint32_t ssh_buffer_get_data(ssh_buffer buffer, void *data, uint32_t requestedlen);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>819 LIBSSH_API void *ssh_buffer_get(ssh_buffer buffer);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>820 LIBSSH_API uint32_t ssh_buffer_get_len(ssh_buffer buffer);</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>821 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>822 #ifndef LIBSSH_LEGACY_0_4</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>823 #include </span><span style='color:#02d045; '>"</span>libssh<span style='color:#d2cd86; '>/</span>legacy<span style='color:#d2cd86; '>.</span>h<span style='color:#02d045; '>"</span><span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>824 #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>825 </span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>826 #ifdef __cplusplus</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>827 }</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>828 #endif</span> <span style='color:#00c4c4; '></span> <span style='color:#00c4c4; '>829 #endif /* _LIBSSH_H */&lt;/small></span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;</span> <span style='color:#00c4c4; '>&#xa0;&#xa0;&#xa0;&#xa0;&lt;/body></span> <span style='color:#00c4c4; '>&lt;/html></span> <span style='color:#00c4c4; '>&lt;!-- Juan Angel Luzardo Muslera / montevideo Uruguay --></span> </pre> <!--Created using ToHtml.com on 2020-08-26 03:46:37 UTC --> <h2 id="fly">White flag Juan Angel / Montevideo Uruguay</h2> <script type="text/javascript"> message = document.getElementById("fly").innerHTML; distance = 50; speed = 200; var txt="", num=0, num4=0, flyofle="", flyofwi="", flyofto="", fly=document.getElementById("fly"); function stfly() { for(i=0;i != message.length;i++) { if(message.charAt(i) != "$") txt += "<span style='position:relative;visibility:hidden;' id='n"+i+"'>"+message.charAt(i)+"<\/span>"; else txt += "<br>"; } fly.innerHTML = txt; txt = ""; flyofle = fly.offsetLeft; flyofwi = fly.offsetWidth; flyofto = fly.offsetTop; fly2b(); } function fly2b() { if(num4 != message.length) { if(message.charAt(num4) != "$") { var then = document.getElementById("n" + num4); then.style.left = flyofle - then.offsetLeft + flyofwi / 2 + 'px'; then.style.top = flyofto - then.offsetTop + distance + 'px'; fly3(then.id, parseInt(then.style.left), parseInt(then.style.left) / 5, parseInt(then.style.top), parseInt(then.style.top) / 5); } num4++; setTimeout("fly2b()", speed); } } function fly3(target,lef2,num2,top2,num3) { if((Math.floor(top2) != 0 && Math.floor(top2) != -1) || (Math.floor(lef2) != 0 && Math.floor(lef2) != -1)) { if(lef2 >= 0) lef2 -= num2; else lef2 += num2 * -1; if(Math.floor(lef2) != -1) { document.getElementById(target).style.visibility = "visible"; document.getElementById(target).style.left = Math.floor(lef2) + 'px'; } else { document.getElementById(target).style.visibility = "visible"; document.getElementById(target).style.left = Math.floor(lef2 + 1) + 'px'; } if(lef2 >= 0) top2 -= num3 else top2 += num3 * -1; if(Math.floor(top2) != -1) document.getElementById(target).style.top = Math.floor(top2) + 'px'; else document.getElementById(target).style.top = Math.floor(top2 + 1) + 'px'; setTimeout("fly3('"+target+"',"+lef2+","+num2+","+top2+","+num3+")",50) } } stfly() </script> <h2>LIBRARY SSH</h2> <strong><h1>libssh 0.8.90</h1></strong><br /> <p> <button><li>La biblioteca SSH</li></button> <button><i>PAGINA PRINCIPAL</li></button> <button><li>PÁGINAS RELACIONADAS</li></button> <button><li>M�"DULOS</li></button> <button><li>ESTRUCTURAS DE DATOS</li></button> <button><li>ARCHIVOS</li></button> </p> <ul> <button><h3> incluir </h3></button> <button><h3> libssh </h3></button> <button><h3> libssh.h </h3></button> <br /> </ul>   <small>Esta biblioteca es software gratuito; puedes redistribuirlo y / o 7   * modificarlo según los términos del GNU Lesser General Public 8   * Licencia publicada por la Free Software Foundation; ya sea 9   * versión 2.1 de la Licencia, o (a su elección) cualquier versión posterior. 10  * 11  * Esta biblioteca se distribuye con la esperanza de que sea útil, 12  * pero SIN NINGUNA GARANTÍA; sin siquiera la garantía implícita de   21  #ifndef _LIBSSH_H 22  #define _LIBSSH_H 23  24  #si está definido _WIN32 || definido __CYGWIN__ 25   #ifdef LIBSSH_STATIC 26   #define LIBSSH_API 27   #más 28   #ifdef LIBSSH_EXPORTS 29   #ifdef __GNUC__ 30   #define LIBSSH_API __attribute __ ((dllexport)) 31   #más 32   #define LIBSSH_API __declspec (dllexport) 33   #endif 34   #más 35   #ifdef __GNUC__ 36   #define LIBSSH_API __attribute __ ((dllimport)) 37   #más 38   #define LIBSSH_API __declspec (dllimport) 39   #endif 40   #endif 41   #endif 42  #más 43   #if __GNUC__> = 4 &&! Definido (__ OS2__) 44   #define LIBSSH_API __attribute __ ((visibilidad ("predeterminado"))) 45   #más 46   #define LIBSSH_API 47   #endif 48  #endif 49  50  #ifdef _MSC_VER 51   / * Visual Studio no tiene inttypes.h así que no conoce uint32_t * / 52   typedef int int32_t; 53   typedef unsigned int uint32_t; 54   typedef unsigned short uint16_t; 55   typedef unsigned char uint8_t; 56   typedef unsigned long long uint64_t; 57   typedef int mode_t; 58  #else / * _MSC_VER * / 59   #include <unistd.h> 60   #include <inttypes.h> 61   #include <sys / types.h> 62  #endif / * _MSC_VER * / 63  64  #ifdef _WIN32 65   #include <winsock2.h> 66  #else / * _WIN32 * / 67  #include <sys / select.h> / * para fd_set * * / 68  #include <netdb.h> 69  #endif / * _WIN32 * / 70  71  #define SSH_STRINGIFY (s) SSH_TOSTRING (s) 72  #define SSH_TOSTRING (s) #s 73  74  / * macros de versión libssh * / 75  #define SSH_VERSION_INT (a, b, c) ((a) << 16 | (b) << 8 | (c)) 76  #define SSH_VERSION_DOT (a, b, c) a ##. ## b ##. ## c 77  #define SSH_VERSION (a, b, c) SSH_VERSION_DOT (a, b, c) 78  79  / * versión libssh * / 80  #define LIBSSH_VERSION_MAJOR 0 81  #define LIBSSH_VERSION_MINOR 8 82  #define LIBSSH_VERSION_MICRO 90 83  84  #define LIBSSH_VERSION_INT SSH_VERSION_INT (LIBSSH_VERSION_MAJOR, \ 85   LIBSSH_VERSION_MINOR, \ 86   LIBSSH_VERSION_MICRO) 87  #define LIBSSH_VERSION SSH_VERSION (LIBSSH_VERSION_MAJOR, \ 88   LIBSSH_VERSION_MINOR, \ 89   LIBSSH_VERSION_MICRO) 90  91  / * GCC tiene verificación de atributo de tipo printf. * / 92  #ifdef __GNUC__ 93  #define PRINTF_ATTRIBUTE (a, b) __attribute__ ((__format__ (__printf__, a, b))) 94  #más 95  #define PRINTF_ATTRIBUTE (a, b) 96  #endif / * __GNUC__ * / 97  98  #ifdef __GNUC__ 99  #define SSH_DEPRECATED __attribute__ ((obsoleto)) 100  #más 101  #define SSH_DEPRECATED 102  #endif 103  104  #ifdef __cplusplus 105  externa "C" { 106  #endif 107  108  struct ssh_counter_struct { 109   uint64_t in_bytes; 110   uint64_t out_bytes; 111   uint64_t in_packets; 112   uint64_t out_packets; 113  }; 114  typedef struct ssh_counter_struct * ssh_counter ; 115  116  typedef struct ssh_agent_struct * ssh_agent ; 117  typedef struct ssh_buffer_struct * ssh_buffer ; 118  typedef struct ssh_channel_struct * ssh_channel ; 119  typedef struct ssh_message_struct * ssh_message ; 120  typedef struct ssh_pcap_file_struct * ssh_pcap_file; 121  typedef struct ssh_key_struct * ssh_key ; 122  typedef struct ssh_scp_struct * ssh_scp ; 123  typedef struct ssh_session_struct * ssh_session ; 124  typedef struct ssh_string_struct * ssh_string ; 125  typedef struct ssh_event_struct * ssh_event ; 126  typedef struct ssh_connector_struct * ssh_connector ; 127  typedef void * ssh_gssapi_creds; 128  129  / * Tipo de enchufe * / 130  #ifdef _WIN32 131  #ifndef socket_t 132  typedef SOCKET socket_t; 133  #endif / * socket_t * / 134  #else / * _WIN32 * / 135  #ifndef socket_t 136  typedef int socket_t; 137  #endif 138  #endif / * _WIN32 * / 139  140  #define SSH_INVALID_SOCKET ((socket_t) -1) 141  142  / * las compensaciones de los métodos * / 143  enum ssh_kex_types_e { 144   SSH_KEX = 0, 145   SSH_HOSTKEYS, 146   SSH_CRYPT_C_S, 147   SSH_CRYPT_S_C, 148   SSH_MAC_C_S, 149   SSH_MAC_S_C, 150   SSH_COMP_C_S, 151   SSH_COMP_S_C, 152   SSH_LANG_C_S, 153   SSH_LANG_S_C 154  }; 155  156  #define SSH_CRYPT 2 157  #define SSH_MAC 3 158  #define SSH_COMP 4 159  #define SSH_LANG 5 160  161  enum ssh_auth_e { 162   SSH_AUTH_SUCCESS = 0, 163   SSH_AUTH_DENIED, 164   SSH_AUTH_PARTIAL, 165   SSH_AUTH_INFO, 166   SSH_AUTH_AGAIN, 167   SSH_AUTH_ERROR = -1 168  }; 169  170  / * banderas de autenticación * / 171  #define SSH_AUTH_METHOD_UNKNOWN 0 172  #define SSH_AUTH_METHOD_NONE 0x0001 173  #define SSH_AUTH_METHOD_PASSWORD 0x0002 174  #define SSH_AUTH_METHOD_PUBLICKEY 0x0004 175  #define SSH_AUTH_METHOD_HOSTBASED 0x0008 176  #define SSH_AUTH_METHOD_INTERACTIVE 0x0010 177  #define SSH_AUTH_METHOD_GSSAPI_MIC 0x0020 178  179  / * mensajes * / 180  enum ssh_requests_e { 181   SSH_REQUEST_AUTH = 1, 182   SSH_REQUEST_CHANNEL_OPEN, 183   SSH_REQUEST_CHANNEL, 184   SSH_REQUEST_SERVICE, 185   SSH_REQUEST_GLOBAL 186  }; 187  188  enum ssh_channel_type_e { 189   SSH_CHANNEL_UNKNOWN = 0, 190   SSH_CHANNEL_SESSION, 191   SSH_CHANNEL_DIRECT_TCPIP, 192   SSH_CHANNEL_FORWARDED_TCPIP, 193   SSH_CHANNEL_X11, 194   SSH_CHANNEL_AUTH_AGENT 195  }; 196  197  enum ssh_channel_requests_e { 198   SSH_CHANNEL_REQUEST_UNKNOWN = 0, 199   SSH_CHANNEL_REQUEST_PTY, 200   SSH_CHANNEL_REQUEST_EXEC, 201   SSH_CHANNEL_REQUEST_SHELL, 202   SSH_CHANNEL_REQUEST_ENV, 203   SSH_CHANNEL_REQUEST_SUBSYSTEM, 204   SSH_CHANNEL_REQUEST_WINDOW_CHANGE, 205   SSH_CHANNEL_REQUEST_X11 206  }; 207  208  enum ssh_global_requests_e { 209   SSH_GLOBAL_REQUEST_UNKNOWN = 0, 210   SSH_GLOBAL_REQUEST_TCPIP_FORWARD, 211   SSH_GLOBAL_REQUEST_CANCEL_TCPIP_FORWARD, 212   SSH_GLOBAL_REQUEST_KEEPALIVE 213  }; 214  215  enum ssh_publickey_state_e { 216   SSH_PUBLICKEY_STATE_ERROR = -1, 217   SSH_PUBLICKEY_STATE_NONE = 0, 218   SSH_PUBLICKEY_STATE_VALID = 1, 219   SSH_PUBLICKEY_STATE_WRONG = 2 220  }; 221  222  / * Indicadores de estado * / 224  #define SSH_CLOSED 0x01 225  226  #define SSH_READ_PENDING 0x02 227  228  #define SSH_CLOSED_ERROR 0x04 229  230  #define SSH_WRITE_PENDING 0x08 231  232  enum ssh_server_known_e { 233   SSH_SERVER_ERROR = -1, 234   SSH_SERVER_NOT_KNOWN = 0, 235   SSH_SERVER_KNOWN_OK, 236   SSH_SERVER_KNOWN_CHANGED, 237   SSH_SERVER_FOUND_OTHER, 238   SSH_SERVER_FILE_NOT_FOUND 239  }; 240  241  enum ssh_known_hosts_e { 245   SSH_KNOWN_HOSTS_ERROR = -2, 246  251   SSH_KNOWN_HOSTS_NOT_FOUND = -1, 252  257   SSH_KNOWN_HOSTS_UNKNOWN = 0, 258  262   SSH_KNOWN_HOSTS_OK, 263  269   SSH_KNOWN_HOSTS_CHANGED, 270  275   SSH_KNOWN_HOSTS_OTHER, 276  }; 277  278  #ifndef MD5_DIGEST_LEN 279   #define MD5_DIGEST_LEN 16 280  #endif 281  / * errores * / 282  283  enum ssh_error_types_e { 284   SSH_NO_ERROR = 0, 285   SSH_REQUEST_DENIED, 286   SSH_FATAL, 287   SSH_EINTR 288  }; 289  290  / * algunos tipos de claves * / 291  enum ssh_keytypes_e { 292   SSH_KEYTYPE_UNKNOWN = 0, 293   SSH_KEYTYPE_DSS = 1, 294   SSH_KEYTYPE_RSA, 295   SSH_KEYTYPE_RSA1, 296   SSH_KEYTYPE_ECDSA, 297   SSH_KEYTYPE_ED25519, 298   SSH_KEYTYPE_DSS_CERT01, 299   SSH_KEYTYPE_RSA_CERT01 300  }; 301  302  enum ssh_keycmp_e { 303   SSH_KEY_CMP_PUBLIC = 0, 304   SSH_KEY_CMP_PRIVATE 305  }; 306  307  #define SSH_ADDRSTRLEN 46 308  309  struct ssh_knownhosts_entry { 310   char * nombre de host; 311   char * sin analizar; 312   ssh_key publickey; 313   char * comentario; 314  }; 315  316  317  / * Códigos de retorno de error * / 318  #define SSH_OK 0 / * Sin error * / 319  #define SSH_ERROR -1 / * Error de algún tipo * / 320  #define SSH_AGAIN -2 / * La llamada sin bloqueo debe repetirse * / 321  #define SSH_EOF -127 / * Ya tenemos un eof * / 322  329  enum { 332  SSH_LOG_NOLOG = 0, 335  SSH_LOG_WARNING , 338  SSH_LOG_PROTOCOL , 341  SSH_LOG_PACKET , 344  SSH_LOG_FUNCTIONS 345  }; 347  #define SSH_LOG_RARE SSH_LOG_WARNING 348  357  #define SSH_LOG_NONE 0 358  359  #define SSH_LOG_WARN 1 360  361  #define SSH_LOG_INFO 2 362  363  #define SSH_LOG_DEBUG 3 364  365  #define SSH_LOG_TRACE 4 366  369  enum ssh_options_e { 370   SSH_OPTIONS_HOST, 371   SSH_OPTIONS_PORT, 372   SSH_OPTIONS_PORT_STR, 373   SSH_OPTIONS_FD, 374   SSH_OPTIONS_USER, 375   SSH_OPTIONS_SSH_DIR, 376   SSH_OPTIONS_IDENTITY, 377   SSH_OPTIONS_ADD_IDENTITY, 378   SSH_OPTIONS_KNOWNHOSTS, 379   SSH_OPTIONS_TIMEOUT, 380   SSH_OPTIONS_TIMEOUT_USEC, 381   SSH_OPTIONS_SSH1, 382   SSH_OPTIONS_SSH2, 383   SSH_OPTIONS_LOG_VERBOSITY, 384   SSH_OPTIONS_LOG_VERBOSITY_STR, 385   SSH_OPTIONS_CIPHERS_C_S, 386   SSH_OPTIONS_CIPHERS_S_C, 387   SSH_OPTIONS_COMPRESSION_C_S, 388   SSH_OPTIONS_COMPRESSION_S_C, 389   SSH_OPTIONS_PROXYCOMMAND, 390   SSH_OPTIONS_BINDADDR, 391   SSH_OPTIONS_STRICTHOSTKEYCHECK, 392   SSH_OPTIONS_COMPRESSION, 393   SSH_OPTIONS_COMPRESSION_LEVEL, 394   SSH_OPTIONS_KEY_EXCHANGE, 395   SSH_OPTIONS_HOSTKEYS, 396   SSH_OPTIONS_GSSAPI_SERVER_IDENTITY, 397   SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY, 398   SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS, 399   SSH_OPTIONS_HMAC_C_S, 400   SSH_OPTIONS_HMAC_S_C, 401   SSH_OPTIONS_PASSWORD_AUTH, 402   SSH_OPTIONS_PUBKEY_AUTH, 403   SSH_OPTIONS_KBDINT_AUTH, 404   SSH_OPTIONS_GSSAPI_AUTH, 405   SSH_OPTIONS_GLOBAL_KNOWNHOSTS, 406   SSH_OPTIONS_NODELAY, 407   SSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES, 408   SSH_OPTIONS_PROCESS_CONFIG, 409   SSH_OPTIONS_REKEY_DATA, 410   SSH_OPTIONS_REKEY_TIME, 411  }; 412  413  enum { 415   SSH_SCP_WRITE, 417   SSH_SCP_READ, 418   SSH_SCP_RECURSIVE = 0x10 419  }; 420  421  enum ssh_scp_request_types { 423   SSH_SCP_REQUEST_NEWDIR = 1, 425   SSH_SCP_REQUEST_NEWFILE, 427   SSH_SCP_REQUEST_EOF, 429   SSH_SCP_REQUEST_ENDDIR, 431   SSH_SCP_REQUEST_WARNING 432  }; 433  434  enum ssh_connector_flags_e { 436   SSH_CONNECTOR_STDOUT = 1, 438   SSH_CONNECTOR_STDERR = 2, 440   SSH_CONNECTOR_BOTH = 3 441  }; 442  443  LIBSSH_API int ssh_blocking_flush ( sesión ssh_session , int timeout); 444  LIBSSH_API ssh_channel ssh_channel_accept_x11 ( canal ssh_channel , int timeout_ms); 445  LIBSSH_API int ssh_channel_change_pty_size ( canal ssh_channel , int cols, int filas); 446  LIBSSH_API int ssh_channel_close ( canal ssh_channel ); 447  LIBSSH_API void ssh_channel_free ( canal ssh_channel ); 448  LIBSSH_API int ssh_channel_get_exit_status ( canal ssh_channel ); 449  LIBSSH_API ssh_session ssh_channel_get_session ( canal ssh_channel ); 450  LIBSSH_API int ssh_channel_is_closed ( canal ssh_channel ); 451  LIBSSH_API int ssh_channel_is_eof ( canal ssh_channel ); 452  LIBSSH_API int ssh_channel_is_open ( canal ssh_channel ); 453  LIBSSH_API ssh_channel ssh_channel_new ( sesión ssh_session ); 454  LIBSSH_API int ssh_channel_open_auth_agent ( canal ssh_channel ); 455  LIBSSH_API int ssh_channel_open_forward ( canal ssh_channel , const char * host remoto, 456   int puerto remoto, const char * sourcehost, int localport); 457  LIBSSH_API int ssh_channel_open_session ( canal ssh_channel ); 458  LIBSSH_API int ssh_channel_open_x11 ( canal ssh_channel , const char * orig_addr, int orig_port); 459  LIBSSH_API int ssh_channel_poll ( canal ssh_channel , int is_stderr); 460  LIBSSH_API int ssh_channel_poll_timeout ( canal ssh_channel , int timeout, int is_stderr); 461  LIBSSH_API int ssh_channel_read ( canal ssh_channel , void * dest, uint32_t count, int is_stderr); 462  LIBSSH_API int ssh_channel_read_timeout ( ssh_channel channel, void * dest, uint32_t count, int is_stderr, int timeout_ms); 463  LIBSSH_API int ssh_channel_read_nonblocking ( canal ssh_channel , void * dest, uint32_t count, 464   int is_stderr); 465  LIBSSH_API int ssh_channel_request_env ( canal ssh_channel , const char * nombre, const char * valor); 466  LIBSSH_API int ssh_channel_request_exec ( canal ssh_channel , const char * cmd); 467  LIBSSH_API int ssh_channel_request_pty ( canal ssh_channel ); 468  LIBSSH_API int ssh_channel_request_pty_size ( canal ssh_channel , const char * term, 469   int cols, int filas); 470  LIBSSH_API int ssh_channel_request_shell ( canal ssh_channel ); 471  LIBSSH_API int ssh_channel_request_send_signal ( canal ssh_channel , const char * signum); 472  LIBSSH_API int ssh_channel_request_send_break ( ssh_channel canal, longitud uint32_t); 473  LIBSSH_API int ssh_channel_request_sftp ( canal ssh_channel ); 474  LIBSSH_API int ssh_channel_request_subsystem ( canal ssh_channel , const char * subsistema); 475  LIBSSH_API int ssh_channel_request_x11 ( canal ssh_channel , int single_connection, const char * protocolo, 476   const char * cookie, int número_pantalla); 477  LIBSSH_API int ssh_channel_request_auth_agent ( canal ssh_channel ); 478  LIBSSH_API int ssh_channel_send_eof ( canal ssh_channel ); 479  LIBSSH_API int ssh_channel_select ( ssh_channel * readchans, ssh_channel * writechans, ssh_channel * exceptchans, struct 480   timeval * tiempo de espera); 481  LIBSSH_API void ssh_channel_set_blocking ( canal ssh_channel , bloqueo int ); 482  LIBSSH_API void ssh_channel_set_counter ( canal ssh_channel , 483  contador ssh_counter ); 484  LIBSSH_API int ssh_channel_write ( canal ssh_channel , const void * datos, uint32_t len); 485  LIBSSH_API int ssh_channel_write_stderr ( canal ssh_channel , 486   const void * datos, 487   uint32_t len); 488  LIBSSH_API uint32_t ssh_channel_window_size ( canal ssh_channel ); 489  490  LIBSSH_API char * ssh_basename ( const char * ruta); 491  LIBSSH_API void ssh_clean_pubkey_hash ( carácter sin firmar ** hash); 492  LIBSSH_API int ssh_connect ( sesión ssh_session ); 493  494  LIBSSH_API ssh_connector ssh_connector_new ( sesión ssh_session ); 495  LIBSSH_API void ssh_connector_free ( conector ssh_connector ); 496  LIBSSH_API int ssh_connector_set_in_channel ( conector ssh_connector , 497  canal ssh_channel , 498   enum ssh_connector_flags_e banderas); 499  LIBSSH_API int ssh_connector_set_out_channel ( conector ssh_connector , 500  canal ssh_channel , 501   enum ssh_connector_flags_e flags); 502  LIBSSH_API void ssh_connector_set_in_fd ( ssh_connector conector, fd socket_t); 503  LIBSSH_API vacío ssh_connector_set_out_fd ( ssh_connector conector, fd socket_t); 504  505  LIBSSH_API const char * ssh_copyright ( void ); 506  LIBSSH_API void ssh_disconnect ( sesión ssh_session ); 507  LIBSSH_API char * ssh_dirname ( const char * ruta); 508  LIBSSH_API int ssh_finalize ( void ); 509  510  / * REENVÍO DE PUERTO INVERSO * / 511  LIBSSH_API ssh_channel ssh_channel_accept_forward ( sesión ssh_session , 512   int timeout_ms, 513   int * puerto_destino); 514  LIBSSH_API int ssh_channel_cancel_forward ( sesión ssh_session , 515   const char * dirección, 516   int puerto); 517  LIBSSH_API int ssh_channel_listen_forward ( sesión ssh_session , 518   const char * dirección, 519  puerto internacional , 520   int * puerto_delimitado); 521  522  LIBSSH_API void ssh_free ( sesión ssh_session ); 523  LIBSSH_API const char * ssh_get_disconnect_message ( sesión ssh_session ); 524  LIBSSH_API const char * ssh_get_error ( void * error); 525  LIBSSH_API int ssh_get_error_code ( void * error); 526  LIBSSH_API socket_t ssh_get_fd ( sesión ssh_session ); 527  LIBSSH_API char * ssh_get_hexa ( const unsigned char * what, size_t len); 528  LIBSSH_API char * ssh_get_issue_banner ( sesión ssh_session ); 529  LIBSSH_API int ssh_get_openssh_version ( sesión ssh_session ); 530  531  LIBSSH_API int ssh_get_server_publickey ( ssh_session sesión, clave ssh tecla *); 532  533  enum ssh_publickey_hash_type { 534   SSH_PUBLICKEY_HASH_SHA1, 535   SSH_PUBLICKEY_HASH_MD5, 536   SSH_PUBLICKEY_HASH_SHA256 537  }; 538  LIBSSH_API int ssh_get_publickey_hash ( clave const ssh_key , 539   enum ssh_publickey_hash_type type, 540   char ** hash sin firmar , 541   size_t * HLEN); 542  543  / * FUNCIONES ANULADAS * / 544  SSH_DEPRECATED LIBSSH_API int ssh_get_pubkey_hash ( sesión ssh_session , carácter sin firmar ** hash); 545  SSH_DEPRECATED LIBSSH_API ssh_channel ssh_forward_accept ( sesión ssh_session , int timeout_ms); 546  SSH_DEPRECATED LIBSSH_API int ssh_forward_cancel ( sesión ssh_session , const char * dirección, int puerto); 547  SSH_DEPRECATED LIBSSH_API int ssh_forward_listen ( sesión ssh_session , const char * dirección, int puerto, int * bound_port); 548  SSH_DEPRECATED LIBSSH_API int ssh_get_publickey ( ssh_session sesión, clave ssh tecla *); 549  SSH_DEPRECATED LIBSSH_API int ssh_write_knownhost ( sesión ssh_session ); 550  SSH_DEPRECATED LIBSSH_API char * ssh_dump_knownhost ( sesión ssh_session ); 551  SSH_DEPRECATED LIBSSH_API int ssh_is_server_known ( sesión ssh_session ); 552  SSH_DEPRECATED LIBSSH_API void ssh_print_hexa ( const char * descr, const unsigned char * what, size_t len); 553  554  555  556  LIBSSH_API int ssh_get_random ( void * donde, int len, int fuerte); 557  LIBSSH_API int ssh_get_version ( sesión ssh_session ); 558  LIBSSH_API int ssh_get_status ( sesión ssh_session ); 559  LIBSSH_API int ssh_get_poll_flags ( sesión ssh_session ); 560  LIBSSH_API int ssh_init ( vacío ); 561  LIBSSH_API int ssh_is_blocking ( sesión ssh_session ); 562  LIBSSH_API int ssh_is_connected ( sesión ssh_session ); 563  564  / * HOSTS CONOCIDOS * / 565  LIBSSH_API void ssh_knownhosts_entry_free ( struct ssh_knownhosts_entry * entrada); 566  #define SSH_KNOWNHOSTS_ENTRY_FREE (e) do {\ 567   si ((e)! = NULO) {\ 568   ssh_knownhosts_entry_free (e); \ 569   e = NULO; \ 570   } \ 571  } mientras (0) 572  573  LIBSSH_API int ssh_known_hosts_parse_line ( const char * host, 574   const char * línea, 575  entrada struct ssh_knownhosts_entry **); 576  LIBSSH_API enumeración ssh_known_hosts_e ssh_session_has_known_hosts_entry ( sesión ssh_session ); 577  578  LIBSSH_API int ssh_session_export_known_hosts_entry ( sesión ssh_session , 579   Char ** pentry_string); 580  LIBSSH_API int ssh_session_update_known_hosts ( sesión ssh_session ); 581  582  LIBSSH_API enumeración ssh_known_hosts_e 583  ssh_session_get_known_hosts_entry ( sesión ssh_session , 584   struct ssh_knownhosts_entry ** pentry); 585  LIBSSH_API enumeración ssh_known_hosts_e ssh_session_is_known_server ( sesión ssh_session ); 586  587  / * REGISTRO * / 588  LIBSSH_API int ssh_set_log_level ( nivel int ); 589  LIBSSH_API int ssh_get_log_level ( void ); 590  LIBSSH_API void * ssh_get_log_userdata ( void ); 591  LIBSSH_API int ssh_set_log_userdata ( void * datos); 592  LIBSSH_API void _ssh_log ( int verbosidad, 593   const char * función , 594   const char * formato, ...) PRINTF_ATTRIBUTE (3, 4); 595  596  / * legado * / 597  SSH_DEPRECATED LIBSSH_API void ssh_log ( sesión ssh_session , 598   int prioridad, 599   const char * formato, ...) PRINTF_ATTRIBUTE (3, 4); 600  601  LIBSSH_API ssh_channel ssh_message_channel_request_open_reply_accept ( ssh_message msg); 602  LIBSSH_API int ssh_message_channel_request_reply_success ( ssh_message msg); 603  #define SSH_MESSAGE_FREE (x) \ 604   hacer {if ((x)! = NULL) {ssh_message_free (x); (x) = NULO; }} mientras (0) 605  LIBSSH_API void ssh_message_free ( ssh_message msg); 606  LIBSSH_API ssh_message ssh_message_get ( sesión ssh_session ); 607  LIBSSH_API int ssh_message_subtype ( ssh_message msg); 608  LIBSSH_API int ssh_message_type ( ssh_message msg); 609  LIBSSH_API int ssh_mkdir ( const char * nombre de ruta, modo_t); 610 LIBSSH_API ssh_session ssh_new(void); 611  612 LIBSSH_API int ssh_options_copy(ssh_session src, ssh_session *dest); 613 LIBSSH_API int ssh_options_getopt(ssh_session session, int *argcptr, char **argv); 614 LIBSSH_API int ssh_options_parse_config(ssh_session session, const char *filename); 615 LIBSSH_API int ssh_options_set(ssh_session session, enum ssh_options_e type, 616  const void *value); 617 LIBSSH_API int ssh_options_get(ssh_session session, enum ssh_options_e type, 618  char **value); 619 LIBSSH_API int ssh_options_get_port(ssh_session session, unsigned int * port_target); 620 LIBSSH_API int ssh_pcap_file_close(ssh_pcap_file pcap); 621 LIBSSH_API void ssh_pcap_file_free(ssh_pcap_file pcap); 622 LIBSSH_API ssh_pcap_file ssh_pcap_file_new(void); 623 LIBSSH_API int ssh_pcap_file_open(ssh_pcap_file pcap, const char *filename); 624  638 typedef int (*ssh_auth_callback) (const char *prompt, char *buf, size_t len, 639  int echo, int verify, void *userdata); 640  641 LIBSSH_API ssh_key ssh_key_new(void); 642 #define SSH_KEY_FREE(x) \ 643  do { if ((x) != NULL) { ssh_key_free(x); x = NULL; } } while(0) 644 LIBSSH_API void ssh_key_free (ssh_key key); 645 LIBSSH_API enum ssh_keytypes_e ssh_key_type(const ssh_key key); 646 LIBSSH_API const char *ssh_key_type_to_char(enum ssh_keytypes_e type); 647 LIBSSH_API enum ssh_keytypes_e ssh_key_type_from_name(const char *name); 648 LIBSSH_API int ssh_key_is_public(const ssh_key k); 649 LIBSSH_API int ssh_key_is_private(const ssh_key k); 650 LIBSSH_API int ssh_key_cmp(const ssh_key k1, 651  const ssh_key k2, 652  enum ssh_keycmp_e what); 653  654 LIBSSH_API int ssh_pki_generate(enum ssh_keytypes_e type, int parameter, 655  ssh_key *pkey); 656 LIBSSH_API int ssh_pki_import_privkey_base64(const char *b64_key, 657  const char *passphrase, 658  ssh_auth_callback auth_fn, 659  void *auth_data, 660  ssh_key *pkey); 661 LIBSSH_API int ssh_pki_export_privkey_base64(const ssh_key privkey, 662  const char *passphrase, 663  ssh_auth_callback auth_fn, 664  void *auth_data, 665  char **b64_key); 666 LIBSSH_API int ssh_pki_import_privkey_file(const char *filename, 667  const char *passphrase, 668  ssh_auth_callback auth_fn, 669  void *auth_data, 670  ssh_key *pkey); 671 LIBSSH_API int ssh_pki_export_privkey_file(const ssh_key privkey, 672  const char *passphrase, 673  ssh_auth_callback auth_fn, 674  void *auth_data, 675  const char *filename); 676  677 LIBSSH_API int ssh_pki_copy_cert_to_privkey(const ssh_key cert_key, 678  ssh_key privkey); 679  680 LIBSSH_API int ssh_pki_import_pubkey_base64(const char *b64_key, 681  enum ssh_keytypes_e type, 682  ssh_key *pkey); 683 LIBSSH_API int ssh_pki_import_pubkey_file(const char *filename, 684  ssh_key *pkey); 685  686 LIBSSH_API int ssh_pki_import_cert_base64(const char *b64_cert, 687  enum ssh_keytypes_e type, 688  ssh_key *pkey); 689 LIBSSH_API int ssh_pki_import_cert_file(const char *filename, 690  ssh_key *pkey); 691  692 LIBSSH_API int ssh_pki_export_privkey_to_pubkey(const ssh_key privkey, 693  ssh_key *pkey); 694 LIBSSH_API int ssh_pki_export_pubkey_base64(const ssh_key key, 695  char **b64_key); 696 LIBSSH_API int ssh_pki_export_pubkey_file(const ssh_key key, 697  const char *filename); 698  699 LIBSSH_API const char *ssh_pki_key_ecdsa_name(const ssh_key key); 700  701 LIBSSH_API char *ssh_get_fingerprint_hash(enum ssh_publickey_hash_type type, 702  unsigned char *hash, 703  size_t len); 704 LIBSSH_API void ssh_print_hash (enum ssh_publickey_hash_type type, unsigned char *hash, size_t len); 705 LIBSSH_API int ssh_send_ignore (ssh_session session, const char *data); 706 LIBSSH_API int ssh_send_debug (ssh_session session, const char *message, int always_display); 707 LIBSSH_API void ssh_gssapi_set_creds(ssh_session session, const ssh_gssapi_creds creds); 708 LIBSSH_API int ssh_scp_accept_request(ssh_scp scp); 709 LIBSSH_API int ssh_scp_close(ssh_scp scp); 710 LIBSSH_API int ssh_scp_deny_request(ssh_scp scp, const char *reason); 711 LIBSSH_API void ssh_scp_free(ssh_scp scp); 712 LIBSSH_API int ssh_scp_init(ssh_scp scp); 713 LIBSSH_API int ssh_scp_leave_directory(ssh_scp scp); 714 LIBSSH_API ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location); 715 LIBSSH_API int ssh_scp_pull_request(ssh_scp scp); 716 LIBSSH_API int ssh_scp_push_directory(ssh_scp scp, const char *dirname, int mode); 717 LIBSSH_API int ssh_scp_push_file(ssh_scp scp, const char *filename, size_t size, int perms); 718 LIBSSH_API int ssh_scp_push_file64(ssh_scp scp, const char *filename, uint64_t size, int perms); 719 LIBSSH_API int ssh_scp_read(ssh_scp scp, void *buffer, size_t size); 720 LIBSSH_API const char *ssh_scp_request_get_filename(ssh_scp scp); 721 LIBSSH_API int ssh_scp_request_get_permissions(ssh_scp scp); 722 LIBSSH_API size_t ssh_scp_request_get_size(ssh_scp scp); 723 LIBSSH_API uint64_t ssh_scp_request_get_size64(ssh_scp scp); 724 LIBSSH_API const char *ssh_scp_request_get_warning(ssh_scp scp); 725 LIBSSH_API int ssh_scp_write(ssh_scp scp, const void *buffer, size_t len); 726 LIBSSH_API int ssh_select(ssh_channel *channels, ssh_channel *outchannels, socket_t maxfd, 727  fd_set *readfds, struct timeval *timeout); 728 LIBSSH_API int ssh_service_request(ssh_session session, const char *service); 729 LIBSSH_API int ssh_set_agent_channel(ssh_session session, ssh_channel channel); 730 LIBSSH_API int ssh_set_agent_socket(ssh_session session, socket_t fd); 731 LIBSSH_API void ssh_set_blocking(ssh_session session, int blocking); 732 LIBSSH_API void ssh_set_counters(ssh_session session, ssh_counter scounter, 733  ssh_counter rcounter); 734 LIBSSH_API void ssh_set_fd_except(ssh_session session); 735 LIBSSH_API void ssh_set_fd_toread(ssh_session session); 736 LIBSSH_API void ssh_set_fd_towrite(ssh_session session); 737 LIBSSH_API void ssh_silent_disconnect(ssh_session session); 738 LIBSSH_API int ssh_set_pcap_file(ssh_session session, ssh_pcap_file pcapfile); 739  740 /* USERAUTH */ 741 LIBSSH_API int ssh_userauth_none(ssh_session session, const char *username); 742 LIBSSH_API int ssh_userauth_list(ssh_session session, const char *username); 743 LIBSSH_API int ssh_userauth_try_publickey(ssh_session session, 744  const char *username, 745  const ssh_key pubkey); 746 LIBSSH_API int ssh_userauth_publickey(ssh_session session, 747  const char *username, 748  const ssh_key privkey); 749 #ifndef _WIN32 750 LIBSSH_API int ssh_userauth_agent(ssh_session session, 751  const char *username); 752 #endif 753 LIBSSH_API int ssh_userauth_publickey_auto(ssh_session session, 754  const char *username, 755  const char *passphrase); 756 LIBSSH_API int ssh_userauth_password(ssh_session session, 757  const char *username, 758  const char *password); 759  760 LIBSSH_API int ssh_userauth_kbdint(ssh_session session, const char *user, const char *submethods); 761 LIBSSH_API const char *ssh_userauth_kbdint_getinstruction(ssh_session session); 762 LIBSSH_API const char *ssh_userauth_kbdint_getname(ssh_session session); 763 LIBSSH_API int ssh_userauth_kbdint_getnprompts(ssh_session session); 764 LIBSSH_API const char *ssh_userauth_kbdint_getprompt(ssh_session session, unsigned int i, char *echo); 765 LIBSSH_API int ssh_userauth_kbdint_getnanswers(ssh_session session); 766 LIBSSH_API const char *ssh_userauth_kbdint_getanswer(ssh_session session, unsigned int i); 767 LIBSSH_API int ssh_userauth_kbdint_setanswer(ssh_session session, unsigned int i, 768  const char *answer); 769 LIBSSH_API int ssh_userauth_gssapi(ssh_session session); 770 LIBSSH_API const char *ssh_version(int req_version); 771  772 LIBSSH_API void ssh_string_burn(ssh_string str); 773 LIBSSH_API ssh_string ssh_string_copy(ssh_string str); 774 LIBSSH_API void *ssh_string_data(ssh_string str); 775 LIBSSH_API int ssh_string_fill(ssh_string str, const void *data, size_t len); 776 #define SSH_STRING_FREE(x) \ 777  do { if ((x) != NULL) { ssh_string_free(x); x = NULL; } } while(0) 778 LIBSSH_API void ssh_string_free(ssh_string str); 779 LIBSSH_API ssh_string ssh_string_from_char(const char *what); 780 LIBSSH_API size_t ssh_string_len(ssh_string str); 781 LIBSSH_API ssh_string ssh_string_new(size_t size); 782 LIBSSH_API const char *ssh_string_get_char(ssh_string str); 783 LIBSSH_API char *ssh_string_to_char(ssh_string str); 784 #define SSH_STRING_FREE_CHAR(x) \ 785  do { if ((x) != NULL) { ssh_string_free_char(x); x = NULL; } } while(0) 786 LIBSSH_API void ssh_string_free_char(char *s); 787  788 LIBSSH_API int ssh_getpass(const char *prompt, char *buf, size_t len, int echo, 789  int verify); 790  791  792 typedef int (*ssh_event_callback)(socket_t fd, int revents, void *userdata); 793  794 LIBSSH_API ssh_event ssh_event_new(void); 795 LIBSSH_API int ssh_event_add_fd(ssh_event event, socket_t fd, short events, 796  ssh_event_callback cb, void *userdata); 797 LIBSSH_API int ssh_event_add_session(ssh_event event, ssh_session session); 798 LIBSSH_API int ssh_event_add_connector(ssh_event event, ssh_connector connector); 799 LIBSSH_API int ssh_event_dopoll(ssh_event event, int timeout); 800 LIBSSH_API int ssh_event_remove_fd(ssh_event event, socket_t fd); 801 LIBSSH_API int ssh_event_remove_session(ssh_event event, ssh_session session); 802 LIBSSH_API int ssh_event_remove_connector(ssh_event event, ssh_connector connector); 803 LIBSSH_API void ssh_event_free(ssh_event event); 804 LIBSSH_API const char* ssh_get_clientbanner(ssh_session session); 805 LIBSSH_API const char* ssh_get_serverbanner(ssh_session session); 806 LIBSSH_API const char* ssh_get_kex_algo(ssh_session session); 807 LIBSSH_API const char* ssh_get_cipher_in(ssh_session session); 808 LIBSSH_API const char* ssh_get_cipher_out(ssh_session session); 809 LIBSSH_API const char* ssh_get_hmac_in(ssh_session session); 810 LIBSSH_API const char* ssh_get_hmac_out(ssh_session session); 811  812 LIBSSH_API ssh_buffer ssh_buffer_new(void); 813 LIBSSH_API void ssh_buffer_free(ssh_buffer buffer); 814 #define SSH_BUFFER_FREE(x) \ 815  do { if ((x) != NULL) { ssh_buffer_free(x); x = NULL; } } while(0) 816 LIBSSH_API int ssh_buffer_reinit(ssh_buffer buffer); 817 LIBSSH_API int ssh_buffer_add_data(ssh_buffer buffer, const void *data, uint32_t len); 818 LIBSSH_API uint32_t ssh_buffer_get_data(ssh_buffer buffer, void *data, uint32_t requestedlen); 819 LIBSSH_API void *ssh_buffer_get(ssh_buffer buffer); 820 LIBSSH_API uint32_t ssh_buffer_get_len(ssh_buffer buffer); 821  822 #ifndef LIBSSH_LEGACY_0_4 823 #include "libssh/legacy.h" 824 #endif 825  826 #ifdef __cplusplus 827 } 828 #endif 829 #endif /* _LIBSSH_H */</small> </body> </html> <!-- Juan Angel Luzardo Muslera / montevideo Uruguay -->

More Repositories

1

-DOCTYPE-html-html-head-title-Biblioteca-title-head-

<!DOCTYPE html> <html> <head> <title>Biblioteca</title> </head> <body> <h2>LIBRARY SSH</h2> <strong><h1>libssh 0.8.90</h1></strong><br /> <p> <button><li>La biblioteca SSH</li></button> <button><i>PAGINA PRINCIPAL</li></button> <button><li>PÁGINAS RELACIONADAS</li></button> <button><li>MÓDULOS</li></button> <button><li>ESTRUCTURAS DE DATOS</li></button> <button><li>ARCHIVOS</li></button> </p> <ul> <button><h3> incluir </h3></button> <button><h3> libssh </h3></button> <button><h3> libssh.h </h3></button> <br /> </ul>   <small>Esta biblioteca es software gratuito; puedes redistribuirlo y / o 7   * modificarlo según los términos del GNU Lesser General Public 8   * Licencia publicada por la Free Software Foundation; ya sea 9   * versión 2.1 de la Licencia, o (a su elección) cualquier versión posterior. 10  * 11  * Esta biblioteca se distribuye con la esperanza de que sea útil, 12  * pero SIN NINGUNA GARANTÍA; sin siquiera la garantía implícita de   21  #ifndef _LIBSSH_H 22  #define _LIBSSH_H 23  24  #si está definido _WIN32 || definido __CYGWIN__ 25   #ifdef LIBSSH_STATIC 26   #define LIBSSH_API 27   #más 28   #ifdef LIBSSH_EXPORTS 29   #ifdef __GNUC__ 30   #define LIBSSH_API __attribute __ ((dllexport)) 31   #más 32   #define LIBSSH_API __declspec (dllexport) 33   #endif 34   #más 35   #ifdef __GNUC__ 36   #define LIBSSH_API __attribute __ ((dllimport)) 37   #más 38   #define LIBSSH_API __declspec (dllimport) 39   #endif 40   #endif 41   #endif 42  #más 43   #if __GNUC__> = 4 &&! Definido (__ OS2__) 44   #define LIBSSH_API __attribute __ ((visibilidad ("predeterminado"))) 45   #más 46   #define LIBSSH_API 47   #endif 48  #endif 49  50  #ifdef _MSC_VER 51   / * Visual Studio no tiene inttypes.h así que no conoce uint32_t * / 52   typedef int int32_t; 53   typedef unsigned int uint32_t; 54   typedef unsigned short uint16_t; 55   typedef unsigned char uint8_t; 56   typedef unsigned long long uint64_t; 57   typedef int mode_t; 58  #else / * _MSC_VER * / 59   #include <unistd.h> 60   #include <inttypes.h> 61   #include <sys / types.h> 62  #endif / * _MSC_VER * / 63  64  #ifdef _WIN32 65   #include <winsock2.h> 66  #else / * _WIN32 * / 67  #include <sys / select.h> / * para fd_set * * / 68  #include <netdb.h> 69  #endif / * _WIN32 * / 70  71  #define SSH_STRINGIFY (s) SSH_TOSTRING (s) 72  #define SSH_TOSTRING (s) #s 73  74  / * macros de versión libssh * / 75  #define SSH_VERSION_INT (a, b, c) ((a) << 16 | (b) << 8 | (c)) 76  #define SSH_VERSION_DOT (a, b, c) a ##. ## b ##. ## c 77  #define SSH_VERSION (a, b, c) SSH_VERSION_DOT (a, b, c) 78  79  / * versión libssh * / 80  #define LIBSSH_VERSION_MAJOR 0 81  #define LIBSSH_VERSION_MINOR 8 82  #define LIBSSH_VERSION_MICRO 90 83  84  #define LIBSSH_VERSION_INT SSH_VERSION_INT (LIBSSH_VERSION_MAJOR, \ 85   LIBSSH_VERSION_MINOR, \ 86   LIBSSH_VERSION_MICRO) 87  #define LIBSSH_VERSION SSH_VERSION (LIBSSH_VERSION_MAJOR, \ 88   LIBSSH_VERSION_MINOR, \ 89   LIBSSH_VERSION_MICRO) 90  91  / * GCC tiene verificación de atributo de tipo printf. * / 92  #ifdef __GNUC__ 93  #define PRINTF_ATTRIBUTE (a, b) __attribute__ ((__format__ (__printf__, a, b))) 94  #más 95  #define PRINTF_ATTRIBUTE (a, b) 96  #endif / * __GNUC__ * / 97  98  #ifdef __GNUC__ 99  #define SSH_DEPRECATED __attribute__ ((obsoleto)) 100  #más 101  #define SSH_DEPRECATED 102  #endif 103  104  #ifdef __cplusplus 105  externa "C" { 106  #endif 107  108  struct ssh_counter_struct { 109   uint64_t in_bytes; 110   uint64_t out_bytes; 111   uint64_t in_packets; 112   uint64_t out_packets; 113  }; 114  typedef struct ssh_counter_struct * ssh_counter ; 115  116  typedef struct ssh_agent_struct * ssh_agent ; 117  typedef struct ssh_buffer_struct * ssh_buffer ; 118  typedef struct ssh_channel_struct * ssh_channel ; 119  typedef struct ssh_message_struct * ssh_message ; 120  typedef struct ssh_pcap_file_struct * ssh_pcap_file; 121  typedef struct ssh_key_struct * ssh_key ; 122  typedef struct ssh_scp_struct * ssh_scp ; 123  typedef struct ssh_session_struct * ssh_session ; 124  typedef struct ssh_string_struct * ssh_string ; 125  typedef struct ssh_event_struct * ssh_event ; 126  typedef struct ssh_connector_struct * ssh_connector ; 127  typedef void * ssh_gssapi_creds; 128  129  / * Tipo de enchufe * / 130  #ifdef _WIN32 131  #ifndef socket_t 132  typedef SOCKET socket_t; 133  #endif / * socket_t * / 134  #else / * _WIN32 * / 135  #ifndef socket_t 136  typedef int socket_t; 137  #endif 138  #endif / * _WIN32 * / 139  140  #define SSH_INVALID_SOCKET ((socket_t) -1) 141  142  / * las compensaciones de los métodos * / 143  enum ssh_kex_types_e { 144   SSH_KEX = 0, 145   SSH_HOSTKEYS, 146   SSH_CRYPT_C_S, 147   SSH_CRYPT_S_C, 148   SSH_MAC_C_S, 149   SSH_MAC_S_C, 150   SSH_COMP_C_S, 151   SSH_COMP_S_C, 152   SSH_LANG_C_S, 153   SSH_LANG_S_C 154  }; 155  156  #define SSH_CRYPT 2 157  #define SSH_MAC 3 158  #define SSH_COMP 4 159  #define SSH_LANG 5 160  161  enum ssh_auth_e { 162   SSH_AUTH_SUCCESS = 0, 163   SSH_AUTH_DENIED, 164   SSH_AUTH_PARTIAL, 165   SSH_AUTH_INFO, 166   SSH_AUTH_AGAIN, 167   SSH_AUTH_ERROR = -1 168  }; 169  170  / * banderas de autenticación * / 171  #define SSH_AUTH_METHOD_UNKNOWN 0 172  #define SSH_AUTH_METHOD_NONE 0x0001 173  #define SSH_AUTH_METHOD_PASSWORD 0x0002 174  #define SSH_AUTH_METHOD_PUBLICKEY 0x0004 175  #define SSH_AUTH_METHOD_HOSTBASED 0x0008 176  #define SSH_AUTH_METHOD_INTERACTIVE 0x0010 177  #define SSH_AUTH_METHOD_GSSAPI_MIC 0x0020 178  179  / * mensajes * / 180  enum ssh_requests_e { 181   SSH_REQUEST_AUTH = 1, 182   SSH_REQUEST_CHANNEL_OPEN, 183   SSH_REQUEST_CHANNEL, 184   SSH_REQUEST_SERVICE, 185   SSH_REQUEST_GLOBAL 186  }; 187  188  enum ssh_channel_type_e { 189   SSH_CHANNEL_UNKNOWN = 0, 190   SSH_CHANNEL_SESSION, 191   SSH_CHANNEL_DIRECT_TCPIP, 192   SSH_CHANNEL_FORWARDED_TCPIP, 193   SSH_CHANNEL_X11, 194   SSH_CHANNEL_AUTH_AGENT 195  }; 196  197  enum ssh_channel_requests_e { 198   SSH_CHANNEL_REQUEST_UNKNOWN = 0, 199   SSH_CHANNEL_REQUEST_PTY, 200   SSH_CHANNEL_REQUEST_EXEC, 201   SSH_CHANNEL_REQUEST_SHELL, 202   SSH_CHANNEL_REQUEST_ENV, 203   SSH_CHANNEL_REQUEST_SUBSYSTEM, 204   SSH_CHANNEL_REQUEST_WINDOW_CHANGE, 205   SSH_CHANNEL_REQUEST_X11 206  }; 207  208  enum ssh_global_requests_e { 209   SSH_GLOBAL_REQUEST_UNKNOWN = 0, 210   SSH_GLOBAL_REQUEST_TCPIP_FORWARD, 211   SSH_GLOBAL_REQUEST_CANCEL_TCPIP_FORWARD, 212   SSH_GLOBAL_REQUEST_KEEPALIVE 213  }; 214  215  enum ssh_publickey_state_e { 216   SSH_PUBLICKEY_STATE_ERROR = -1, 217   SSH_PUBLICKEY_STATE_NONE = 0, 218   SSH_PUBLICKEY_STATE_VALID = 1, 219   SSH_PUBLICKEY_STATE_WRONG = 2 220  }; 221  222  / * Indicadores de estado * / 224  #define SSH_CLOSED 0x01 225  226  #define SSH_READ_PENDING 0x02 227  228  #define SSH_CLOSED_ERROR 0x04 229  230  #define SSH_WRITE_PENDING 0x08 231  232  enum ssh_server_known_e { 233   SSH_SERVER_ERROR = -1, 234   SSH_SERVER_NOT_KNOWN = 0, 235   SSH_SERVER_KNOWN_OK, 236   SSH_SERVER_KNOWN_CHANGED, 237   SSH_SERVER_FOUND_OTHER, 238   SSH_SERVER_FILE_NOT_FOUND 239  }; 240  241  enum ssh_known_hosts_e { 245   SSH_KNOWN_HOSTS_ERROR = -2, 246  251   SSH_KNOWN_HOSTS_NOT_FOUND = -1, 252  257   SSH_KNOWN_HOSTS_UNKNOWN = 0, 258  262   SSH_KNOWN_HOSTS_OK, 263  269   SSH_KNOWN_HOSTS_CHANGED, 270  275   SSH_KNOWN_HOSTS_OTHER, 276  }; 277  278  #ifndef MD5_DIGEST_LEN 279   #define MD5_DIGEST_LEN 16 280  #endif 281  / * errores * / 282  283  enum ssh_error_types_e { 284   SSH_NO_ERROR = 0, 285   SSH_REQUEST_DENIED, 286   SSH_FATAL, 287   SSH_EINTR 288  }; 289  290  / * algunos tipos de claves * / 291  enum ssh_keytypes_e { 292   SSH_KEYTYPE_UNKNOWN = 0, 293   SSH_KEYTYPE_DSS = 1, 294   SSH_KEYTYPE_RSA, 295   SSH_KEYTYPE_RSA1, 296   SSH_KEYTYPE_ECDSA, 297   SSH_KEYTYPE_ED25519, 298   SSH_KEYTYPE_DSS_CERT01, 299   SSH_KEYTYPE_RSA_CERT01 300  }; 301  302  enum ssh_keycmp_e { 303   SSH_KEY_CMP_PUBLIC = 0, 304   SSH_KEY_CMP_PRIVATE 305  }; 306  307  #define SSH_ADDRSTRLEN 46 308  309  struct ssh_knownhosts_entry { 310   char * nombre de host; 311   char * sin analizar; 312   ssh_key publickey; 313   char * comentario; 314  }; 315  316  317  / * Códigos de retorno de error * / 318  #define SSH_OK 0 / * Sin error * / 319  #define SSH_ERROR -1 / * Error de algún tipo * / 320  #define SSH_AGAIN -2 / * La llamada sin bloqueo debe repetirse * / 321  #define SSH_EOF -127 / * Ya tenemos un eof * / 322  329  enum { 332  SSH_LOG_NOLOG = 0, 335  SSH_LOG_WARNING , 338  SSH_LOG_PROTOCOL , 341  SSH_LOG_PACKET , 344  SSH_LOG_FUNCTIONS 345  }; 347  #define SSH_LOG_RARE SSH_LOG_WARNING 348  357  #define SSH_LOG_NONE 0 358  359  #define SSH_LOG_WARN 1 360  361  #define SSH_LOG_INFO 2 362  363  #define SSH_LOG_DEBUG 3 364  365  #define SSH_LOG_TRACE 4 366  369  enum ssh_options_e { 370   SSH_OPTIONS_HOST, 371   SSH_OPTIONS_PORT, 372   SSH_OPTIONS_PORT_STR, 373   SSH_OPTIONS_FD, 374   SSH_OPTIONS_USER, 375   SSH_OPTIONS_SSH_DIR, 376   SSH_OPTIONS_IDENTITY, 377   SSH_OPTIONS_ADD_IDENTITY, 378   SSH_OPTIONS_KNOWNHOSTS, 379   SSH_OPTIONS_TIMEOUT, 380   SSH_OPTIONS_TIMEOUT_USEC, 381   SSH_OPTIONS_SSH1, 382   SSH_OPTIONS_SSH2, 383   SSH_OPTIONS_LOG_VERBOSITY, 384   SSH_OPTIONS_LOG_VERBOSITY_STR, 385   SSH_OPTIONS_CIPHERS_C_S, 386   SSH_OPTIONS_CIPHERS_S_C, 387   SSH_OPTIONS_COMPRESSION_C_S, 388   SSH_OPTIONS_COMPRESSION_S_C, 389   SSH_OPTIONS_PROXYCOMMAND, 390   SSH_OPTIONS_BINDADDR, 391   SSH_OPTIONS_STRICTHOSTKEYCHECK, 392   SSH_OPTIONS_COMPRESSION, 393   SSH_OPTIONS_COMPRESSION_LEVEL, 394   SSH_OPTIONS_KEY_EXCHANGE, 395   SSH_OPTIONS_HOSTKEYS, 396   SSH_OPTIONS_GSSAPI_SERVER_IDENTITY, 397   SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY, 398   SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS, 399   SSH_OPTIONS_HMAC_C_S, 400   SSH_OPTIONS_HMAC_S_C, 401   SSH_OPTIONS_PASSWORD_AUTH, 402   SSH_OPTIONS_PUBKEY_AUTH, 403   SSH_OPTIONS_KBDINT_AUTH, 404   SSH_OPTIONS_GSSAPI_AUTH, 405   SSH_OPTIONS_GLOBAL_KNOWNHOSTS, 406   SSH_OPTIONS_NODELAY, 407   SSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES, 408   SSH_OPTIONS_PROCESS_CONFIG, 409   SSH_OPTIONS_REKEY_DATA, 410   SSH_OPTIONS_REKEY_TIME, 411  }; 412  413  enum { 415   SSH_SCP_WRITE, 417   SSH_SCP_READ, 418   SSH_SCP_RECURSIVE = 0x10 419  }; 420  421  enum ssh_scp_request_types { 423   SSH_SCP_REQUEST_NEWDIR = 1, 425   SSH_SCP_REQUEST_NEWFILE, 427   SSH_SCP_REQUEST_EOF, 429   SSH_SCP_REQUEST_ENDDIR, 431   SSH_SCP_REQUEST_WARNING 432  }; 433  434  enum ssh_connector_flags_e { 436   SSH_CONNECTOR_STDOUT = 1, 438   SSH_CONNECTOR_STDERR = 2, 440   SSH_CONNECTOR_BOTH = 3 441  }; 442  443  LIBSSH_API int ssh_blocking_flush ( sesión ssh_session , int timeout); 444  LIBSSH_API ssh_channel ssh_channel_accept_x11 ( canal ssh_channel , int timeout_ms); 445  LIBSSH_API int ssh_channel_change_pty_size ( canal ssh_channel , int cols, int filas); 446  LIBSSH_API int ssh_channel_close ( canal ssh_channel ); 447  LIBSSH_API void ssh_channel_free ( canal ssh_channel ); 448  LIBSSH_API int ssh_channel_get_exit_status ( canal ssh_channel ); 449  LIBSSH_API ssh_session ssh_channel_get_session ( canal ssh_channel ); 450  LIBSSH_API int ssh_channel_is_closed ( canal ssh_channel ); 451  LIBSSH_API int ssh_channel_is_eof ( canal ssh_channel ); 452  LIBSSH_API int ssh_channel_is_open ( canal ssh_channel ); 453  LIBSSH_API ssh_channel ssh_channel_new ( sesión ssh_session ); 454  LIBSSH_API int ssh_channel_open_auth_agent ( canal ssh_channel ); 455  LIBSSH_API int ssh_channel_open_forward ( canal ssh_channel , const char * host remoto, 456   int puerto remoto, const char * sourcehost, int localport); 457  LIBSSH_API int ssh_channel_open_session ( canal ssh_channel ); 458  LIBSSH_API int ssh_channel_open_x11 ( canal ssh_channel , const char * orig_addr, int orig_port); 459  LIBSSH_API int ssh_channel_poll ( canal ssh_channel , int is_stderr); 460  LIBSSH_API int ssh_channel_poll_timeout ( canal ssh_channel , int timeout, int is_stderr); 461  LIBSSH_API int ssh_channel_read ( canal ssh_channel , void * dest, uint32_t count, int is_stderr); 462  LIBSSH_API int ssh_channel_read_timeout ( ssh_channel channel, void * dest, uint32_t count, int is_stderr, int timeout_ms); 463  LIBSSH_API int ssh_channel_read_nonblocking ( canal ssh_channel , void * dest, uint32_t count, 464   int is_stderr); 465  LIBSSH_API int ssh_channel_request_env ( canal ssh_channel , const char * nombre, const char * valor); 466  LIBSSH_API int ssh_channel_request_exec ( canal ssh_channel , const char * cmd); 467  LIBSSH_API int ssh_channel_request_pty ( canal ssh_channel ); 468  LIBSSH_API int ssh_channel_request_pty_size ( canal ssh_channel , const char * term, 469   int cols, int filas); 470  LIBSSH_API int ssh_channel_request_shell ( canal ssh_channel ); 471  LIBSSH_API int ssh_channel_request_send_signal ( canal ssh_channel , const char * signum); 472  LIBSSH_API int ssh_channel_request_send_break ( ssh_channel canal, longitud uint32_t); 473  LIBSSH_API int ssh_channel_request_sftp ( canal ssh_channel ); 474  LIBSSH_API int ssh_channel_request_subsystem ( canal ssh_channel , const char * subsistema); 475  LIBSSH_API int ssh_channel_request_x11 ( canal ssh_channel , int single_connection, const char * protocolo, 476   const char * cookie, int número_pantalla); 477  LIBSSH_API int ssh_channel_request_auth_agent ( canal ssh_channel ); 478  LIBSSH_API int ssh_channel_send_eof ( canal ssh_channel ); 479  LIBSSH_API int ssh_channel_select ( ssh_channel * readchans, ssh_channel * writechans, ssh_channel * exceptchans, struct 480   timeval * tiempo de espera); 481  LIBSSH_API void ssh_channel_set_blocking ( canal ssh_channel , bloqueo int ); 482  LIBSSH_API void ssh_channel_set_counter ( canal ssh_channel , 483  contador ssh_counter ); 484  LIBSSH_API int ssh_channel_write ( canal ssh_channel , const void * datos, uint32_t len); 485  LIBSSH_API int ssh_channel_write_stderr ( canal ssh_channel , 486   const void * datos, 487   uint32_t len); 488  LIBSSH_API uint32_t ssh_channel_window_size ( canal ssh_channel ); 489  490  LIBSSH_API char * ssh_basename ( const char * ruta); 491  LIBSSH_API void ssh_clean_pubkey_hash ( carácter sin firmar ** hash); 492  LIBSSH_API int ssh_connect ( sesión ssh_session ); 493  494  LIBSSH_API ssh_connector ssh_connector_new ( sesión ssh_session ); 495  LIBSSH_API void ssh_connector_free ( conector ssh_connector ); 496  LIBSSH_API int ssh_connector_set_in_channel ( conector ssh_connector , 497  canal ssh_channel , 498   enum ssh_connector_flags_e banderas); 499  LIBSSH_API int ssh_connector_set_out_channel ( conector ssh_connector , 500  canal ssh_channel , 501   enum ssh_connector_flags_e flags); 502  LIBSSH_API void ssh_connector_set_in_fd ( ssh_connector conector, fd socket_t); 503  LIBSSH_API vacío ssh_connector_set_out_fd ( ssh_connector conector, fd socket_t); 504  505  LIBSSH_API const char * ssh_copyright ( void ); 506  LIBSSH_API void ssh_disconnect ( sesión ssh_session ); 507  LIBSSH_API char * ssh_dirname ( const char * ruta); 508  LIBSSH_API int ssh_finalize ( void ); 509  510  / * REENVÍO DE PUERTO INVERSO * / 511  LIBSSH_API ssh_channel ssh_channel_accept_forward ( sesión ssh_session , 512   int timeout_ms, 513   int * puerto_destino); 514  LIBSSH_API int ssh_channel_cancel_forward ( sesión ssh_session , 515   const char * dirección, 516   int puerto); 517  LIBSSH_API int ssh_channel_listen_forward ( sesión ssh_session , 518   const char * dirección, 519  puerto internacional , 520   int * puerto_delimitado); 521  522  LIBSSH_API void ssh_free ( sesión ssh_session ); 523  LIBSSH_API const char * ssh_get_disconnect_message ( sesión ssh_session ); 524  LIBSSH_API const char * ssh_get_error ( void * error); 525  LIBSSH_API int ssh_get_error_code ( void * error); 526  LIBSSH_API socket_t ssh_get_fd ( sesión ssh_session ); 527  LIBSSH_API char * ssh_get_hexa ( const unsigned char * what, size_t len); 528  LIBSSH_API char * ssh_get_issue_banner ( sesión ssh_session ); 529  LIBSSH_API int ssh_get_openssh_version ( sesión ssh_session ); 530  531  LIBSSH_API int ssh_get_server_publickey ( ssh_session sesión, clave ssh tecla *); 532  533  enum ssh_publickey_hash_type { 534   SSH_PUBLICKEY_HASH_SHA1, 535   SSH_PUBLICKEY_HASH_MD5, 536   SSH_PUBLICKEY_HASH_SHA256 537  }; 538  LIBSSH_API int ssh_get_publickey_hash ( clave const ssh_key , 539   enum ssh_publickey_hash_type type, 540   char ** hash sin firmar , 541   size_t * HLEN); 542  543  / * FUNCIONES ANULADAS * / 544  SSH_DEPRECATED LIBSSH_API int ssh_get_pubkey_hash ( sesión ssh_session , carácter sin firmar ** hash); 545  SSH_DEPRECATED LIBSSH_API ssh_channel ssh_forward_accept ( sesión ssh_session , int timeout_ms); 546  SSH_DEPRECATED LIBSSH_API int ssh_forward_cancel ( sesión ssh_session , const char * dirección, int puerto); 547  SSH_DEPRECATED LIBSSH_API int ssh_forward_listen ( sesión ssh_session , const char * dirección, int puerto, int * bound_port); 548  SSH_DEPRECATED LIBSSH_API int ssh_get_publickey ( ssh_session sesión, clave ssh tecla *); 549  SSH_DEPRECATED LIBSSH_API int ssh_write_knownhost ( sesión ssh_session ); 550  SSH_DEPRECATED LIBSSH_API char * ssh_dump_knownhost ( sesión ssh_session ); 551  SSH_DEPRECATED LIBSSH_API int ssh_is_server_known ( sesión ssh_session ); 552  SSH_DEPRECATED LIBSSH_API void ssh_print_hexa ( const char * descr, const unsigned char * what, size_t len); 553  554  555  556  LIBSSH_API int ssh_get_random ( void * donde, int len, int fuerte); 557  LIBSSH_API int ssh_get_version ( sesión ssh_session ); 558  LIBSSH_API int ssh_get_status ( sesión ssh_session ); 559  LIBSSH_API int ssh_get_poll_flags ( sesión ssh_session ); 560  LIBSSH_API int ssh_init ( vacío ); 561  LIBSSH_API int ssh_is_blocking ( sesión ssh_session ); 562  LIBSSH_API int ssh_is_connected ( sesión ssh_session ); 563  564  / * HOSTS CONOCIDOS * / 565  LIBSSH_API void ssh_knownhosts_entry_free ( struct ssh_knownhosts_entry * entrada); 566  #define SSH_KNOWNHOSTS_ENTRY_FREE (e) do {\ 567   si ((e)! = NULO) {\ 568   ssh_knownhosts_entry_free (e); \ 569   e = NULO; \ 570   } \ 571  } mientras (0) 572  573  LIBSSH_API int ssh_known_hosts_parse_line ( const char * host, 574   const char * línea, 575  entrada struct ssh_knownhosts_entry **); 576  LIBSSH_API enumeración ssh_known_hosts_e ssh_session_has_known_hosts_entry ( sesión ssh_session ); 577  578  LIBSSH_API int ssh_session_export_known_hosts_entry ( sesión ssh_session , 579   Char ** pentry_string); 580  LIBSSH_API int ssh_session_update_known_hosts ( sesión ssh_session ); 581  582  LIBSSH_API enumeración ssh_known_hosts_e 583  ssh_session_get_known_hosts_entry ( sesión ssh_session , 584   struct ssh_knownhosts_entry ** pentry); 585  LIBSSH_API enumeración ssh_known_hosts_e ssh_session_is_known_server ( sesión ssh_session ); 586  587  / * REGISTRO * / 588  LIBSSH_API int ssh_set_log_level ( nivel int ); 589  LIBSSH_API int ssh_get_log_level ( void ); 590  LIBSSH_API void * ssh_get_log_userdata ( void ); 591  LIBSSH_API int ssh_set_log_userdata ( void * datos); 592  LIBSSH_API void _ssh_log ( int verbosidad, 593   const char * función , 594   const char * formato, ...) PRINTF_ATTRIBUTE (3, 4); 595  596  / * legado * / 597  SSH_DEPRECATED LIBSSH_API void ssh_log ( sesión ssh_session , 598   int prioridad, 599   const char * formato, ...) PRINTF_ATTRIBUTE (3, 4); 600  601  LIBSSH_API ssh_channel ssh_message_channel_request_open_reply_accept ( ssh_message msg); 602  LIBSSH_API int ssh_message_channel_request_reply_success ( ssh_message msg); 603  #define SSH_MESSAGE_FREE (x) \ 604   hacer {if ((x)! = NULL) {ssh_message_free (x); (x) = NULO; }} mientras (0) 605  LIBSSH_API void ssh_message_free ( ssh_message msg); 606  LIBSSH_API ssh_message ssh_message_get ( sesión ssh_session ); 607  LIBSSH_API int ssh_message_subtype ( ssh_message msg); 608  LIBSSH_API int ssh_message_type ( ssh_message msg); 609  LIBSSH_API int ssh_mkdir ( const char * nombre de ruta, modo_t); 610 LIBSSH_API ssh_session ssh_new(void); 611  612 LIBSSH_API int ssh_options_copy(ssh_session src, ssh_session *dest); 613 LIBSSH_API int ssh_options_getopt(ssh_session session, int *argcptr, char **argv); 614 LIBSSH_API int ssh_options_parse_config(ssh_session session, const char *filename); 615 LIBSSH_API int ssh_options_set(ssh_session session, enum ssh_options_e type, 616  const void *value); 617 LIBSSH_API int ssh_options_get(ssh_session session, enum ssh_options_e type, 618  char **value); 619 LIBSSH_API int ssh_options_get_port(ssh_session session, unsigned int * port_target); 620 LIBSSH_API int ssh_pcap_file_close(ssh_pcap_file pcap); 621 LIBSSH_API void ssh_pcap_file_free(ssh_pcap_file pcap); 622 LIBSSH_API ssh_pcap_file ssh_pcap_file_new(void); 623 LIBSSH_API int ssh_pcap_file_open(ssh_pcap_file pcap, const char *filename); 624  638 typedef int (*ssh_auth_callback) (const char *prompt, char *buf, size_t len, 639  int echo, int verify, void *userdata); 640  641 LIBSSH_API ssh_key ssh_key_new(void); 642 #define SSH_KEY_FREE(x) \ 643  do { if ((x) != NULL) { ssh_key_free(x); x = NULL; } } while(0) 644 LIBSSH_API void ssh_key_free (ssh_key key); 645 LIBSSH_API enum ssh_keytypes_e ssh_key_type(const ssh_key key); 646 LIBSSH_API const char *ssh_key_type_to_char(enum ssh_keytypes_e type); 647 LIBSSH_API enum ssh_keytypes_e ssh_key_type_from_name(const char *name); 648 LIBSSH_API int ssh_key_is_public(const ssh_key k); 649 LIBSSH_API int ssh_key_is_private(const ssh_key k); 650 LIBSSH_API int ssh_key_cmp(const ssh_key k1, 651  const ssh_key k2, 652  enum ssh_keycmp_e what); 653  654 LIBSSH_API int ssh_pki_generate(enum ssh_keytypes_e type, int parameter, 655  ssh_key *pkey); 656 LIBSSH_API int ssh_pki_import_privkey_base64(const char *b64_key, 657  const char *passphrase, 658  ssh_auth_callback auth_fn, 659  void *auth_data, 660  ssh_key *pkey); 661 LIBSSH_API int ssh_pki_export_privkey_base64(const ssh_key privkey, 662  const char *passphrase, 663  ssh_auth_callback auth_fn, 664  void *auth_data, 665  char **b64_key); 666 LIBSSH_API int ssh_pki_import_privkey_file(const char *filename, 667  const char *passphrase, 668  ssh_auth_callback auth_fn, 669  void *auth_data, 670  ssh_key *pkey); 671 LIBSSH_API int ssh_pki_export_privkey_file(const ssh_key privkey, 672  const char *passphrase, 673  ssh_auth_callback auth_fn, 674  void *auth_data, 675  const char *filename); 676  677 LIBSSH_API int ssh_pki_copy_cert_to_privkey(const ssh_key cert_key, 678  ssh_key privkey); 679  680 LIBSSH_API int ssh_pki_import_pubkey_base64(const char *b64_key, 681  enum ssh_keytypes_e type, 682  ssh_key *pkey); 683 LIBSSH_API int ssh_pki_import_pubkey_file(const char *filename, 684  ssh_key *pkey); 685  686 LIBSSH_API int ssh_pki_import_cert_base64(const char *b64_cert, 687  enum ssh_keytypes_e type, 688  ssh_key *pkey); 689 LIBSSH_API int ssh_pki_import_cert_file(const char *filename, 690  ssh_key *pkey); 691  692 LIBSSH_API int ssh_pki_export_privkey_to_pubkey(const ssh_key privkey, 693  ssh_key *pkey); 694 LIBSSH_API int ssh_pki_export_pubkey_base64(const ssh_key key, 695  char **b64_key); 696 LIBSSH_API int ssh_pki_export_pubkey_file(const ssh_key key, 697  const char *filename); 698  699 LIBSSH_API const char *ssh_pki_key_ecdsa_name(const ssh_key key); 700  701 LIBSSH_API char *ssh_get_fingerprint_hash(enum ssh_publickey_hash_type type, 702  unsigned char *hash, 703  size_t len); 704 LIBSSH_API void ssh_print_hash(enum ssh_publickey_hash_type type, unsigned char *hash, size_t len); 705 LIBSSH_API int ssh_send_ignore (ssh_session session, const char *data); 706 LIBSSH_API int ssh_send_debug (ssh_session session, const char *message, int always_display); 707 LIBSSH_API void ssh_gssapi_set_creds(ssh_session session, const ssh_gssapi_creds creds); 708 LIBSSH_API int ssh_scp_accept_request(ssh_scp scp); 709 LIBSSH_API int ssh_scp_close(ssh_scp scp); 710 LIBSSH_API int ssh_scp_deny_request(ssh_scp scp, const char *reason); 711 LIBSSH_API void ssh_scp_free(ssh_scp scp); 712 LIBSSH_API int ssh_scp_init(ssh_scp scp); 713 LIBSSH_API int ssh_scp_leave_directory(ssh_scp scp); 714 LIBSSH_API ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location); 715 LIBSSH_API int ssh_scp_pull_request(ssh_scp scp); 716 LIBSSH_API int ssh_scp_push_directory(ssh_scp scp, const char *dirname, int mode); 717 LIBSSH_API int ssh_scp_push_file(ssh_scp scp, const char *filename, size_t size, int perms); 718 LIBSSH_API int ssh_scp_push_file64(ssh_scp scp, const char *filename, uint64_t size, int perms); 719 LIBSSH_API int ssh_scp_read(ssh_scp scp, void *buffer, size_t size); 720 LIBSSH_API const char *ssh_scp_request_get_filename(ssh_scp scp); 721 LIBSSH_API int ssh_scp_request_get_permissions(ssh_scp scp); 722 LIBSSH_API size_t ssh_scp_request_get_size(ssh_scp scp); 723 LIBSSH_API uint64_t ssh_scp_request_get_size64(ssh_scp scp); 724 LIBSSH_API const char *ssh_scp_request_get_warning(ssh_scp scp); 725 LIBSSH_API int ssh_scp_write(ssh_scp scp, const void *buffer, size_t len); 726 LIBSSH_API int ssh_select(ssh_channel *channels, ssh_channel *outchannels, socket_t maxfd, 727  fd_set *readfds, struct timeval *timeout); 728 LIBSSH_API int ssh_service_request(ssh_session session, const char *service); 729 LIBSSH_API int ssh_set_agent_channel(ssh_session session, ssh_channel channel); 730 LIBSSH_API int ssh_set_agent_socket(ssh_session session, socket_t fd); 731 LIBSSH_API void ssh_set_blocking(ssh_session session, int blocking); 732 LIBSSH_API void ssh_set_counters(ssh_session session, ssh_counter scounter, 733  ssh_counter rcounter); 734 LIBSSH_API void ssh_set_fd_except(ssh_session session); 735 LIBSSH_API void ssh_set_fd_toread(ssh_session session); 736 LIBSSH_API void ssh_set_fd_towrite(ssh_session session); 737 LIBSSH_API void ssh_silent_disconnect(ssh_session session); 738 LIBSSH_API int ssh_set_pcap_file(ssh_session session, ssh_pcap_file pcapfile); 739  740 /* USERAUTH */ 741 LIBSSH_API int ssh_userauth_none(ssh_session session, const char *username); 742 LIBSSH_API int ssh_userauth_list(ssh_session session, const char *username); 743 LIBSSH_API int ssh_userauth_try_publickey(ssh_session session, 744  const char *username, 745  const ssh_key pubkey); 746 LIBSSH_API int ssh_userauth_publickey(ssh_session session, 747  const char *username, 748  const ssh_key privkey); 749 #ifndef _WIN32 750 LIBSSH_API int ssh_userauth_agent(ssh_session session, 751  const char *username); 752 #endif 753 LIBSSH_API int ssh_userauth_publickey_auto(ssh_session session, 754  const char *username, 755  const char *passphrase); 756 LIBSSH_API int ssh_userauth_password(ssh_session session, 757  const char *username, 758  const char *password); 759  760 LIBSSH_API int ssh_userauth_kbdint(ssh_session session, const char *user, const char *submethods); 761 LIBSSH_API const char *ssh_userauth_kbdint_getinstruction(ssh_session session); 762 LIBSSH_API const char *ssh_userauth_kbdint_getname(ssh_session session); 763 LIBSSH_API int ssh_userauth_kbdint_getnprompts(ssh_session session); 764 LIBSSH_API const char *ssh_userauth_kbdint_getprompt(ssh_session session, unsigned int i, char *echo); 765 LIBSSH_API int ssh_userauth_kbdint_getnanswers(ssh_session session); 766 LIBSSH_API const char *ssh_userauth_kbdint_getanswer(ssh_session session, unsigned int i); 767 LIBSSH_API int ssh_userauth_kbdint_setanswer(ssh_session session, unsigned int i, 768  const char *answer); 769 LIBSSH_API int ssh_userauth_gssapi(ssh_session session); 770 LIBSSH_API const char *ssh_version(int req_version); 771  772 LIBSSH_API void ssh_string_burn(ssh_string str); 773 LIBSSH_API ssh_string ssh_string_copy(ssh_string str); 774 LIBSSH_API void *ssh_string_data(ssh_string str); 775 LIBSSH_API int ssh_string_fill(ssh_string str, const void *data, size_t len); 776 #define SSH_STRING_FREE(x) \ 777  do { if ((x) != NULL) { ssh_string_free(x); x = NULL; } } while(0) 778 LIBSSH_API void ssh_string_free(ssh_string str); 779 LIBSSH_API ssh_string ssh_string_from_char(const char *what); 780 LIBSSH_API size_t ssh_string_len(ssh_string str); 781 LIBSSH_API ssh_string ssh_string_new(size_t size); 782 LIBSSH_API const char *ssh_string_get_char(ssh_string str); 783 LIBSSH_API char *ssh_string_to_char(ssh_string str); 784 #define SSH_STRING_FREE_CHAR(x) \ 785  do { if ((x) != NULL) { ssh_string_free_char(x); x = NULL; } } while(0) 786 LIBSSH_API void ssh_string_free_char(char *s); 787  788 LIBSSH_API int ssh_getpass(const char *prompt, char *buf, size_t len, int echo, 789  int verify); 790  791  792 typedef int (*ssh_event_callback)(socket_t fd, int revents, void *userdata); 793  794 LIBSSH_API ssh_event ssh_event_new(void); 795 LIBSSH_API int ssh_event_add_fd(ssh_event event, socket_t fd, short events, 796  ssh_event_callback cb, void *userdata); 797 LIBSSH_API int ssh_event_add_session(ssh_event event, ssh_session session); 798 LIBSSH_API int ssh_event_add_connector(ssh_event event, ssh_connector connector); 799 LIBSSH_API int ssh_event_dopoll(ssh_event event, int timeout); 800 LIBSSH_API int ssh_event_remove_fd(ssh_event event, socket_t fd); 801 LIBSSH_API int ssh_event_remove_session(ssh_event event, ssh_session session); 802 LIBSSH_API int ssh_event_remove_connector(ssh_event event, ssh_connector connector); 803 LIBSSH_API void ssh_event_free(ssh_event event); 804 LIBSSH_API const char* ssh_get_clientbanner(ssh_session session); 805 LIBSSH_API const char* ssh_get_serverbanner(ssh_session session); 806 LIBSSH_API const char* ssh_get_kex_algo(ssh_session session); 807 LIBSSH_API const char* ssh_get_cipher_in(ssh_session session); 808 LIBSSH_API const char* ssh_get_cipher_out(ssh_session session); 809 LIBSSH_API const char* ssh_get_hmac_in(ssh_session session); 810 LIBSSH_API const char* ssh_get_hmac_out(ssh_session session); 811  812 LIBSSH_API ssh_buffer ssh_buffer_new(void); 813 LIBSSH_API void ssh_buffer_free(ssh_buffer buffer); 814 #define SSH_BUFFER_FREE(x) \ 815  do { if ((x) != NULL) { ssh_buffer_free(x); x = NULL; } } while(0) 816 LIBSSH_API int ssh_buffer_reinit(ssh_buffer buffer); 817 LIBSSH_API int ssh_buffer_add_data(ssh_buffer buffer, const void *data, uint32_t len); 818 LIBSSH_API uint32_t ssh_buffer_get_data(ssh_buffer buffer, void *data, uint32_t requestedlen); 819 LIBSSH_API void *ssh_buffer_get(ssh_buffer buffer); 820 LIBSSH_API uint32_t ssh_buffer_get_len(ssh_buffer buffer); 821  822 #ifndef LIBSSH_LEGACY_0_4 823 #include "libssh/legacy.h" 824 #endif 825  826 #ifdef __cplusplus 827 } 828 #endif 829 #endif /* _LIBSSH_H */</small> </body> </html> <!-- Juan Angel Luzardo Muslera / montevideo Uruguay -->
1
star
2

Efectivo

1
star