当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: /* This odd do-hickey is to shar
 

 

 ·sendmail配置    »显示摘要«
    摘要:参照这篇做的邮件配置环境:redhat linux 9.0 完全安装或者确保以下安装包已经安装完毕:imap-2001a-18.i286.rpm sendmail-8.12.8-4.i386.rpm m4-1.4.1-13.i386.rpm cyrus-sasl-2.1.10-4.i386.rpm cyrus-sasl-md5-2.1.10-4.i386.rpm cyrus-sasl-plain-......
 ·给初学linux的一点忠告    »显示摘要«
    摘要:其实你是为了linux而使用linux,而没有找到正确的理由来利用 linux。你首先要明确用电脑的目的,你用它是为了解决你的实际问题,而不是为了学习安装操作系统,不是为了测试哪个版本好用,不是为了“赶上潮流”,更不是因为你硬盘太大了,你想多占点空间。 1、不要“玩 linux” 很多人用 linux 的时候会感觉很迷茫,该用哪个发行呢?是不是我少装了什么?怎么升级这么快啊!怎么这么不稳定!每当遇......


改后的freeswan\pluto\kernel.c(2)

/* this odd do-hickey is to share error reporting code. 【程序编程相关:[转]浅谈如何学习linux v1.2

【推荐阅读:[转]通过PXE远程安装linux

     * a break will get to that common code.  the setting 【扩展信息:wget好像不支持断点续传

     * of "ugh" and "context" parameterize it.

     */

    do {

        /* old entries have no packet count; new ones do.

         * check if things are as they should be.

         */

        if (fi == 5)

        ff = &field[0];    /* old form, with no count */

        else if (fi == 6)

        ff = &field[1];    /* new form, with count */

        else

        {

        ugh = "has wrong number of fields";

        break;

        }

        if (ff[1].len != 2

        || strncmp(ff[1].ptr, "->", 2) != 0

        || ff[3].len != 2

        || strncmp(ff[3].ptr, "=>", 2) != 0)

        {

        ugh = "is missing -> or =>";

        break;

        }

        /* actually digest fields of interest */

        /* packet count */

        eri.count = 0;

        if (ff != field)

        {

        context = "count field is malformed: ";

        ugh = ttoul(field[0].ptr, field[0].len, 10, &eri.count);

        if (ugh != null)

            break;

        }

        /* our client */

        context = "source subnet field malformed: ";

        ugh = ttosubnet(ff[0].ptr, ff[0].len, af_inet, &eri.ours);

        if (ugh != null)

        break;

        /* his client */

        context = "source subnet field malformed: ";

        ugh = ttosubnet(ff[2].ptr, ff[2].len, af_inet, &eri.his);

        if (ugh != null)

        break;

        /* said */

        context = "sa id field malformed: ";

        ugh = ttosa(ff[4].ptr, ff[4].len, &eri.said);

    } while (false);

    if (ugh != null)

    {

        log("internal error: %s line %d %s%s"

        , procname, lino, context, ugh);

        continue;    /* ignore rest of line */

    }

    /* now we have decoded eroute, lets consider it.

     * we only care about shunt eroutes.

     *

     * %hold: if not known, add to orphaned_holds list for initiation

     *    because acquire might have been lost.

     *

     * %pass: determine if idle; if so, blast it away.

     *    can occur bare (if dns provided insufficient information)

     *    or with a connection (failure context).

     *    could even be installed by ipsec manual.

     *

     * %trap: always welcome.

     *

     * others: handling as yet undesigned.  generally associated

     *    with a failure context.

     */

    if (eri.said.proto == sa_int)

    {

        switch (ntohl(eri.said.spi))

        {

        case spi_hold:

        if (bare_shunt_ptr(&eri.ours, &eri.his) == null

        && shunt_owner(&eri.ours, &eri.his) == null)

        {

            eri.next = orphaned_holds;

            orphaned_holds = clone_thing(eri, "orphaned %hold");

        }

        break;

        case spi_pass:

        /* nothing sensible to do if we dont have counts */

        if (ff != field)

        {

            struct bare_shunt **bs_pp

            = bare_shunt_ptr(&eri.ours, &eri.his);

            if (bs_pp != null)

            {

            struct bare_shunt *bs = *bs_pp;

            if (eri.count != bs->count)

            {

                bs->count = eri.count;

                bs->last_activity = nw;

            }

            else if (nw - bs->last_activity > shunt_patience)

            {

                eri.next = expired;

                expired = clone_thing(eri, "expired %pass");

            }

            }

        }

        break;

        case spi_drop:

        case spi_reject:

        case spi_trap:

        break;

        default:

        impossible();

        }

    }

    }    /* for each line */

    fclose(f);

    /* now that weve finished processing the /proc file,

     * it is safe to delete the expired %pass shunts.

     */


...   下一页
 ·红帽企业 linux as 4 的改进    »显示摘要«
    摘要:红帽企业 linux as 4 的改进  介绍  本文档中涉及了与 红帽企业 linux 4 相关的以下课题:  ·介绍(此节)  ·此发行版本简介  ·与安装相关的备注  ·特定软件包备注  ·新添加/不再包括/已过时的软件包  此发行版本简介  以下简要介绍了 红帽企业 linux 4 的主要功能  ·红帽企业 linux 4 包括了一个 selinux 的实现。selinux 代表了用户,程......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE