linux/fs/ncpfs/ncpsign_kernel.c
<<
on v.6./spa> .6./form .6.a on v.6 href="../linux+v3v2.1/fs/ncpfs/ncpsign_kernel.c">on v.6.img src="../.static/gfx/right.png" alt=">>">on./spa> on.spa> class="lxr_search">on v="+search" method="post" onsubmit="return do_search(this);">on v.6.input typn> hidden" namn> navtarget" ption> ">on v.6.input typn> text" namn> search" id> search">on v.6.butt submit">Search on.spa> class="lxr_prefs" .6.a href="+prefs?return=fs/ncpfs/ncpsign_kernel.c"on v.6 onclick="return ajax_prefs();">on v.6Prefs .6./a>on./spa> v.6 6./div v.6 6.form ac >="ajax+*" method="post" onsubmit="return false;">on.input typn> hidden" namn> ajax_lookup" id> ajax_lookup" ption> ">o v.6 6./form o v.6 6.div class="headingbott
search_results" class="search_results" . v.6 6./div .div id> content"> .div id> file_contents"
12/0e/4cd5ef9c5f8d6fbc0f6a5746728ba1b27a21_3/0"

L1" class="line" namn>
L1">6 61./a>.spa> class="comment">/*./spa>
 
L2" class="line" namn>
L2">6 62./a>.spa> class="comment"> *  ncpsign_kernel.c./spa>
 
L3" class="line" namn>
L3">6 63./a>.spa> class="comment"> *./spa>
 
L4" class="line" namn>
L4">6 64./a>.spa> class="comment"> *  Arne de Bruijn (arne@knoware.nl), 1997./spa>
 
L5" class="line" namn>
L5">6 65./a>.spa> class="comment"> *./spa>
 
L6" class="line" namn>
L6">6 66./a>.spa> class="comment"> */./spa>
 
L7" class="line" namn>
L7">6 67./a>o
L8" class="line" namn>
L8">6 68./a>o
L9" class="line" namn>
L9">6 69./a>#ifdef6.a href="+code=CONFIG_NCPFS_PACKET_SIGNING" class="sref">CONFIG_NCPFS_PACKET_SIGNING./a>o
L10" class="line" namn>
L10">6 .10"a>o
L11" class="line" namn>
L11">6 11./a>#include <linux/string.h./a>>o
L12" class="line" namn>
L12">6 12./a>#include <linux/ncp.h./a>>o
L13" class="line" namn>
L13">6 13./a>#include <linux/bitops.h./a>>o
L14" class="line" namn>
L14">6 14./a>#include "ncp_fs.h./a>"o
L15" class="line" namn>
L15">6 15./a>#include "ncpsign_kernel.h./a>"o
L16" class="line" namn>
L16">6 160"a>o
L17" class="line" namn>
L17">6 17./a>.spa> class="comment">/* i386: 32-bit, little endian, handles mis-alignment */./spa>
 
L18" class="line" namn>
L18">6 18./a>#ifdef6.a href="+code=__i386__" class="sref">__i386__0"a>o
L19" class="line" namn>
L19">6 19./a>#define6.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=p" class="sref">p./a>) (*(const int *)(.a href="+code=p" class="sref">p./a>)) 
L20" class="line" namn>
L20">6 20./a>#define6.a href="+code=PUT_LE32" class="sref">PUT_LE32./a>(.a href="+code=p" class="sref">p./a>,.a href="+code=v" class="sref">v./a>) { *(int *)(.a href="+code=p" class="sref">p./a>)=.a href="+code=v" class="sref">v./a>; } 
L21" class="line" namn>
L21">6 21./a>#else 
L22" class="line" namn>
L22">6 22./a>.spa> class="comment">/* from include/ncplib.h */./spa>
 
L23" class="line" namn>
L23">6 23./a>#define6.a href="+code=BVAL" class="sref">BVAL./a>(.a href="+code=buf" class="sref">buf./a>,.a href="+code=pos" class="sref">pos./a>) (((const .a href="+code=__u8" class="sref">__u8./a> *)(.a href="+code=buf" class="sref">buf./a>))[.a href="+code=pos" class="sref">pos./a>]) 
L24" class="line" namn>
L24">6 24./a>#define6.a href="+code=PVAL" class="sref">PVAL./a>(.a href="+code=buf" class="sref">buf./a>,.a href="+code=pos" class="sref">pos./a>) ((unsigned).a href="+code=BVAL" class="sref">BVAL./a>(.a href="+code=buf" class="sref">buf./a>,.a href="+code=pos" class="sref">pos./a>)) 
L25" class="line" namn>
L25">6 25./a>#define6.a href="+code=BSET" class="sref">BSET./a>(.a href="+code=buf" class="sref">buf./a>,.a href="+code=pos" class="sref">pos./a>,.a href="+code=val" class="sref">val./a>) (((.a href="+code=__u8" class="sref">__u8./a> *)(.a href="+code=buf" class="sref">buf./a>))[.a href="+code=pos" class="sref">pos./a>] = (.a href="+code=val" class="sref">val./a>)) 
L26" class="line" namn>
L26">6 260"a>o
L27" class="line" namn>
L27">6 27./a>static6.a href="+code=inline" class="sref">inline./a> .a href="+code=__u16" class="sref">__u160"a>o
L28" class="line" namn>
L28">6 28./a>.a href="+code=WVAL_LH" class="sref">WVAL_LH./a>(const .a href="+code=__u8" class="sref">__u8./a> * .a href="+code=buf" class="sref">buf./a>, int .a href="+code=pos" class="sref">pos./a>)o
L29" class="line" namn>
L29">6 29./a>{ 
L30" class="line" namn>
L30">6 30./a>        return .a href="+code=PVAL" class="sref">PVAL./a>(.a href="+code=buf" class="sref">buf./a>, .a href="+code=pos" class="sref">pos./a>) | .a href="+code=PVAL" class="sref">PVAL./a>(.a href="+code=buf" class="sref">buf./a>, .a href="+code=pos" class="sref">pos./a> + 1) << 8;o
L31" class="line" namn>
L31">6 31./a>} 
L32" class="line" namn>
L32">6 32./a>static6.a href="+code=inline" class="sref">inline./a> .a href="+code=__u32" class="sref">__u320"a>o
L33" class="line" namn>
L33">6 33./a>.a href="+code=DVAL_LH" class="sref">DVAL_LH./a>(const .a href="+code=__u8" class="sref">__u8./a> * .a href="+code=buf" class="sref">buf./a>, int .a href="+code=pos" class="sref">pos./a>)o
L34" class="line" namn>
L34">6 34./a>{ 
L35" class="line" namn>
L35">6 35./a>        return .a href="+code=WVAL_LH" class="sref">WVAL_LH./a>(.a href="+code=buf" class="sref">buf./a>, .a href="+code=pos" class="sref">pos./a>) | .a href="+code=WVAL_LH" class="sref">WVAL_LH./a>(.a href="+code=buf" class="sref">buf./a>, .a href="+code=pos" class="sref">pos./a> + 2) << 16;o
L36" class="line" namn>
L36">6 36./a>} 
L37" class="line" namn>
L37">6 37./a>static6.a href="+code=inline" class="sref">inline./a> void 
L38" class="line" namn>
L38">6 38./a>.a href="+code=WSET_LH" class="sref">WSET_LH./a>(.a href="+code=__u8" class="sref">__u8./a> * .a href="+code=buf" class="sref">buf./a>, int .a href="+code=pos" class="sref">pos./a>, .a href="+code=__u16" class="sref">__u160"a> .a href="+code=val" class="sref">val./a>) 
L39" class="line" namn>
L39">6 39./a>{ 
L40" class="line" namn>
L40">6 40./a>        .a href="+code=BSET" class="sref">BSET./a>(.a href="+code=buf" class="sref">buf./a>, .a href="+code=pos" class="sref">pos./a>, .a href="+code=val" class="sref">val./a> & 0xff);o
L41" class="line" namn>
L41">6 41./a>        .a href="+code=BSET" class="sref">BSET./a>(.a href="+code=buf" class="sref">buf./a>, .a href="+code=pos" class="sref">pos./a> + 1, .a href="+code=val" class="sref">val./a> >> 8);o
L42" class="line" namn>
L42">6 42./a>} 
L43" class="line" namn>
L43">6 43./a>static6.a href="+code=inline" class="sref">inline./a> void 
L44" class="line" namn>
L44">6 44./a>.a href="+code=DSET_LH" class="sref">DSET_LH./a>(.a href="+code=__u8" class="sref">__u8./a> * .a href="+code=buf" class="sref">buf./a>, int .a href="+code=pos" class="sref">pos./a>, .a href="+code=__u32" class="sref">__u320"a> .a href="+code=val" class="sref">val./a>) 
L45" class="line" namn>
L45">6 45./a>{ 
L46" class="line" namn>
L46">6 46./a>        .a href="+code=WSET_LH" class="sref">WSET_LH./a>(.a href="+code=buf" class="sref">buf./a>, .a href="+code=pos" class="sref">pos./a>, .a href="+code=val" class="sref">val./a> & 0xffff);o
L47" class="line" namn>
L47">6 47./a>        .a href="+code=WSET_LH" class="sref">WSET_LH./a>(.a href="+code=buf" class="sref">buf./a>, .a href="+code=pos" class="sref">pos./a> + 2, .a href="+code=val" class="sref">val./a> >> 16);o
L48" class="line" namn>
L48">6 48./a>} 
L49" class="line" namn>
L49">6 490"a>o
L50" class="line" namn>
L50">6 50./a>#define6.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=p" class="sref">p./a>) .a href="+code=DVAL_LH" class="sref">DVAL_LH./a>(.a href="+code=p" class="sref">p./a>,0) 
L51" class="line" namn>
L51">6 51./a>#define6.a href="+code=PUT_LE32" class="sref">PUT_LE32./a>(.a href="+code=p" class="sref">p./a>,.a href="+code=v" class="sref">v./a>) .a href="+code=DSET_LH" class="sref">DSET_LH./a>(.a href="+code=p" class="sref">p./a>,0,.a href="+code=v" class="sref">v./a>) 
L52" class="line" namn>
L52">6 52./a>#endif 
L53" class="line" namn>
L53">6 530"a>o
L54" class="line" namn>
L54">6 54./a>static6void .a href="+code=nwsign" class="sref">nwsign./a>(char *.a href="+code=r_data1" class="sref">r_data1./a>, char *.a href="+code=r_data2" class="sref">r_data2./a>, char *.a href="+code=outdata" class="sref">outdata./a>) {o
L55" class="line" namn>
L55">6 55./a> int .a href="+code=i" class="sref">i./a>;o
L56" class="line" namn>
L56">6 56./a> unsigned int .a href="+code=w0" class="sref">w0./a>,.a href="+code=w1" class="sref">w1./a>,.a href="+code=w2" class="sref">w2./a>,.a href="+code=w3" class="sref">w3./a>;o
L57" class="line" namn>
L57">6 57./a> static6int .a href="+code=rbit" class="sref">rbit./a>[4]={0, 2, 1, 3};o
L58" class="line" namn>
L58">6 58./a>#ifdef6.a href="+code=__i386__" class="sref">__i386__0"a>o
L59" class="line" namn>
L59">6 59./a> unsigned int *.a href="+code=data2" class="sref">data2./a>=(unsigned int *).a href="+code=r_data2" class="sref">r_data2./a>;o
L60" class="line" namn>
L60">6 60./a>#else 
L61" class="line" namn>
L61">6 61./a> unsigned int .a href="+code=data2" class="sref">data2./a>[16];o
L62" class="line" namn>
L62">6 620"a> for (.a href="+code=i" class="sref">i./a>=0;.a href="+code=i" class="sref">i./a><16;.a href="+code=i" class="sref">i./a>++) 
L63" class="line" namn>
L63">6 63./a>  .a href="+code=data2" class="sref">data2./a>[.a href="+code=i" class="sref">i./a>]=.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=r_data2" class="sref">r_data2./a>+(.a href="+code=i" class="sref">i./a><<2));o
L64" class="line" namn>
L64">6 64./a>#endif o
L65" class="line" namn>
L65">6 650"a> .a href="+code=w0" class="sref">w0./a>=.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=r_data1" class="sref">r_data1./a>);o
L66" class="line" namn>
L66">6 660"a> .a href="+code=w1" class="sref">w1./a>=.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=r_data1" class="sref">r_data1./a>+4);o
L67" class="line" namn>
L67">6 670"a> .a href="+code=w2" class="sref">w2./a>=.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=r_data1" class="sref">r_data1./a>+8);o
L68" class="line" namn>
L68">6 680"a> .a href="+code=w3" class="sref">w3./a>=.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=r_data1" class="sref">r_data1./a>+12);o
L69" class="line" namn>
L69">6 690"a> for (.a href="+code=i" class="sref">i./a>=0;.a href="+code=i" class="sref">i./a><16;.a href="+code=i" class="sref">i./a>+=4) {o
L70" class="line" namn>
L70">6 70./a>  .a href="+code=w0" class="sref">w0./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w0" class="sref">w0./a> + ((.a href="+code=w1" class="sref">w1./a> & .a href="+code=w2" class="sref">w2./a>) | ((~.a href="+code=w1" class="sref">w1./a>) & .a href="+code=w3" class="sref">w3./a>)) + .a href="+code=data2" class="sref">data2./a>[.a href="+code=i" class="sref">i./a>+0],3);o
L71" class="line" namn>
L71">6 71./a>  .a href="+code=w3" class="sref">w3./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w3" class="sref">w3./a> + ((.a href="+code=w0" class="sref">w0./a> & .a href="+code=w1" class="sref">w1./a>) | ((~.a href="+code=w0" class="sref">w0./a>) & .a href="+code=w2" class="sref">w2./a>)) + .a href="+code=data2" class="sref">data2./a>[.a href="+code=i" class="sref">i./a>+1],7);o
L72" class="line" namn>
L72">6 72./a>  .a href="+code=w2" class="sref">w2./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w2" class="sref">w2./a> + ((.a href="+code=w3" class="sref">w3./a> & .a href="+code=w0" class="sref">w0./a>) | ((~.a href="+code=w3" class="sref">w3./a>) & .a href="+code=w1" class="sref">w1./a>)) + .a href="+code=data2" class="sref">data2./a>[.a href="+code=i" class="sref">i./a>+2],11);o
L73" class="line" namn>
L73">6 73./a>  .a href="+code=w1" class="sref">w1./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w1" class="sref">w1./a> + ((.a href="+code=w2" class="sref">w2./a> & .a href="+code=w3" class="sref">w3./a>) | ((~.a href="+code=w2" class="sref">w2./a>) & .a href="+code=w0" class="sref">w0./a>)) + .a href="+code=data2" class="sref">data2./a>[.a href="+code=i" class="sref">i./a>+3],19);o
L74" class="line" namn>
L74">6 74./a> } 
L75" class="line" namn>
L75">6 750"a> for (.a href="+code=i" class="sref">i./a>=0;.a href="+code=i" class="sref">i./a><4;.a href="+code=i" class="sref">i./a>++) {o
L76" class="line" namn>
L76">6 76./a>  .a href="+code=w0" class="sref">w0./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w0" class="sref">w0./a> + (((.a href="+code=w2" class="sref">w2./a> | .a href="+code=w3" class="sref">w3./a>) & .a href="+code=w1" class="sref">w1./a>) | (.a href="+code=w2" class="sref">w2./a> & .a href="+code=w3" class="sref">w3./a>)) + 0x5a827999 + .a href="+code=data2" class="sref">data2./a>[.a href="+code=i" class="sref">i./a>+0],3);o
L77" class="line" namn>
L77">6 77./a>  .a href="+code=w3" class="sref">w3./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w3" class="sref">w3./a> + (((.a href="+code=w1" class="sref">w1./a> | .a href="+code=w2" class="sref">w2./a>) & .a href="+code=w0" class="sref">w0./a>) | (.a href="+code=w1" class="sref">w1./a> & .a href="+code=w2" class="sref">w2./a>)) + 0x5a827999 + .a href="+code=data2" class="sref">data2./a>[.a href="+code=i" class="sref">i./a>+4],5);o
L78" class="line" namn>
L78">6 78./a>  .a href="+code=w2" class="sref">w2./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w2" class="sref">w2./a> + (((.a href="+code=w0" class="sref">w0./a> | .a href="+code=w1" class="sref">w1./a>) & .a href="+code=w3" class="sref">w3./a>) | (.a href="+code=w0" class="sref">w0./a> & .a href="+code=w1" class="sref">w1./a>)) + 0x5a827999 + .a href="+code=data2" class="sref">data2./a>[.a href="+code=i" class="sref">i./a>+8],9);o
L79" class="line" namn>
L79">6 79./a>  .a href="+code=w1" class="sref">w1./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w1" class="sref">w1./a> + (((.a href="+code=w3" class="sref">w3./a> | .a href="+code=w0" class="sref">w0./a>) & .a href="+code=w2" class="sref">w2./a>) | (.a href="+code=w3" class="sref">w3./a> & .a href="+code=w0" class="sref">w0./a>)) + 0x5a827999 + .a href="+code=data2" class="sref">data2./a>[.a href="+code=i" class="sref">i./a>+12],13);o
L80" class="line" namn>
L80">6 80./a> } 
L81" class="line" namn>
L81">6 810"a> for (.a href="+code=i" class="sref">i./a>=0;.a href="+code=i" class="sref">i./a><4;.a href="+code=i" class="sref">i./a>++) {o
L82" class="line" namn>
L82">6 82./a>  .a href="+code=w0" class="sref">w0./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w0" class="sref">w0./a> + ((.a href="+code=w1" class="sref">w1./a> ^ .a href="+code=w2" class="sref">w2./a>) ^ .a href="+code=w3" class="sref">w3./a>) + 0x6ed9eba1 + .a href="+code=data2" class="sref">data2./a>[.a href="+code=rbit" class="sref">rbit./a>[.a href="+code=i" class="sref">i./a>]+0],3);o
L83" class="line" namn>
L83">6 83./a>  .a href="+code=w3" class="sref">w3./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w3" class="sref">w3./a> + ((.a href="+code=w0" class="sref">w0./a> ^ .a href="+code=w1" class="sref">w1./a>) ^ .a href="+code=w2" class="sref">w2./a>) + 0x6ed9eba1 + .a href="+code=data2" class="sref">data2./a>[.a href="+code=rbit" class="sref">rbit./a>[.a href="+code=i" class="sref">i./a>]+8],9);o
L84" class="line" namn>
L84">6 84./a>  .a href="+code=w2" class="sref">w2./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w2" class="sref">w2./a> + ((.a href="+code=w3" class="sref">w3./a> ^ .a href="+code=w0" class="sref">w0./a>) ^ .a href="+code=w1" class="sref">w1./a>) + 0x6ed9eba1 + .a href="+code=data2" class="sref">data2./a>[.a href="+code=rbit" class="sref">rbit./a>[.a href="+code=i" class="sref">i./a>]+4],11);o
L85" class="line" namn>
L85">6 85./a>  .a href="+code=w1" class="sref">w1./a>=.a href="+code=rol32" class="sref">rol32./a>(.a href="+code=w1" class="sref">w1./a> + ((.a href="+code=w2" class="sref">w2./a> ^ .a href="+code=w3" class="sref">w3./a>) ^ .a href="+code=w0" class="sref">w0./a>) + 0x6ed9eba1 + .a href="+code=data2" class="sref">data2./a>[.a href="+code=rbit" class="sref">rbit./a>[.a href="+code=i" class="sref">i./a>]+12],15);o
L86" class="line" namn>
L86">6 86./a> } 
L87" class="line" namn>
L87">6 870"a> .a href="+code=PUT_LE32" class="sref">PUT_LE32./a>(.a href="+code=outdata" class="sref">outdata./a>,(.a href="+code=w0" class="sref">w0./a>+.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=r_data1" class="sref">r_data1./a>)) & 0xffffffff);o
L88" class="line" namn>
L88">6 880"a> .a href="+code=PUT_LE32" class="sref">PUT_LE32./a>(.a href="+code=outdata" class="sref">outdata./a>+4,(.a href="+code=w1" class="sref">w1./a>+.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=r_data1" class="sref">r_data1./a>+4)) & 0xffffffff);o
L89" class="line" namn>
L89">6 890"a> .a href="+code=PUT_LE32" class="sref">PUT_LE32./a>(.a href="+code=outdata" class="sref">outdata./a>+8,(.a href="+code=w2" class="sref">w2./a>+.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=r_data1" class="sref">r_data1./a>+8)) & 0xffffffff);o
L90" class="line" namn>
L90">6 900"a> .a href="+code=PUT_LE32" class="sref">PUT_LE32./a>(.a href="+code=outdata" class="sref">outdata./a>+12,(.a href="+code=w3" class="sref">w3./a>+.a href="+code=GET_LE32" class="sref">GET_LE32./a>(.a href="+code=r_data1" class="sref">r_data1./a>+12)) & 0xffffffff);o
L91" class="line" namn>
L91">6 91./a>} 
L92" class="line" namn>
L92">6 920"a>o
L93" class="line" namn>
L93">6 93./a>.spa> class="comment">/* Make a signature for the current packet and add it at the end of the */./spa>
 
L94" class="line" namn>
L94">6 94./a>.spa> class="comment">/* packet. */./spa>
 
L95" class="line" namn>
L95">6 95./a>void .a href="+code=__sign_packet" class="sref">__sign_packet./a>(struct .a href="+code=ncp_server" class="sref">ncp_server0"a> *.a href="+code=server" class="sref">server0"a>, const char *.a href="+code=packet" class="sref">packet./a>, .a href="+code=size_t" class="sref">size_t0"a> .a href="+code=size" class="sref">size./a>, .a href="+code=__u32" class="sref">__u320"a> .a href="+code=totalsize" class="sref">totalsize./a>, void *.a href="+code=sign_buff" class="sref">sign_buff./a>) {o
L96" class="line" namn>
L96">6 96./a>        unsigned char .a href="+code=data" class="sref">data./a>[64];o
L97" class="line" namn>
L97">6 97./a>o
L98" class="line" namn>
L98">6 98./a>        .a href="+code=memcpy" class="sref">memcpy./a>(.a href="+code=data" class="sref">data./a>, .a href="+code=server" class="sref">server0"a>->.a href="+code=sign_root" class="sref">sign_root./a>, 8);o
L99" class="line" namn>
L99">6 99./a>        *(.a href="+code=__u32" class="sref">__u320"a>*)(.a href="+code=data" class="sref">data./a> + 8) = .a href="+code=totalsize" class="sref">totalsize./a>;o
L100" class="line" namn>
L100">6100./a>        if (.a href="+code=size" class="sref">size./a> < 52) {o
L101" class="line" namn>
L101">6101./a>                .a href="+code=memcpy" class="sref">memcpy./a>(.a href="+code=data" class="sref">data./a> + 12, .a href="+code=packet" class="sref">packet./a>, .a href="+code=size" class="sref">size./a>);o
L102" class="line" namn>
L102">6102./a>                .a href="+code=memset" class="sref">memset./a>(.a href="+code=data" class="sref">data./a> + 12 + .a href="+code=size" class="sref">size./a>, 0, 52 - .a href="+code=size" class="sref">size./a>);o
L103" class="line" namn>
L103">6103./a>        } else {o
L104" class="line" namn>
L104">6104./a>                .a href="+code=memcpy" class="sref">memcpy./a>(.a href="+code=data" class="sref">data./a> + 12, .a href="+code=packet" class="sref">packet./a>, 52);o
L105" class="line" namn>
L105">6105./a>        } 
L106" class="line" namn>
L106">6106./a>        .a href="+code=nwsign" class="sref">nwsign./a>(.a href="+code=server" class="sref">server0"a>->.a href="+code=sign_last" class="sref">sign_last./a>, .a href="+code=data" class="sref">data./a>, .a href="+code=server" class="sref">server0"a>->.a href="+code=sign_last" class="sref">sign_last./a>);o
L107" class="line" namn>
L107">6107./a>        .a href="+code=memcpy" class="sref">memcpy./a>(.a href="+code=sign_buff" class="sref">sign_buff./a>, .a href="+code=server" class="sref">server0"a>->.a href="+code=sign_last" class="sref">sign_last./a>, 8);o
L108" class="line" namn>
L108">6108./a>} 
L109" class="line" namn>
L109">61090"a>o
L110" class="line" namn>
L110">61.10"a>int .a href="+code=sign_verify_reply" class="sref">sign_verify_reply./a>(struct .a href="+code=ncp_server" class="sref">ncp_server0"a> *.a href="+code=server" class="sref">server0"a>, const char *.a href="+code=packet" class="sref">packet./a>, .a href="+code=size_t" class="sref">size_t0"a> .a href="+code=size" class="sref">size./a>, .a href="+code=__u32" class="sref">__u320"a> .a href="+code=totalsize" class="sref">totalsize./a>, const void *.a href="+code=sign_buff" class="sref">sign_buff./a>) {o
L111" class="line" namn>
L111">6111./a>        unsigned char .a href="+code=data" class="sref">data./a>[64];o
L112" class="line" namn>
L112">6112./a>        unsigned char .a href="+code=hash" class="sref">hash./a>[16];o
L113" class="line" namn>
L113">61130"a>o
L114" class="line" namn>
L114">6114./a>        .a href="+code=memcpy" class="sref">memcpy./a>(.a href="+code=data" class="sref">data./a>, .a href="+code=server" class="sref">server0"a>->.a href="+code=sign_root" class="sref">sign_root./a>, 8);o
L115" class="line" namn>
L115">6115./a>        *(.a href="+code=__u32" class="sref">__u320"a>*)(.a href="+code=data" class="sref">data./a> + 8) = .a href="+code=totalsize" class="sref">totalsize./a>;o
L116" class="line" namn>
L116">6116./a>        if (.a href="+code=size" class="sref">size./a> < 52) {o
L117" class="line" namn>
L117">6117./a>                .a href="+code=memcpy" class="sref">memcpy./a>(.a href="+code=data" class="sref">data./a> + 12, .a href="+code=packet" class="sref">packet./a>, .a href="+code=size" class="sref">size./a>);o
L118" class="line" namn>
L118">6118./a>                .a href="+code=memset" class="sref">memset./a>(.a href="+code=data" class="sref">data./a> + 12 + .a href="+code=size" class="sref">size./a>, 0, 52 - .a href="+code=size" class="sref">size./a>);o
L119" class="line" namn>
L119">6119./a>        } else {o
L120" class="line" namn>
L120">6120./a>                .a href="+code=memcpy" class="sref">memcpy./a>(.a href="+code=data" class="sref">data./a> + 12, .a href="+code=packet" class="sref">packet./a>, 52);o
L121" class="line" namn>
L121">6121./a>        } 
L122" class="line" namn>
L122">6122./a>        .a href="+code=nwsign" class="sref">nwsign./a>(.a href="+code=server" class="sref">server0"a>->.a href="+code=sign_last" class="sref">sign_last./a>, .a href="+code=data" class="sref">data./a>, .a href="+code=hash" class="sref">hash./a>);o
L123" class="line" namn>
L123">6123./a>        return .a href="+code=memcmp" class="sref">memcmp./a>(.a href="+code=sign_buff" class="sref">sign_buff./a>, .a href="+code=hash" class="sref">hash./a>, 8);o
L124" class="line" namn>
L124">6124./a>} 
L125" class="line" namn>
L125">6125./a> 
L126" class="line" namn>
L126">61260"a>#endif  .spa> class="comment">/* CONFIG_NCPFS_PACKET_SIGNING */./spa>
 
L127" class="line" namn>
L127">6127./a>o
L128" class="line" namn>
L128">6128./a>./pre>
The original LXR software by the LXR community./a>, this experimental vers2lxr@linux.no./a>. ./div .div class="subfooter"> lxr.linux.no kindly hosted by Redpill Linpro AS./a>, provider of Linux consulting and opera >s services since 1995. ./div ./body ./html