go
Getopt go;
ksh_getopt_reset(&go, GF_ERROR|GF_PLUSOPT);
while ((optc = ksh_getopt(argv, &go, opts)) != -1) {
int set = (go.info & GI_PLUS) ? 0 : 1;
array = go.optarg;
if (go.optarg == NULL) {
i = option(go.optarg);
bi_errorf("%s: bad option", go.optarg);
if (!(go.info & GI_MINUSMINUS) && argv[go.optind] &&
(argv[go.optind][0] == '-' || argv[go.optind][0] == '+') &&
argv[go.optind][1] == '\0') {
if (argv[go.optind][0] == '-' && !Flag(FPOSIX))
go.optind++;
*setargsp = !arrayset && ((go.info & GI_MINUSMINUS) ||
argv[go.optind]);
for (i = go.optind; argv[i]; i++)
qsortp((void **) &argv[go.optind], (size_t) (i - go.optind),
set_array(array, arrayset, argv + go.optind);
for (; argv[go.optind]; go.optind++)
return go.optind;
ksh_getopt_reset(Getopt *go, int flags)
go->optind = 1;
go->optarg = NULL;
go->p = 0;
go->flags = flags;
go->info = 0;
go->buf[1] = '\0';
ksh_getopt(char **argv, Getopt *go, const char *options)
if (go->p == 0 || (c = argv[go->optind - 1][go->p]) == '\0') {
char *arg = argv[go->optind], flag = arg ? *arg : '\0';
go->p = 1;
go->optind++;
go->p = 0;
go->info |= GI_MINUSMINUS;
(!(go->flags & GF_PLUSOPT) || flag != '+')) ||
go->p = 0;
go->optind++;
go->info &= ~(GI_MINUS|GI_PLUS);
go->info |= flag == '-' ? GI_MINUS : GI_PLUS;
go->p++;
go->buf[0] = c;
go->optarg = go->buf;
(go->flags & GF_NONAME) ? "" : argv[0],
(go->flags & GF_NONAME) ? "" : ": ", c);
if (go->flags & GF_ERROR)
if (argv[go->optind - 1][go->p])
go->optarg = argv[go->optind - 1] + go->p;
else if (argv[go->optind])
go->optarg = argv[go->optind++];
go->optarg = NULL;
go->buf[0] = c;
go->optarg = go->buf;
(go->flags & GF_NONAME) ? "" : argv[0],
(go->flags & GF_NONAME) ? "" : ": ", c);
if (go->flags & GF_ERROR)
go->p = 0;
go->optarg = argv[go->optind - 1] + go->p;
go->p = 0;
if (argv[go->optind - 1][go->p]) {
if (digit(argv[go->optind - 1][go->p]) ||
!strcmp(&argv[go->optind - 1][go->p], "unlimited")) {
go->optarg = argv[go->optind - 1] + go->p;
go->p = 0;
go->optarg = NULL;
if (argv[go->optind] && (digit(argv[go->optind][0]) ||
!strcmp(argv[go->optind], "unlimited"))) {
go->optarg = argv[go->optind++];
go->p = 0;
go->optarg = NULL;
const struct ar5k_gain_opt *go;
go = hal->ah_radio == AR5K_AR5111 ?
hal->ah_gain.g_step = &go->go_step[hal->ah_gain.g_step_idx];
&go->go_step[hal->ah_gain.g_step_idx]) {
(go->go_step[--(hal->ah_gain.g_step_idx)].gos_gain -
if (hal->ah_gain.g_step_idx == (go->go_steps_count - 1))
hal->ah_gain.g_step_idx < (go->go_steps_count - 1);
&go->go_step[hal->ah_gain.g_step_idx]) {
(go->go_step[++(hal->ah_gain.g_step_idx)].gos_gain -
ps->go.semaphore = 0;
return __get_parent_scratch(ce)->go.semaphore;
struct sync_semaphore go;
offsetof(struct parent_scratch, go.semaphore);
struct iwm_mac_data_go go;
struct iwx_mac_data_go go;
cd_pause(struct cd_softc *sc, int go)
cmd->resume = go;
uint16_t go; /* Global compression offset */
gf = dns_compress_findglobal(cctx, name, &gp, &go);
if (gf && go >= 0x4000)
go |= 0xc000;
isc_buffer_putuint16(target, go);
struct options *go, *wo;
go = NULL;
go = options_get_parent(wo);
go = options_get_parent(item->oo);
go = NULL;
if (go != NULL && options_owner(o) != go) {
parent = options_get_only(go, name);
struct node *go = n->traverse->node;
if (go->mark) {
for (; n != NULL && n != go; n = n->from) {
c->t[c->entries++] = go;
return go;
go->from = n;
n = go;
struct node *go;
go = n->traverse->node;
if (go->mark == 0 || go->mark == min) {
go->from = n;
n = go;
} else if (go->mark > min) {
printf("%d\n", o - go->mark + 1);
if (o - go->mark + 1 > c->entries) {
c->entries = o - go->mark + 1;
c->t[i++] = go;
for (t = n; t != go; t = t->from)
return go(cfgfile, svr, argc, argv);
lcp_options *go = &lcp_gotoptions[unit];
if (auth_required && !(go->neg_chap || go->neg_upap)) {
if (go->neg_chap) {
ChapAuthPeer(unit, our_name, go->chap_mdtype);
} else if (go->neg_upap) {
lcp_options *go = &lcp_gotoptions[unit];
if ((go->neg_chap || go->neg_upap) && !did_authup) {
if (go->neg_cbcp) {
lcp_options *go = &lcp_gotoptions[unit];
if (go->neg_upap && !uselogin && !have_pap_secret())
go->neg_upap = 0;
if (go->neg_chap) {
go->neg_chap = 0;
ccp_options *go = &ccp_gotoptions[f->unit];
*go = ccp_wantoptions[f->unit];
if (go->bsd_compress) {
go->bsd_compress = 0;
if (go->deflate) {
if (go->deflate_correct) {
go->deflate_correct = 0;
if (go->deflate_draft) {
go->deflate_draft = 0;
if (!go->deflate_correct && !go->deflate_draft)
go->deflate = 0;
if (go->predictor_1) {
go->predictor_1 = 0;
if (go->predictor_2) {
go->predictor_2 = 0;
ccp_options *go = &ccp_gotoptions[f->unit];
return (go->bsd_compress? CILEN_BSD_COMPRESS: 0)
+ (go->deflate? CILEN_DEFLATE: 0)
+ (go->predictor_1? CILEN_PREDICTOR_1: 0)
+ (go->predictor_2? CILEN_PREDICTOR_2: 0);
ccp_options *go = &ccp_gotoptions[f->unit];
if (go->deflate) {
p[0] = go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT;
p[2] = DEFLATE_MAKE_OPT(go->deflate_size);
if (res < 0 || go->deflate_size <= DEFLATE_MIN_SIZE) {
go->deflate = 0;
--go->deflate_size;
p[2] = DEFLATE_MAKE_OPT(go->deflate_size);
if (p != p0 && go->deflate_correct && go->deflate_draft) {
if (go->bsd_compress) {
p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits);
if (res < 0 || go->bsd_bits <= BSD_MIN_BITS) {
go->bsd_compress = 0;
--go->bsd_bits;
p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits);
if (go->predictor_1) {
go->predictor_1 = 0;
if (go->predictor_2) {
go->predictor_2 = 0;
go->method = (p > p0)? p0[0]: -1;
ccp_options *go = &ccp_gotoptions[f->unit];
if (go->deflate) {
|| p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
|| p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
if (go->deflate_correct && go->deflate_draft) {
|| p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
if (go->bsd_compress) {
|| p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits))
if (go->predictor_1) {
if (go->predictor_2) {
ccp_options *go = &ccp_gotoptions[f->unit];
try = *go;
if (go->deflate && len >= CILEN_DEFLATE
&& p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
else if (DEFLATE_SIZE(p[2]) < go->deflate_size)
if (go->deflate_correct && go->deflate_draft
if (go->bsd_compress && len >= CILEN_BSD_COMPRESS
else if (BSD_NBITS(p[2]) < go->bsd_bits)
*go = try;
ccp_options *go = &ccp_gotoptions[f->unit];
try = *go;
if (go->deflate && len >= CILEN_DEFLATE
&& p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
if (go->deflate_correct)
if (go->deflate_correct && go->deflate_draft
if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
if (go->bsd_compress && len >= CILEN_BSD_COMPRESS
if (p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits))
if (go->predictor_1 && len >= CILEN_PREDICTOR_1
if (go->predictor_2 && len >= CILEN_PREDICTOR_2
*go = try;
ccp_options *go = &ccp_gotoptions[f->unit];
if (ANY_COMPRESS(*go)) {
if (go->method == ho->method) {
method_name(go, ho));
strncpy(method1, method_name(go, NULL), sizeof method1);
method_name(go, NULL));
ipcp_options *go = &ipcp_gotoptions[f->unit];
if (go->ouraddr == 0) {
script_setenv("IPLOCAL", ip_ntoa(go->ouraddr));
if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
if (go->ouraddr != wo->ouraddr)
ip_ntoa(go->ouraddr));
mask = GetMask(go->ouraddr);
if (!sifaddr(f->unit, go->ouraddr, ho->hisaddr, mask)) {
if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
mask = GetMask(go->ouraddr);
if (!sifaddr(f->unit, go->ouraddr, ho->hisaddr, mask)) {
if (!sifaddr(f->unit, go->ouraddr, ho->hisaddr, mask)) {
if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
syslog(LOG_NOTICE, "local IP address %s", ip_ntoa(go->ouraddr));
ipcp_options *go = &ipcp_gotoptions[f->unit];
if (wo->neg_addr && !go->neg_addr && !go->old_addrs) {
go->neg_addr = 1;
go->old_addrs = 1;
if (wo->neg_vj && !go->neg_vj && !go->old_vj) {
go->neg_vj = 1;
go->neg_vj = 1;
go->old_vj = 1;
go->vj_protocol = ho->vj_protocol;
return (LENCIADDR(go->neg_addr, go->old_addrs) +
LENCIVJ(go->neg_vj, go->old_vj));
ipcp_options *go = &ipcp_gotoptions[f->unit];
ADDCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), go->neg_addr,
go->old_addrs, go->ouraddr, go->hisaddr);
ADDCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj,
go->maxslotindex, go->cflag);
ipcp_options *go = &ipcp_gotoptions[f->unit];
ACKCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), go->neg_addr,
go->old_addrs, go->ouraddr, go->hisaddr);
ACKCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj,
go->maxslotindex, go->cflag);
ipcp_options *go = &ipcp_gotoptions[f->unit];
try = *go;
if (go->neg && \
if (go->neg && \
NAKCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), neg_addr, go->old_addrs,
if (go->accept_local && ciaddr1) { /* Do we know our address? */
if (go->accept_remote && ciaddr2) { /* Does he know his? */
if (cimaxslotindex < go->maxslotindex)
if (go->neg_vj || no.neg_vj ||
if ((go->neg_addr && go->old_addrs) || no.old_addrs
if (ciaddr1 && go->accept_local)
if (ciaddr2 && go->accept_remote)
if (go->neg_addr || no.neg_addr || cilen != CILEN_ADDR)
if (ciaddr1 && go->accept_local)
*go = try;
ipcp_options *go = &ipcp_gotoptions[f->unit];
try = *go;
if (go->neg && \
if (go->neg && \
REJCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), neg_addr,
go->old_addrs, go->ouraddr, go->hisaddr);
REJCIVJ(CI_COMPRESSTYPE, neg_vj, go->vj_protocol, go->old_vj,
go->maxslotindex, go->cflag);
*go = try;
ipcp_options *go = &ipcp_gotoptions[f->unit];
go->ouraddr = ciaddr2; /* accept peer's idea */
if (go->neg && \
if (go->neg && \
if (go->neg && \
if (go->neg && \
if (go->neg && \
REJCISHORT(CI_MRU, neg_mru, go->mru);
REJCILONG(CI_ASYNCMAP, neg_asyncmap, go->asyncmap);
REJCICHAP(CI_AUTHTYPE, neg_chap, PPP_CHAP, go->chap_mdtype);
if (!go->neg_chap) {
REJCILQR(CI_QUALITY, neg_lqr, go->lqr_period);
REJCILONG(CI_MAGICNUMBER, neg_magicnumber, go->magicnumber);
*go = try;
lcp_options *go = &lcp_gotoptions[f->unit];
if (!(ao->neg_magicnumber || go->neg_magicnumber) ||
if (go->neg_magicnumber &&
cilong == go->magicnumber) {
lcp_options *go = &lcp_gotoptions[f->unit];
if (!go->neg_magicnumber)
go->magicnumber = 0;
ppp_recv_config(f->unit, (go->neg_mru? MAX(wo->mru, go->mru): PPP_MRU),
(go->neg_asyncmap? go->asyncmap: 0xffffffff),
go->neg_pcompression, go->neg_accompression);
lcp_options *go = &lcp_gotoptions[f->unit];
(go->neg_asyncmap? go->asyncmap: 0xffffffff),
go->neg_pcompression, go->neg_accompression);
lcp_options *go = &lcp_gotoptions[f->unit];
return (LENCISHORT(go->neg_mru && go->mru != DEFMRU) +
LENCILONG(go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) +
LENCICHAP(go->neg_chap) +
LENCISHORT(!go->neg_chap && go->neg_upap) +
LENCILQR(go->neg_lqr) +
LENCICBCP(go->neg_cbcp) +
LENCILONG(go->neg_magicnumber) +
LENCIVOID(go->neg_pcompression) +
LENCIVOID(go->neg_accompression));
lcp_options *go = &lcp_gotoptions[f->unit];
ADDCISHORT(CI_MRU, go->neg_mru && go->mru != DEFMRU, go->mru);
ADDCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF,
go->asyncmap);
ADDCICHAP(CI_AUTHTYPE, go->neg_chap, PPP_CHAP, go->chap_mdtype);
ADDCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP);
ADDCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period);
ADDCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT);
ADDCILONG(CI_MAGICNUMBER, go->neg_magicnumber, go->magicnumber);
ADDCIVOID(CI_PCOMPRESSION, go->neg_pcompression);
ADDCIVOID(CI_ACCOMPRESSION, go->neg_accompression);
lcp_options *go = &lcp_gotoptions[f->unit];
ACKCISHORT(CI_MRU, go->neg_mru && go->mru != DEFMRU, go->mru);
ACKCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF,
go->asyncmap);
ACKCICHAP(CI_AUTHTYPE, go->neg_chap, PPP_CHAP, go->chap_mdtype);
ACKCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP);
ACKCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period);
ACKCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT);
ACKCILONG(CI_MAGICNUMBER, go->neg_magicnumber, go->magicnumber);
ACKCIVOID(CI_PCOMPRESSION, go->neg_pcompression);
ACKCIVOID(CI_ACCOMPRESSION, go->neg_accompression);
lcp_options *go = &lcp_gotoptions[f->unit];
try = *go;
if (go->neg && \
if (go->neg && \
if (go->neg && \
if (go->neg && \
if (go->neg && \
if (go->neg && \
if (go->neg_mru && go->mru != DEFMRU) {
if (go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) {
try.asyncmap = go->asyncmap | cilong;
if ((go->neg_chap || go->neg_upap)
no.neg_chap = go->neg_chap;
no.neg_upap = go->neg_upap;
if (!go->neg_chap)
if (go->neg_chap) {
if (cichar != go->chap_mdtype)
if (go->neg_chap)
if ((go->neg_mru && go->mru != DEFMRU)
if ((go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF)
if (go->neg_chap || no.neg_chap || go->neg_upap || no.neg_upap)
if (go->neg_magicnumber || no.neg_magicnumber ||
if (go->neg_pcompression || no.neg_pcompression
if (go->neg_accompression || no.neg_accompression
if (go->neg_lqr || no.neg_lqr || cilen != CILEN_LQR)
*go = try;
lcp_options *go = &lcp_gotoptions[f->unit];
try = *go;
if (go->neg && \
struct geneve_option *go;
if (l < sizeof(*go))
go = (struct geneve_option *)p;
p += sizeof(*go);
l -= sizeof(*go);
printf("\n\toption class %u type %u", ntohs(go->class),
go->type);
len = (go->flags & GENEVE_OPTION_LENGTH_MASK) >>
ret = go(cfgfile, svr, quiet, argc, argv);