Symbol: cfg
crypto/openssh/auth.h
114
struct authmethod_cfg *cfg;
crypto/openssh/auth2-methods.c
107
cfg = authmethod_cfgs[i];
crypto/openssh/auth2-methods.c
110
if (strcmp(method, cfg->name) != 0)
crypto/openssh/auth2-methods.c
113
if (cfg->enabled == NULL ||
crypto/openssh/auth2-methods.c
114
*(cfg->enabled) == 0) {
crypto/openssh/auth2-methods.c
98
const struct authmethod_cfg *cfg;
crypto/openssh/auth2.c
380
method = m->cfg->name;
crypto/openssh/auth2.c
501
if (strcmp(authmethods[i]->cfg->name, "none") == 0)
crypto/openssh/auth2.c
503
if (authmethods[i]->cfg->enabled == NULL ||
crypto/openssh/auth2.c
504
*(authmethods[i]->cfg->enabled) == 0)
crypto/openssh/auth2.c
506
if (!auth2_method_allowed(authctxt, authmethods[i]->cfg->name,
crypto/openssh/auth2.c
510
authmethods[i]->cfg->name)) != 0)
crypto/openssh/auth2.c
527
if (strcmp(name, authmethods[i]->cfg->name) == 0 ||
crypto/openssh/auth2.c
528
(authmethods[i]->cfg->synonym != NULL &&
crypto/openssh/auth2.c
529
strcmp(name, authmethods[i]->cfg->synonym) == 0))
crypto/openssh/auth2.c
544
if (method->cfg->enabled == NULL || *(method->cfg->enabled) == 0) {
crypto/openssh/auth2.c
548
if (!auth2_method_allowed(authctxt, method->cfg->name, NULL)) {
crypto/openssh/monitor.c
110
extern struct sshbuf *cfg;
crypto/openssh/monitor.c
600
debug_f("config len %zu", sshbuf_len(cfg));
crypto/openssh/monitor.c
640
if ((r = sshbuf_put_stringb(m, cfg)) != 0 ||
crypto/openssh/servconf.c
2836
parse_server_config(&mo, "reprocess config", cfg, includes,
crypto/openssh/servconf.c
85
extern struct sshbuf *cfg;
crypto/openssh/sshd-auth.c
156
struct sshbuf *cfg;
crypto/openssh/sshd-auth.c
667
if ((cfg = sshbuf_new()) == NULL)
crypto/openssh/sshd-auth.c
670
recv_privsep_state(ssh, cfg, &timing_secret);
crypto/openssh/sshd-auth.c
671
parse_server_config(&options, "rexec", cfg, &includes, NULL, 1);
crypto/openssh/sshd-session.c
1040
if ((cfg = sshbuf_new()) == NULL)
crypto/openssh/sshd-session.c
1043
recv_rexec_state(REEXEC_CONFIG_PASS_FD, cfg, &timing_secret);
crypto/openssh/sshd-session.c
1044
parse_server_config(&options, "rexec", cfg, &includes, NULL, 1);
crypto/openssh/sshd-session.c
189
struct sshbuf *cfg;
crypto/openssh/sshd.c
1591
if ((cfg = sshbuf_new()) == NULL)
crypto/openssh/sshd.c
1594
load_server_config(config_file_name, cfg);
crypto/openssh/sshd.c
1596
parse_server_config(&options, config_file_name, cfg,
crypto/openssh/sshd.c
1713
accumulate_host_timing_secret(cfg, key);
crypto/openssh/sshd.c
1741
accumulate_host_timing_secret(cfg, NULL);
crypto/openssh/sshd.c
1899
config = pack_config(cfg);
crypto/openssh/sshd.c
208
struct sshbuf *cfg;
crypto/openssl/test/radix/main.c
26
TERP_CONFIG cfg = { 0 };
crypto/openssl/test/radix/main.c
31
cfg.debug_bio = bio_err;
crypto/openssl/test/radix/main.c
33
if (!TEST_true(bindings_adjust_terp_config(&cfg)))
crypto/openssl/test/radix/main.c
36
testresult = TERP_run(script_info, &cfg);
crypto/openssl/test/radix/quic_bindings.c
663
static int bindings_adjust_terp_config(TERP_CONFIG *cfg)
crypto/openssl/test/radix/quic_bindings.c
665
cfg->now_cb = get_time;
crypto/openssl/test/radix/quic_bindings.c
666
cfg->per_op_cb = do_per_op;
crypto/openssl/test/radix/quic_bindings.c
731
TERP_CONFIG cfg = { 0 };
crypto/openssl/test/radix/quic_bindings.c
733
cfg.debug_bio = rt->debug_bio;
crypto/openssl/test/radix/quic_bindings.c
734
if (!TEST_true(bindings_adjust_terp_config(&cfg)))
crypto/openssl/test/radix/quic_bindings.c
737
if (!TERP_run(rt->child_script_info, &cfg))
crypto/openssl/test/radix/terp.c
533
TERP_CONFIG cfg;
crypto/openssl/test/radix/terp.c
545
const TERP_CONFIG *cfg,
crypto/openssl/test/radix/terp.c
549
if (!TEST_true(cfg->now_cb != NULL))
crypto/openssl/test/radix/terp.c
552
terp->cfg = *cfg;
crypto/openssl/test/radix/terp.c
565
if (ossl_time_is_zero(terp->cfg.max_execution_time))
crypto/openssl/test/radix/terp.c
566
terp->cfg.max_execution_time = TERP_DEFAULT_MAX_EXECUTION_TIME;
crypto/openssl/test/radix/terp.c
643
return terp->cfg.now_cb(terp->cfg.now_cb_arg);
crypto/openssl/test/radix/terp.c
649
BIO_printf(terp->cfg.debug_bio, " \t\t(span %zu times)\n",
crypto/openssl/test/radix/terp.c
660
BIO *debug_bio = terp->cfg.debug_bio;
crypto/openssl/test/radix/terp.c
666
terp->cfg.max_execution_time);
crypto/openssl/test/radix/terp.c
701
if (terp->cfg.per_op_cb != NULL)
crypto/openssl/test/radix/terp.c
702
if (!TEST_true(terp->cfg.per_op_cb(terp, terp->cfg.per_op_cb_arg))) {
crypto/openssl/test/radix/terp.c
755
BIO_printf(terp->cfg.debug_bio, " \t\t(skipping)\n");
crypto/openssl/test/radix/terp.c
792
ERR_print_errors(terp->cfg.debug_bio);
crypto/openssl/test/radix/terp.c
796
ERR_print_errors(terp->cfg.debug_bio);
crypto/openssl/test/radix/terp.c
803
static int TERP_run(SCRIPT_INFO *script_info, TERP_CONFIG *cfg)
crypto/openssl/test/radix/terp.c
808
BIO *debug_bio = cfg->debug_bio;
crypto/openssl/test/radix/terp.c
827
if (!TEST_true(TERP_init(&terp, cfg, script_info, &gen_script)))
lib/geom/part/geom_part.c
241
find_geomcfg(struct ggeom *gp, const char *cfg)
lib/geom/part/geom_part.c
246
if (!strcmp(gc->lg_name, cfg))
lib/geom/part/geom_part.c
253
find_provcfg(struct gprovider *pp, const char *cfg)
lib/geom/part/geom_part.c
258
if (!strcmp(gc->lg_name, cfg))
lib/libdiff/tests/libdiff_test.c
31
struct diff_config cfg = { .atomize_func = diff_atomize_text_by_line };
lib/libdiff/tests/libdiff_test.c
48
ATF_REQUIRE(diff_atomize_file(&d, &cfg, f, p, size, 0) == EIO);
lib/libgpio/gpio.c
103
gpio_pin_config(gpio_handle_t handle, gpio_config_t *cfg)
lib/libgpio/gpio.c
107
if (cfg == NULL)
lib/libgpio/gpio.c
109
gppin.gp_pin = cfg->g_pin;
lib/libgpio/gpio.c
112
strlcpy(cfg->g_name, gppin.gp_name, GPIOMAXNAME);
lib/libgpio/gpio.c
113
cfg->g_caps = gppin.gp_caps;
lib/libgpio/gpio.c
114
cfg->g_flags = gppin.gp_flags;
lib/libgpio/gpio.c
136
gpio_pin_set_flags(gpio_handle_t handle, gpio_config_t *cfg)
lib/libgpio/gpio.c
140
if (cfg == NULL)
lib/libgpio/gpio.c
142
gppin.gp_pin = cfg->g_pin;
lib/libgpio/gpio.c
143
gppin.gp_flags = cfg->g_flags;
lib/libgpio/gpio.c
207
gpio_config_t cfg;
lib/libgpio/gpio.c
209
bzero(&cfg, sizeof(cfg));
lib/libgpio/gpio.c
210
cfg.g_pin = pin;
lib/libgpio/gpio.c
211
if (gpio_pin_config(handle, &cfg) < 0)
lib/libgpio/gpio.c
213
cfg.g_flags = flag;
lib/libgpio/gpio.c
215
return (gpio_pin_set_flags(handle, &cfg));
lib/virtual_oss/bt/avdtp.c
258
avdtpDiscoverAndConfig(struct bt_config *cfg, bool isSink)
lib/virtual_oss/bt/avdtp.c
262
uint8_t chmode = cfg->chmode;
lib/virtual_oss/bt/avdtp.c
263
uint8_t aacMode1 = cfg->aacMode1;
lib/virtual_oss/bt/avdtp.c
264
uint8_t aacMode2 = cfg->aacMode2;
lib/virtual_oss/bt/avdtp.c
267
retval = avdtpSendSyncCommand(cfg->hc, &info, AVDTP_DISCOVER, 0,
lib/virtual_oss/bt/avdtp.c
274
cfg->sep = info.buffer_data[offset] >> 2;
lib/virtual_oss/bt/avdtp.c
275
cfg->media_Type = info.buffer_data[offset + 1] >> 4;
lib/virtual_oss/bt/avdtp.c
276
cfg->chmode = chmode;
lib/virtual_oss/bt/avdtp.c
277
cfg->aacMode1 = aacMode1;
lib/virtual_oss/bt/avdtp.c
278
cfg->aacMode2 = aacMode2;
lib/virtual_oss/bt/avdtp.c
289
retval = avdtpAutoConfig(cfg);
lib/virtual_oss/bt/avdtp.c
377
avdtpAutoConfig(struct bt_config *cfg)
lib/virtual_oss/bt/avdtp.c
396
retval = avdtpGetCapabilities(cfg->hc, cfg->sep, &info);
lib/virtual_oss/bt/avdtp.c
447
aacMode1 &= cfg->aacMode1;
lib/virtual_oss/bt/avdtp.c
448
aacMode2 &= cfg->aacMode2;
lib/virtual_oss/bt/avdtp.c
451
if (aacMode1 == cfg->aacMode1 && aacMode2 == cfg->aacMode2) {
lib/virtual_oss/bt/avdtp.c
459
(cfg->hc, cfg->sep, config, sizeof(config)) == 0) {
lib/virtual_oss/bt/avdtp.c
460
cfg->codec = CODEC_AAC;
lib/virtual_oss/bt/avdtp.c
466
if (cfg->freq == FREQ_UNDEFINED)
lib/virtual_oss/bt/avdtp.c
469
freqmode = (1 << (3 - cfg->freq + 4)) | (1 << (3 - cfg->chmode));
lib/virtual_oss/bt/avdtp.c
477
(1 << (1 - cfg->bands + 2)) | (1 << cfg->allocm);
lib/virtual_oss/bt/avdtp.c
486
cfg->blocks = (3 - i);
lib/virtual_oss/bt/avdtp.c
488
if (cfg->allocm == ALLOC_SNR)
lib/virtual_oss/bt/avdtp.c
491
if (cfg->chmode == MODE_DUAL || cfg->chmode == MODE_MONO)
lib/virtual_oss/bt/avdtp.c
494
if (cfg->bands == BANDS_4)
lib/virtual_oss/bt/avdtp.c
497
if (supBitpoolMax > cfg->bitpool)
lib/virtual_oss/bt/avdtp.c
498
supBitpoolMax = cfg->bitpool;
lib/virtual_oss/bt/avdtp.c
500
cfg->bitpool = supBitpoolMax;
lib/virtual_oss/bt/avdtp.c
509
(cfg->hc, cfg->sep, config, sizeof(config)) == 0) {
lib/virtual_oss/bt/avdtp.c
510
cfg->codec = CODEC_SBC;
lib/virtual_oss/bt/avdtp.c
516
if (cfg->chmode == MODE_STEREO) {
lib/virtual_oss/bt/avdtp.c
517
cfg->chmode = MODE_MONO;
lib/virtual_oss/bt/avdtp.c
518
cfg->aacMode2 ^= 0x0C;
lib/virtual_oss/bt/avdtp.c
525
avdtpACPFree(struct bt_config *cfg)
lib/virtual_oss/bt/avdtp.c
527
if (cfg->handle.sbc_enc) {
lib/virtual_oss/bt/avdtp.c
528
free(cfg->handle.sbc_enc);
lib/virtual_oss/bt/avdtp.c
529
cfg->handle.sbc_enc = NULL;
lib/virtual_oss/bt/avdtp.c
535
avdtpParseSBCConfig(uint8_t * data, struct bt_config *cfg)
lib/virtual_oss/bt/avdtp.c
538
cfg->freq = FREQ_48K;
lib/virtual_oss/bt/avdtp.c
540
cfg->freq = FREQ_44_1K;
lib/virtual_oss/bt/avdtp.c
542
cfg->freq = FREQ_32K;
lib/virtual_oss/bt/avdtp.c
544
cfg->freq = FREQ_16K;
lib/virtual_oss/bt/avdtp.c
550
cfg->chmode = MODE_STEREO;
lib/virtual_oss/bt/avdtp.c
552
cfg->chmode = MODE_JOINT;
lib/virtual_oss/bt/avdtp.c
554
cfg->chmode = MODE_DUAL;
lib/virtual_oss/bt/avdtp.c
556
cfg->chmode = MODE_MONO;
lib/virtual_oss/bt/avdtp.c
562
cfg->blocks = BLOCKS_16;
lib/virtual_oss/bt/avdtp.c
564
cfg->blocks = BLOCKS_12;
lib/virtual_oss/bt/avdtp.c
566
cfg->blocks = BLOCKS_8;
lib/virtual_oss/bt/avdtp.c
568
cfg->blocks = BLOCKS_4;
lib/virtual_oss/bt/avdtp.c
574
cfg->bands = BANDS_8;
lib/virtual_oss/bt/avdtp.c
576
cfg->bands = BANDS_4;
lib/virtual_oss/bt/avdtp.c
582
cfg->allocm = ALLOC_LOUDNESS;
lib/virtual_oss/bt/avdtp.c
584
cfg->allocm = ALLOC_SNR;
lib/virtual_oss/bt/avdtp.c
588
cfg->bitpool = data[3];
lib/virtual_oss/bt/avdtp.c
593
avdtpACPHandlePacket(struct bt_config *cfg)
lib/virtual_oss/bt/avdtp.c
598
if (avdtpGetPacket(cfg->hc, &info) != COMMAND)
lib/virtual_oss/bt/avdtp.c
604
avdtpSendDiscResponseAudio(cfg->hc, info.trans, ACPSEP, 1);
lib/virtual_oss/bt/avdtp.c
610
avdtpSendCapabilitiesResponseSBCForACP(cfg->hc, info.trans);
lib/virtual_oss/bt/avdtp.c
615
if (cfg->acceptor_state != acpInitial)
lib/virtual_oss/bt/avdtp.c
617
cfg->sep = info.buffer_data[1] >> 2;
lib/virtual_oss/bt/avdtp.c
634
avdtpParseSBCConfig(info.buffer_data + i + 4, cfg);
lib/virtual_oss/bt/avdtp.c
652
avdtpSendAccept(cfg->hc, info.trans, AVDTP_SET_CONFIGURATION);
lib/virtual_oss/bt/avdtp.c
657
if (cfg->handle.sbc_enc == NULL) {
lib/virtual_oss/bt/avdtp.c
658
cfg->handle.sbc_enc = malloc(sizeof(*cfg->handle.sbc_enc));
lib/virtual_oss/bt/avdtp.c
659
if (cfg->handle.sbc_enc == NULL)
lib/virtual_oss/bt/avdtp.c
662
memset(cfg->handle.sbc_enc, 0, sizeof(*cfg->handle.sbc_enc));
lib/virtual_oss/bt/avdtp.c
665
cfg->acceptor_state = acpConfigurationSet;
lib/virtual_oss/bt/avdtp.c
668
if (cfg->acceptor_state != acpConfigurationSet)
lib/virtual_oss/bt/avdtp.c
670
retval = avdtpSendAccept(cfg->hc, info.trans, info.signalID);
lib/virtual_oss/bt/avdtp.c
674
cfg->acceptor_state = acpStreamOpened;
lib/virtual_oss/bt/avdtp.c
677
if (cfg->acceptor_state != acpStreamOpened &&
lib/virtual_oss/bt/avdtp.c
678
cfg->acceptor_state != acpStreamSuspended) {
lib/virtual_oss/bt/avdtp.c
681
retval = avdtpSendAccept(cfg->hc, info.trans, info.signalID);
lib/virtual_oss/bt/avdtp.c
685
cfg->acceptor_state = acpStreamStarted;
lib/virtual_oss/bt/avdtp.c
688
if (cfg->acceptor_state != acpStreamOpened &&
lib/virtual_oss/bt/avdtp.c
689
cfg->acceptor_state != acpStreamStarted &&
lib/virtual_oss/bt/avdtp.c
690
cfg->acceptor_state != acpStreamSuspended) {
lib/virtual_oss/bt/avdtp.c
693
retval = avdtpSendAccept(cfg->hc, info.trans, info.signalID);
lib/virtual_oss/bt/avdtp.c
697
cfg->acceptor_state = acpStreamClosed;
lib/virtual_oss/bt/avdtp.c
700
if (cfg->acceptor_state != acpStreamOpened &&
lib/virtual_oss/bt/avdtp.c
701
cfg->acceptor_state != acpStreamStarted) {
lib/virtual_oss/bt/avdtp.c
704
retval = avdtpSendAccept(cfg->hc, info.trans, info.signalID);
lib/virtual_oss/bt/avdtp.c
708
cfg->acceptor_state = acpStreamSuspended;
lib/virtual_oss/bt/avdtp.c
716
avdtpSendReject(cfg->hc, info.trans, info.signalID);
lib/virtual_oss/bt/avdtp_signal.h
135
int avdtpACPHandlePacket(struct bt_config *cfg);
lib/virtual_oss/bt/avdtp_signal.h
137
void avdtpACPFree(struct bt_config *cfg);
lib/virtual_oss/bt/bt.c
1007
cfg->rem_in_len = 0;
lib/virtual_oss/bt/bt.c
1020
struct bt_config *cfg = pbe->arg;
lib/virtual_oss/bt/bt.c
1022
switch (cfg->codec) {
lib/virtual_oss/bt/bt.c
119
err = sbc_decode_frame(cfg, sbc->rem_data_len * 8);
lib/virtual_oss/bt/bt.c
126
err = read(cfg->fd, cfg->mtu_data, cfg->mtu);
lib/virtual_oss/bt/bt.c
164
struct bt_config *cfg = pbe->arg;
lib/virtual_oss/bt/bt.c
166
if (cfg->hc > 0) {
lib/virtual_oss/bt/bt.c
167
avdtpAbort(cfg->hc, cfg->sep);
lib/virtual_oss/bt/bt.c
168
avdtpClose(cfg->hc, cfg->sep);
lib/virtual_oss/bt/bt.c
169
close(cfg->hc);
lib/virtual_oss/bt/bt.c
170
cfg->hc = -1;
lib/virtual_oss/bt/bt.c
172
if (cfg->fd > 0) {
lib/virtual_oss/bt/bt.c
173
close(cfg->fd);
lib/virtual_oss/bt/bt.c
174
cfg->fd = -1;
lib/virtual_oss/bt/bt.c
181
struct bt_config *cfg = pbe->arg;
lib/virtual_oss/bt/bt.c
183
switch (cfg->codec) {
lib/virtual_oss/bt/bt.c
185
if (cfg->handle.sbc_enc == NULL)
lib/virtual_oss/bt/bt.c
187
free(cfg->handle.sbc_enc);
lib/virtual_oss/bt/bt.c
188
cfg->handle.sbc_enc = NULL;
lib/virtual_oss/bt/bt.c
192
if (cfg->handle.av.context == NULL)
lib/virtual_oss/bt/bt.c
194
av_free(cfg->rem_in_data);
lib/virtual_oss/bt/bt.c
195
av_frame_free(&cfg->handle.av.frame);
lib/virtual_oss/bt/bt.c
196
avcodec_close(cfg->handle.av.context);
lib/virtual_oss/bt/bt.c
197
avformat_free_context(cfg->handle.av.format);
lib/virtual_oss/bt/bt.c
198
cfg->handle.av.context = NULL;
lib/virtual_oss/bt/bt.c
210
struct bt_config *cfg = pbe->arg;
lib/virtual_oss/bt/bt.c
212
switch (cfg->codec) {
lib/virtual_oss/bt/bt.c
363
int bufsize __unused, int *pchannels, int *pformat, struct bt_config *cfg,
lib/virtual_oss/bt/bt.c
393
cfg->freq = FREQ_UNDEFINED;
lib/virtual_oss/bt/bt.c
394
cfg->aacMode1 = 0x80;
lib/virtual_oss/bt/bt.c
395
cfg->aacMode2 = 0x0C;
lib/virtual_oss/bt/bt.c
398
cfg->freq = FREQ_UNDEFINED;
lib/virtual_oss/bt/bt.c
399
cfg->aacMode1 = 0x40;
lib/virtual_oss/bt/bt.c
400
cfg->aacMode2 = 0x0C;
lib/virtual_oss/bt/bt.c
403
cfg->freq = FREQ_UNDEFINED;
lib/virtual_oss/bt/bt.c
404
cfg->aacMode1 = 0x20;
lib/virtual_oss/bt/bt.c
405
cfg->aacMode2 = 0x0C;
lib/virtual_oss/bt/bt.c
408
cfg->freq = FREQ_16K;
lib/virtual_oss/bt/bt.c
409
cfg->aacMode1 = 0x10;
lib/virtual_oss/bt/bt.c
410
cfg->aacMode2 = 0x0C;
lib/virtual_oss/bt/bt.c
413
cfg->freq = FREQ_UNDEFINED;
lib/virtual_oss/bt/bt.c
414
cfg->aacMode1 = 0x08;
lib/virtual_oss/bt/bt.c
415
cfg->aacMode2 = 0x0C;
lib/virtual_oss/bt/bt.c
418
cfg->freq = FREQ_UNDEFINED;
lib/virtual_oss/bt/bt.c
419
cfg->aacMode1 = 0x04;
lib/virtual_oss/bt/bt.c
420
cfg->aacMode2 = 0x0C;
lib/virtual_oss/bt/bt.c
423
cfg->freq = FREQ_32K;
lib/virtual_oss/bt/bt.c
424
cfg->aacMode1 = 0x02;
lib/virtual_oss/bt/bt.c
425
cfg->aacMode2 = 0x0C;
lib/virtual_oss/bt/bt.c
428
cfg->freq = FREQ_44_1K;
lib/virtual_oss/bt/bt.c
429
cfg->aacMode1 = 0x01;
lib/virtual_oss/bt/bt.c
430
cfg->aacMode2 = 0x0C;
lib/virtual_oss/bt/bt.c
433
cfg->freq = FREQ_48K;
lib/virtual_oss/bt/bt.c
434
cfg->aacMode1 = 0;
lib/virtual_oss/bt/bt.c
435
cfg->aacMode2 = 0x8C;
lib/virtual_oss/bt/bt.c
438
cfg->freq = FREQ_UNDEFINED;
lib/virtual_oss/bt/bt.c
439
cfg->aacMode1 = 0;
lib/virtual_oss/bt/bt.c
440
cfg->aacMode2 = 0x4C;
lib/virtual_oss/bt/bt.c
443
cfg->freq = FREQ_UNDEFINED;
lib/virtual_oss/bt/bt.c
444
cfg->aacMode1 = 0;
lib/virtual_oss/bt/bt.c
445
cfg->aacMode2 = 0x2C;
lib/virtual_oss/bt/bt.c
448
cfg->freq = FREQ_UNDEFINED;
lib/virtual_oss/bt/bt.c
449
cfg->aacMode1 = 0;
lib/virtual_oss/bt/bt.c
450
cfg->aacMode2 = 0x1C;
lib/virtual_oss/bt/bt.c
456
cfg->bands = BANDS_8;
lib/virtual_oss/bt/bt.c
457
cfg->bitpool = 0;
lib/virtual_oss/bt/bt.c
461
cfg->aacMode2 &= 0xF8;
lib/virtual_oss/bt/bt.c
462
cfg->chmode = MODE_MONO;
lib/virtual_oss/bt/bt.c
465
cfg->aacMode2 &= 0xF4;
lib/virtual_oss/bt/bt.c
466
cfg->chmode = MODE_STEREO;
lib/virtual_oss/bt/bt.c
470
cfg->allocm = ALLOC_LOUDNESS;
lib/virtual_oss/bt/bt.c
472
if (cfg->chmode == MODE_MONO || cfg->chmode == MODE_DUAL)
lib/virtual_oss/bt/bt.c
477
if (cfg->bands == BANDS_8)
lib/virtual_oss/bt/bt.c
485
cfg->bitpool = tmpbitpool;
lib/virtual_oss/bt/bt.c
497
cfg->hc = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BLUETOOTH_PROTO_L2CAP);
lib/virtual_oss/bt/bt.c
498
if (cfg->hc < 0) {
lib/virtual_oss/bt/bt.c
507
if (bind(cfg->hc, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
lib/virtual_oss/bt/bt.c
513
if (connect(cfg->hc, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
lib/virtual_oss/bt/bt.c
517
if (avdtpDiscoverAndConfig(cfg, isSink)) {
lib/virtual_oss/bt/bt.c
521
if (avdtpOpen(cfg->hc, cfg->sep)) {
lib/virtual_oss/bt/bt.c
525
cfg->fd = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BLUETOOTH_PROTO_L2CAP);
lib/virtual_oss/bt/bt.c
526
if (cfg->fd < 0) {
lib/virtual_oss/bt/bt.c
536
if (bind(cfg->fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
lib/virtual_oss/bt/bt.c
542
if (connect(cfg->fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
lib/virtual_oss/bt/bt.c
547
if (getsockopt(cfg->fd, SOL_L2CAP, SO_L2CAP_OMTU, &cfg->mtu, &mtusize) == -1) {
lib/virtual_oss/bt/bt.c
551
temp = cfg->mtu * 16;
lib/virtual_oss/bt/bt.c
552
if (setsockopt(cfg->fd, SOL_SOCKET, SO_SNDBUF, &temp, sizeof(temp)) == -1) {
lib/virtual_oss/bt/bt.c
556
temp = cfg->mtu;
lib/virtual_oss/bt/bt.c
557
if (setsockopt(cfg->fd, SOL_SOCKET, SO_SNDLOWAT, &temp, sizeof(temp)) == -1) {
lib/virtual_oss/bt/bt.c
562
if (getsockopt(cfg->fd, SOL_L2CAP, SO_L2CAP_IMTU, &cfg->mtu, &mtusize) == -1) {
lib/virtual_oss/bt/bt.c
566
temp = cfg->mtu * 16;
lib/virtual_oss/bt/bt.c
567
if (setsockopt(cfg->fd, SOL_SOCKET, SO_RCVBUF, &temp, sizeof(temp)) == -1) {
lib/virtual_oss/bt/bt.c
572
if (setsockopt(cfg->fd, SOL_SOCKET, SO_RCVLOWAT, &temp, sizeof(temp)) == -1) {
lib/virtual_oss/bt/bt.c
577
if (ioctl(cfg->fd, FIONBIO, &temp) == -1) {
lib/virtual_oss/bt/bt.c
583
if (avdtpStart(cfg->hc, cfg->sep)) {
lib/virtual_oss/bt/bt.c
587
switch (cfg->chmode) {
lib/virtual_oss/bt/bt.c
598
if (cfg->hc > 0) {
lib/virtual_oss/bt/bt.c
599
close(cfg->hc);
lib/virtual_oss/bt/bt.c
60
bt_receive(struct bt_config *cfg, void *ptr, int len, int use_delay)
lib/virtual_oss/bt/bt.c
600
cfg->hc = -1;
lib/virtual_oss/bt/bt.c
602
if (cfg->fd > 0) {
lib/virtual_oss/bt/bt.c
603
close(cfg->fd);
lib/virtual_oss/bt/bt.c
604
cfg->fd = -1;
lib/virtual_oss/bt/bt.c
610
bt_init_cfg(struct bt_config *cfg)
lib/virtual_oss/bt/bt.c
612
memset(cfg, 0, sizeof(*cfg));
lib/virtual_oss/bt/bt.c
619
struct bt_config *cfg = pbe->arg;
lib/virtual_oss/bt/bt.c
62
struct sbc_header *phdr = (struct sbc_header *)cfg->mtu_data;
lib/virtual_oss/bt/bt.c
622
bt_init_cfg(cfg);
lib/virtual_oss/bt/bt.c
625
cfg, SDP_SERVICE_CLASS_AUDIO_SOURCE, 0);
lib/virtual_oss/bt/bt.c
63
struct sbc_encode *sbc = cfg->handle.sbc_enc;
lib/virtual_oss/bt/bt.c
635
struct bt_config *cfg = pbe->arg;
lib/virtual_oss/bt/bt.c
638
bt_init_cfg(cfg);
lib/virtual_oss/bt/bt.c
641
cfg, SDP_SERVICE_CLASS_AUDIO_SINK, 1);
lib/virtual_oss/bt/bt.c
646
switch (cfg->codec) {
lib/virtual_oss/bt/bt.c
648
cfg->handle.sbc_enc =
lib/virtual_oss/bt/bt.c
649
malloc(sizeof(*cfg->handle.sbc_enc));
lib/virtual_oss/bt/bt.c
650
if (cfg->handle.sbc_enc == NULL)
lib/virtual_oss/bt/bt.c
652
memset(cfg->handle.sbc_enc, 0, sizeof(*cfg->handle.sbc_enc));
lib/virtual_oss/bt/bt.c
656
cfg->handle.av.codec = __DECONST(AVCodec *,
lib/virtual_oss/bt/bt.c
658
if (cfg->handle.av.codec == NULL) {
lib/virtual_oss/bt/bt.c
662
cfg->handle.av.format = avformat_alloc_context();
lib/virtual_oss/bt/bt.c
663
if (cfg->handle.av.format == NULL) {
lib/virtual_oss/bt/bt.c
667
cfg->handle.av.format->oformat =
lib/virtual_oss/bt/bt.c
669
if (cfg->handle.av.format->oformat == NULL) {
lib/virtual_oss/bt/bt.c
673
cfg->handle.av.stream = avformat_new_stream(
lib/virtual_oss/bt/bt.c
674
cfg->handle.av.format, cfg->handle.av.codec);
lib/virtual_oss/bt/bt.c
676
if (cfg->handle.av.stream == NULL) {
lib/virtual_oss/bt/bt.c
680
cfg->handle.av.context = avcodec_alloc_context3(cfg->handle.av.codec);
lib/virtual_oss/bt/bt.c
681
if (cfg->handle.av.context == NULL) {
lib/virtual_oss/bt/bt.c
688
cfg->handle.av.context->bit_rate = 128000;
lib/virtual_oss/bt/bt.c
689
cfg->handle.av.context->sample_fmt = AV_SAMPLE_FMT_FLTP;
lib/virtual_oss/bt/bt.c
690
cfg->handle.av.context->sample_rate = samplerate;
lib/virtual_oss/bt/bt.c
693
cfg->handle.av.context->ch_layout = *(AVChannelLayout *)AV_CH_LAYOUT_MONO;
lib/virtual_oss/bt/bt.c
696
cfg->handle.av.context->ch_layout = *(AVChannelLayout *)AV_CH_LAYOUT_STEREO;
lib/virtual_oss/bt/bt.c
700
cfg->handle.av.context->profile = FF_PROFILE_AAC_LOW;
lib/virtual_oss/bt/bt.c
707
if (avcodec_open2(cfg->handle.av.context,
lib/virtual_oss/bt/bt.c
708
cfg->handle.av.codec, &opts) < 0) {
lib/virtual_oss/bt/bt.c
716
cfg->handle.av.frame = av_frame_alloc();
lib/virtual_oss/bt/bt.c
717
if (cfg->handle.av.frame == NULL) {
lib/virtual_oss/bt/bt.c
721
cfg->handle.av.frame->nb_samples = cfg->handle.av.context->frame_size;
lib/virtual_oss/bt/bt.c
722
cfg->handle.av.frame->format = cfg->handle.av.context->sample_fmt;
lib/virtual_oss/bt/bt.c
723
cfg->handle.av.frame->ch_layout = cfg->handle.av.context->ch_layout;
lib/virtual_oss/bt/bt.c
724
cfg->rem_in_size = av_samples_get_buffer_size(NULL,
lib/virtual_oss/bt/bt.c
725
cfg->handle.av.context->ch_layout.nb_channels,
lib/virtual_oss/bt/bt.c
726
cfg->handle.av.context->frame_size,
lib/virtual_oss/bt/bt.c
727
cfg->handle.av.context->sample_fmt, 0);
lib/virtual_oss/bt/bt.c
729
cfg->rem_in_data = av_malloc(cfg->rem_in_size);
lib/virtual_oss/bt/bt.c
73
switch (cfg->blocks) {
lib/virtual_oss/bt/bt.c
730
if (cfg->rem_in_data == NULL) {
lib/virtual_oss/bt/bt.c
732
(unsigned)cfg->rem_in_size);
lib/virtual_oss/bt/bt.c
735
retval = avcodec_fill_audio_frame(cfg->handle.av.frame,
lib/virtual_oss/bt/bt.c
736
cfg->handle.av.context->ch_layout.nb_channels,
lib/virtual_oss/bt/bt.c
737
cfg->handle.av.context->sample_fmt,
lib/virtual_oss/bt/bt.c
738
cfg->rem_in_data, cfg->rem_in_size, 0);
lib/virtual_oss/bt/bt.c
745
av_free(cfg->rem_in_data);
lib/virtual_oss/bt/bt.c
747
av_frame_free(&cfg->handle.av.frame);
lib/virtual_oss/bt/bt.c
749
avcodec_close(cfg->handle.av.context);
lib/virtual_oss/bt/bt.c
751
avformat_free_context(cfg->handle.av.format);
lib/virtual_oss/bt/bt.c
752
cfg->handle.av.context = NULL;
lib/virtual_oss/bt/bt.c
773
struct bt_config *cfg = pbe->arg;
lib/virtual_oss/bt/bt.c
774
struct sbc_encode *sbc = cfg->handle.sbc_enc;
lib/virtual_oss/bt/bt.c
779
switch (cfg->blocks) {
lib/virtual_oss/bt/bt.c
798
switch (cfg->bands) {
lib/virtual_oss/bt/bt.c
812
if (cfg->chmode != MODE_MONO) {
lib/virtual_oss/bt/bt.c
836
struct sbc_header *phdr = (struct sbc_header *)cfg->mtu_data;
lib/virtual_oss/bt/bt.c
840
if (cfg->chmode == MODE_MONO)
lib/virtual_oss/bt/bt.c
845
pkt_len = sbc_encode_frame(cfg);
lib/virtual_oss/bt/bt.c
848
if (cfg->mtu_offset == 0) {
lib/virtual_oss/bt/bt.c
851
phdr->seqnumMSB = (uint8_t)(cfg->mtu_seqnumber >> 8);
lib/virtual_oss/bt/bt.c
852
phdr->seqnumLSB = (uint8_t)(cfg->mtu_seqnumber);
lib/virtual_oss/bt/bt.c
853
phdr->ts3 = (uint8_t)(cfg->mtu_timestamp >> 24);
lib/virtual_oss/bt/bt.c
854
phdr->ts2 = (uint8_t)(cfg->mtu_timestamp >> 16);
lib/virtual_oss/bt/bt.c
855
phdr->ts1 = (uint8_t)(cfg->mtu_timestamp >> 8);
lib/virtual_oss/bt/bt.c
856
phdr->ts0 = (uint8_t)(cfg->mtu_timestamp);
lib/virtual_oss/bt/bt.c
860
cfg->mtu_seqnumber++;
lib/virtual_oss/bt/bt.c
861
cfg->mtu_offset += sizeof(*phdr);
lib/virtual_oss/bt/bt.c
864
rem = cfg->mtu - cfg->mtu_offset;
lib/virtual_oss/bt/bt.c
872
xlen = write(cfg->fd, cfg->mtu_data, cfg->mtu_offset);
lib/virtual_oss/bt/bt.c
878
cfg->mtu_offset = 0;
lib/virtual_oss/bt/bt.c
88
switch (cfg->bands) {
lib/virtual_oss/bt/bt.c
881
memcpy(cfg->mtu_data + cfg->mtu_offset, sbc->data, pkt_len);
lib/virtual_oss/bt/bt.c
883
cfg->mtu_offset += pkt_len;
lib/virtual_oss/bt/bt.c
884
cfg->mtu_timestamp += sbc->framesamples;
lib/virtual_oss/bt/bt.c
899
struct bt_config *cfg = pbe->arg;
lib/virtual_oss/bt/bt.c
922
if (delta > (int)(cfg->rem_in_size - cfg->rem_in_len))
lib/virtual_oss/bt/bt.c
923
delta = (int)(cfg->rem_in_size - cfg->rem_in_len);
lib/virtual_oss/bt/bt.c
925
memcpy(cfg->rem_in_data + cfg->rem_in_len, ptr, delta);
lib/virtual_oss/bt/bt.c
929
cfg->rem_in_len += delta;
lib/virtual_oss/bt/bt.c
932
if (cfg->rem_in_len == cfg->rem_in_size) {
lib/virtual_oss/bt/bt.c
933
struct aac_header *phdr = (struct aac_header *)cfg->mtu_data;
lib/virtual_oss/bt/bt.c
939
err = avcodec_send_frame(cfg->handle.av.context,
lib/virtual_oss/bt/bt.c
940
cfg->handle.av.frame);
lib/virtual_oss/bt/bt.c
947
phdr->seqnumMSB = (uint8_t)(cfg->mtu_seqnumber >> 8);
lib/virtual_oss/bt/bt.c
948
phdr->seqnumLSB = (uint8_t)(cfg->mtu_seqnumber);
lib/virtual_oss/bt/bt.c
949
phdr->ts3 = (uint8_t)(cfg->mtu_timestamp >> 24);
lib/virtual_oss/bt/bt.c
950
phdr->ts2 = (uint8_t)(cfg->mtu_timestamp >> 16);
lib/virtual_oss/bt/bt.c
951
phdr->ts1 = (uint8_t)(cfg->mtu_timestamp >> 8);
lib/virtual_oss/bt/bt.c
952
phdr->ts0 = (uint8_t)(cfg->mtu_timestamp);
lib/virtual_oss/bt/bt.c
966
cfg->mtu_seqnumber++;
lib/virtual_oss/bt/bt.c
967
cfg->mtu_offset = sizeof(*phdr);
lib/virtual_oss/bt/bt.c
97
if (cfg->chmode != MODE_MONO) {
lib/virtual_oss/bt/bt.c
970
rem = cfg->mtu - cfg->mtu_offset;
lib/virtual_oss/bt/bt.c
972
if (avio_open_dyn_buf(&cfg->handle.av.format->pb) == 0) {
lib/virtual_oss/bt/bt.c
976
(void)avformat_write_header(cfg->handle.av.format, NULL);
lib/virtual_oss/bt/bt.c
977
av_write_frame(cfg->handle.av.format, pkt);
lib/virtual_oss/bt/bt.c
979
pkt_len = avio_close_dyn_buf(cfg->handle.av.format->pb, &pkt_buf);
lib/virtual_oss/bt/bt.c
985
memcpy(cfg->mtu_data + cfg->mtu_offset, pkt_buf + 3, pkt_len - 3);
lib/virtual_oss/bt/bt.c
989
cfg->mtu_offset += pkt_len - 3;
lib/virtual_oss/bt/bt.c
990
if (cfg->chmode != MODE_MONO)
lib/virtual_oss/bt/bt.c
991
cfg->mtu_timestamp += cfg->rem_in_size / 4;
lib/virtual_oss/bt/bt.c
993
cfg->mtu_timestamp += cfg->rem_in_size / 2;
lib/virtual_oss/bt/bt.c
995
xlen = write(cfg->fd, cfg->mtu_data, cfg->mtu_offset);
lib/virtual_oss/bt/bt.h
114
int bt_receive(struct bt_config *cfg, void *ptr, int len, int use_delay);
lib/virtual_oss/bt/sbc_encode.c
147
calc_bitneed(struct bt_config *cfg)
lib/virtual_oss/bt/sbc_encode.c
149
struct sbc_encode *sbc = cfg->handle.sbc_enc;
lib/virtual_oss/bt/sbc_encode.c
156
if (cfg->chmode == MODE_DUAL)
lib/virtual_oss/bt/sbc_encode.c
164
if (cfg->allocm == ALLOC_SNR) {
lib/virtual_oss/bt/sbc_encode.c
181
loudnessoffset8[cfg->freq][sb];
lib/virtual_oss/bt/sbc_encode.c
184
loudnessoffset4[cfg->freq][sb];
lib/virtual_oss/bt/sbc_encode.c
212
} while (bitcount + slicecount < cfg->bitpool);
lib/virtual_oss/bt/sbc_encode.c
215
if (bitcount + slicecount == cfg->bitpool) {
lib/virtual_oss/bt/sbc_encode.c
231
if (cfg->chmode == MODE_DUAL)
lib/virtual_oss/bt/sbc_encode.c
236
while (bitcount < cfg->bitpool && sb < sbc->bands) {
lib/virtual_oss/bt/sbc_encode.c
241
(cfg->bitpool > bitcount + 1)) {
lib/virtual_oss/bt/sbc_encode.c
254
if (cfg->chmode == MODE_DUAL)
lib/virtual_oss/bt/sbc_encode.c
259
while (bitcount < cfg->bitpool && sb < sbc->bands) {
lib/virtual_oss/bt/sbc_encode.c
273
if (cfg->chmode == MODE_DUAL && start_chan == 0) {
lib/virtual_oss/bt/sbc_encode.c
300
sbc_encode(struct bt_config *cfg)
lib/virtual_oss/bt/sbc_encode.c
302
struct sbc_encode *sbc = cfg->handle.sbc_enc;
lib/virtual_oss/bt/sbc_encode.c
374
if (cfg->chmode == MODE_JOINT)
lib/virtual_oss/bt/sbc_encode.c
379
calc_bitneed(cfg);
lib/virtual_oss/bt/sbc_encode.c
417
sbc_decode(struct bt_config *cfg)
lib/virtual_oss/bt/sbc_encode.c
419
struct sbc_encode *sbc = cfg->handle.sbc_enc;
lib/virtual_oss/bt/sbc_encode.c
460
if (cfg->chmode == MODE_JOINT) {
lib/virtual_oss/bt/sbc_encode.c
550
sbc_encode_frame(struct bt_config *cfg)
lib/virtual_oss/bt/sbc_encode.c
552
struct sbc_encode *sbc = cfg->handle.sbc_enc;
lib/virtual_oss/bt/sbc_encode.c
560
config = (cfg->freq << 6) | (cfg->blocks << 4) |
lib/virtual_oss/bt/sbc_encode.c
561
(cfg->chmode << 2) | (cfg->allocm << 1) | cfg->bands;
lib/virtual_oss/bt/sbc_encode.c
563
sbc_encode(cfg);
lib/virtual_oss/bt/sbc_encode.c
574
sbc_store_bits_crc(sbc, 8, cfg->bitpool);
lib/virtual_oss/bt/sbc_encode.c
579
if (cfg->chmode == MODE_JOINT) {
lib/virtual_oss/bt/sbc_encode.c
629
sbc_decode_frame(struct bt_config *cfg, int bits)
lib/virtual_oss/bt/sbc_encode.c
631
struct sbc_encode *sbc = cfg->handle.sbc_enc;
lib/virtual_oss/bt/sbc_encode.c
642
config = (cfg->freq << 6) | (cfg->blocks << 4) |
lib/virtual_oss/bt/sbc_encode.c
643
(cfg->chmode << 2) | (cfg->allocm << 1) | cfg->bands;
lib/virtual_oss/bt/sbc_encode.c
659
cfg->bitpool = sbc_load_bits_crc(sbc, 8);
lib/virtual_oss/bt/sbc_encode.c
663
if (cfg->chmode == MODE_JOINT) {
lib/virtual_oss/bt/sbc_encode.c
679
calc_bitneed(cfg);
lib/virtual_oss/bt/sbc_encode.c
695
sbc_decode(cfg);
sbin/devd/devd.cc
1066
cfg.remove_pidfile();
sbin/devd/devd.cc
1067
cfg.open_pidfile();
sbin/devd/devd.cc
1069
cfg.write_pidfile();
sbin/devd/devd.cc
1151
cfg.remove_pidfile();
sbin/devd/devd.cc
1163
cfg.add_attach(prio, p);
sbin/devd/devd.cc
1169
cfg.add_detach(prio, p);
sbin/devd/devd.cc
1175
cfg.add_directory(dir);
sbin/devd/devd.cc
1182
cfg.add_nomatch(prio, p);
sbin/devd/devd.cc
1188
cfg.add_notify(prio, p);
sbin/devd/devd.cc
1211
eps *e = new match(cfg, var, re);
sbin/devd/devd.cc
1220
eps *e = new media(cfg, var, re);
sbin/devd/devd.cc
1229
cfg.set_pidfile(name);
sbin/devd/devd.cc
1236
cfg.set_variable(var, val);
sbin/devd/devd.cc
1339
cfg.parse();
sbin/devd/devd.cc
1341
cfg.open_pidfile();
sbin/devd/devd.cc
1343
cfg.write_pidfile();
sbin/devd/devd.cc
173
static config cfg;
sbin/devd/devd.cc
263
cfg.close_pidfile();
sbin/devd/devd.cc
859
cfg.push_var_table();
sbin/devd/devd.cc
861
cfg.set_variable("*", buffer - 1);
sbin/devd/devd.cc
863
cfg.set_variable("_", buffer);
sbin/devd/devd.cc
869
cfg.set_variable("timestamp", timestr);
sbin/devd/devd.cc
872
cfg.set_variable("vm_guest", vm_guest);
sbin/devd/devd.cc
879
sp = cfg.set_vars(sp);
sbin/devd/devd.cc
891
sp = cfg.set_vars(sp);
sbin/devd/devd.cc
895
cfg.set_variable("bus", sp + 3);
sbin/devd/devd.cc
903
cfg.set_variable("device-name", buffer);
sbin/devd/devd.cc
908
sp = cfg.set_vars(sp);
sbin/devd/devd.cc
912
cfg.set_variable("bus", sp + 3);
sbin/devd/devd.cc
916
cfg.find_and_execute(type);
sbin/devd/devd.cc
917
cfg.pop_var_table();
sbin/etherswitchcfg/etherswitchcfg.c
121
read_register(struct cfg *cfg, int r)
sbin/etherswitchcfg/etherswitchcfg.c
126
if (ioctl(cfg->fd, IOETHERSWITCHGETREG, &er) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
132
write_register(struct cfg *cfg, int r, int v)
sbin/etherswitchcfg/etherswitchcfg.c
138
if (ioctl(cfg->fd, IOETHERSWITCHSETREG, &er) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
143
read_phyregister(struct cfg *cfg, int phy, int reg)
sbin/etherswitchcfg/etherswitchcfg.c
149
if (ioctl(cfg->fd, IOETHERSWITCHGETPHYREG, &er) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
155
write_phyregister(struct cfg *cfg, int phy, int reg, int val)
sbin/etherswitchcfg/etherswitchcfg.c
162
if (ioctl(cfg->fd, IOETHERSWITCHSETPHYREG, &er) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
167
set_port_vid(struct cfg *cfg, int argc, char *argv[])
sbin/etherswitchcfg/etherswitchcfg.c
180
p.es_port = cfg->unit;
sbin/etherswitchcfg/etherswitchcfg.c
181
if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
184
if (ioctl(cfg->fd, IOETHERSWITCHSETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
190
set_port_flag(struct cfg *cfg, int argc, char *argv[])
sbin/etherswitchcfg/etherswitchcfg.c
226
p.es_port = cfg->unit;
sbin/etherswitchcfg/etherswitchcfg.c
227
if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
233
if (ioctl(cfg->fd, IOETHERSWITCHSETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
239
set_port_media(struct cfg *cfg, int argc, char *argv[])
sbin/etherswitchcfg/etherswitchcfg.c
249
p.es_port = cfg->unit;
sbin/etherswitchcfg/etherswitchcfg.c
252
if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
259
if (ioctl(cfg->fd, IOETHERSWITCHSETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
265
set_port_mediaopt(struct cfg *cfg, int argc, char *argv[])
sbin/etherswitchcfg/etherswitchcfg.c
275
p.es_port = cfg->unit;
sbin/etherswitchcfg/etherswitchcfg.c
278
if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
288
if (ioctl(cfg->fd, IOETHERSWITCHSETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
294
set_port_led(struct cfg *cfg, int argc, char *argv[])
sbin/etherswitchcfg/etherswitchcfg.c
304
p.es_port = cfg->unit;
sbin/etherswitchcfg/etherswitchcfg.c
305
if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
324
if (ioctl(cfg->fd, IOETHERSWITCHSETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
331
set_vlangroup_vid(struct cfg *cfg, int argc, char *argv[])
sbin/etherswitchcfg/etherswitchcfg.c
343
vg.es_vlangroup = cfg->unit;
sbin/etherswitchcfg/etherswitchcfg.c
344
if (ioctl(cfg->fd, IOETHERSWITCHGETVLANGROUP, &vg) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
347
if (ioctl(cfg->fd, IOETHERSWITCHSETVLANGROUP, &vg) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
353
set_vlangroup_members(struct cfg *cfg, int argc, char *argv[])
sbin/etherswitchcfg/etherswitchcfg.c
370
if (v < 0 || v >= cfg->info.es_nports)
sbin/etherswitchcfg/etherswitchcfg.c
371
errx(EX_USAGE, "Member port must be between 0 and %d", cfg->info.es_nports-1);
sbin/etherswitchcfg/etherswitchcfg.c
385
vg.es_vlangroup = cfg->unit;
sbin/etherswitchcfg/etherswitchcfg.c
386
if (ioctl(cfg->fd, IOETHERSWITCHGETVLANGROUP, &vg) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
390
if (ioctl(cfg->fd, IOETHERSWITCHSETVLANGROUP, &vg) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
396
set_register(struct cfg *cfg, char *arg)
sbin/etherswitchcfg/etherswitchcfg.c
406
write_register(cfg, a, v);
sbin/etherswitchcfg/etherswitchcfg.c
408
printf("\treg 0x%04x=0x%08x\n", a, read_register(cfg, a));
sbin/etherswitchcfg/etherswitchcfg.c
413
set_phyregister(struct cfg *cfg, char *arg)
sbin/etherswitchcfg/etherswitchcfg.c
429
write_phyregister(cfg, phy, reg, val);
sbin/etherswitchcfg/etherswitchcfg.c
431
printf("\treg %d.0x%02x=0x%04x\n", phy, reg, read_phyregister(cfg, phy, reg));
sbin/etherswitchcfg/etherswitchcfg.c
436
set_vlan_mode(struct cfg *cfg, int argc, char *argv[])
sbin/etherswitchcfg/etherswitchcfg.c
457
if (ioctl(cfg->fd, IOETHERSWITCHSETCONF, &conf) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
464
atu_flush(struct cfg *cfg, int argc, char *argv[])
sbin/etherswitchcfg/etherswitchcfg.c
487
if (ioctl(cfg->fd, i, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
494
atu_dump(struct cfg *cfg, int argc, char *argv[])
sbin/etherswitchcfg/etherswitchcfg.c
506
if (ioctl(cfg->fd, IOETHERSWITCHGETTABLE, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
513
if (ioctl(cfg->fd, IOETHERSWITCHGETTABLEENTRY, &e) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
525
print_config(struct cfg *cfg)
sbin/etherswitchcfg/etherswitchcfg.c
530
c = strrchr(cfg->controlfile, '/');
sbin/etherswitchcfg/etherswitchcfg.c
534
c = cfg->controlfile;
sbin/etherswitchcfg/etherswitchcfg.c
537
if (cfg->conf.cmd & ETHERSWITCH_CONF_VLAN_MODE) {
sbin/etherswitchcfg/etherswitchcfg.c
539
switch (cfg->conf.vlan_mode) {
sbin/etherswitchcfg/etherswitchcfg.c
561
if (cfg->conf.cmd & ETHERSWITCH_CONF_SWITCH_MACADDR) {
sbin/etherswitchcfg/etherswitchcfg.c
564
ether_ntoa(&cfg->conf.switch_macaddr));
sbin/etherswitchcfg/etherswitchcfg.c
569
print_port(struct cfg *cfg, int port)
sbin/etherswitchcfg/etherswitchcfg.c
579
if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
582
if (cfg->conf.vlan_mode == ETHERSWITCH_VLAN_DOT1Q)
sbin/etherswitchcfg/etherswitchcfg.c
603
if (cfg->mediatypes) {
sbin/etherswitchcfg/etherswitchcfg.c
616
print_vlangroup(struct cfg *cfg, int vlangroup)
sbin/etherswitchcfg/etherswitchcfg.c
622
if (ioctl(cfg->fd, IOETHERSWITCHGETVLANGROUP, &vg) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
628
if (cfg->conf.vlan_mode == ETHERSWITCH_VLAN_PORT)
sbin/etherswitchcfg/etherswitchcfg.c
635
for (i=0; i<cfg->info.es_nports; i++) {
sbin/etherswitchcfg/etherswitchcfg.c
651
print_info(struct cfg *cfg)
sbin/etherswitchcfg/etherswitchcfg.c
656
c = strrchr(cfg->controlfile, '/');
sbin/etherswitchcfg/etherswitchcfg.c
660
c = cfg->controlfile;
sbin/etherswitchcfg/etherswitchcfg.c
661
if (cfg->verbose) {
sbin/etherswitchcfg/etherswitchcfg.c
663
cfg->info.es_name, cfg->info.es_nports,
sbin/etherswitchcfg/etherswitchcfg.c
664
cfg->info.es_nvlangroups);
sbin/etherswitchcfg/etherswitchcfg.c
666
printb("VLAN capabilities", cfg->info.es_vlan_caps,
sbin/etherswitchcfg/etherswitchcfg.c
670
print_config(cfg);
sbin/etherswitchcfg/etherswitchcfg.c
671
for (i=0; i<cfg->info.es_nports; i++) {
sbin/etherswitchcfg/etherswitchcfg.c
672
print_port(cfg, i);
sbin/etherswitchcfg/etherswitchcfg.c
674
for (i=0; i<cfg->info.es_nvlangroups; i++) {
sbin/etherswitchcfg/etherswitchcfg.c
675
print_vlangroup(cfg, i);
sbin/etherswitchcfg/etherswitchcfg.c
680
usage(struct cfg *cfg __unused, char *argv[] __unused)
sbin/etherswitchcfg/etherswitchcfg.c
701
newmode(struct cfg *cfg, enum cmdmode mode)
sbin/etherswitchcfg/etherswitchcfg.c
703
if (mode == cfg->mode)
sbin/etherswitchcfg/etherswitchcfg.c
705
switch (cfg->mode) {
sbin/etherswitchcfg/etherswitchcfg.c
713
if (ioctl(cfg->fd, IOETHERSWITCHGETCONF, &cfg->conf) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
715
print_config(cfg);
sbin/etherswitchcfg/etherswitchcfg.c
718
print_port(cfg, cfg->unit);
sbin/etherswitchcfg/etherswitchcfg.c
721
print_vlangroup(cfg, cfg->unit);
sbin/etherswitchcfg/etherswitchcfg.c
728
cfg->mode = mode;
sbin/etherswitchcfg/etherswitchcfg.c
735
struct cfg cfg;
sbin/etherswitchcfg/etherswitchcfg.c
738
bzero(&cfg, sizeof(cfg));
sbin/etherswitchcfg/etherswitchcfg.c
739
cfg.controlfile = "/dev/etherswitch0";
sbin/etherswitchcfg/etherswitchcfg.c
743
cfg.controlfile = optarg;
sbin/etherswitchcfg/etherswitchcfg.c
746
cfg.mediatypes++;
sbin/etherswitchcfg/etherswitchcfg.c
749
cfg.verbose++;
sbin/etherswitchcfg/etherswitchcfg.c
754
usage(&cfg, argv);
sbin/etherswitchcfg/etherswitchcfg.c
758
cfg.fd = open(cfg.controlfile, O_RDONLY);
sbin/etherswitchcfg/etherswitchcfg.c
759
if (cfg.fd < 0)
sbin/etherswitchcfg/etherswitchcfg.c
760
err(EX_UNAVAILABLE, "Can't open control file: %s", cfg.controlfile);
sbin/etherswitchcfg/etherswitchcfg.c
761
if (ioctl(cfg.fd, IOETHERSWITCHGETINFO, &cfg.info) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
763
if (ioctl(cfg.fd, IOETHERSWITCHGETCONF, &cfg.conf) != 0)
sbin/etherswitchcfg/etherswitchcfg.c
766
print_info(&cfg);
sbin/etherswitchcfg/etherswitchcfg.c
769
cfg.mode = MODE_NONE;
sbin/etherswitchcfg/etherswitchcfg.c
771
switch(cfg.mode) {
sbin/etherswitchcfg/etherswitchcfg.c
774
print_info(&cfg);
sbin/etherswitchcfg/etherswitchcfg.c
775
} else if (sscanf(argv[0], "port%d", &cfg.unit) == 1) {
sbin/etherswitchcfg/etherswitchcfg.c
776
if (cfg.unit < 0 || cfg.unit >= cfg.info.es_nports)
sbin/etherswitchcfg/etherswitchcfg.c
777
errx(EX_USAGE, "port unit must be between 0 and %d", cfg.info.es_nports - 1);
sbin/etherswitchcfg/etherswitchcfg.c
778
newmode(&cfg, MODE_PORT);
sbin/etherswitchcfg/etherswitchcfg.c
779
} else if (sscanf(argv[0], "vlangroup%d", &cfg.unit) == 1) {
sbin/etherswitchcfg/etherswitchcfg.c
780
if (cfg.unit < 0 || cfg.unit >= cfg.info.es_nvlangroups)
sbin/etherswitchcfg/etherswitchcfg.c
783
cfg.info.es_nvlangroups - 1);
sbin/etherswitchcfg/etherswitchcfg.c
784
newmode(&cfg, MODE_VLANGROUP);
sbin/etherswitchcfg/etherswitchcfg.c
786
newmode(&cfg, MODE_CONFIG);
sbin/etherswitchcfg/etherswitchcfg.c
788
newmode(&cfg, MODE_PHYREG);
sbin/etherswitchcfg/etherswitchcfg.c
790
newmode(&cfg, MODE_REGISTER);
sbin/etherswitchcfg/etherswitchcfg.c
792
usage(&cfg, argv);
sbin/etherswitchcfg/etherswitchcfg.c
794
newmode(&cfg, MODE_ATU);
sbin/etherswitchcfg/etherswitchcfg.c
805
if (cfg.mode == cmds[i].mode &&
sbin/etherswitchcfg/etherswitchcfg.c
81
int (*f)(struct cfg *, int argc, char *argv[]);
sbin/etherswitchcfg/etherswitchcfg.c
815
r = (cmds[i].f)(&cfg, argc, argv);
sbin/etherswitchcfg/etherswitchcfg.c
833
newmode(&cfg, MODE_NONE);
sbin/etherswitchcfg/etherswitchcfg.c
838
if (set_register(&cfg, argv[0]) != 0) {
sbin/etherswitchcfg/etherswitchcfg.c
839
newmode(&cfg, MODE_NONE);
sbin/etherswitchcfg/etherswitchcfg.c
844
if (set_phyregister(&cfg, argv[0]) != 0) {
sbin/etherswitchcfg/etherswitchcfg.c
845
newmode(&cfg, MODE_NONE);
sbin/etherswitchcfg/etherswitchcfg.c
854
newmode(&cfg, MODE_NONE);
sbin/etherswitchcfg/etherswitchcfg.c
855
close(cfg.fd);
sbin/hastctl/hastctl.c
180
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastctl/hastctl.c
231
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastctl/hastctl.c
240
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastctl/hastctl.c
483
cfg = yy_config_parse(cfgpath, true);
sbin/hastctl/hastctl.c
484
PJDLOG_ASSERT(cfg != NULL);
sbin/hastctl/hastctl.c
52
static struct hastd_config *cfg;
sbin/hastctl/hastctl.c
532
if (proto_client(NULL, cfg->hc_controladdr, &controlconn) == -1) {
sbin/hastctl/hastctl.c
535
cfg->hc_controladdr);
sbin/hastctl/hastctl.c
540
cfg->hc_controladdr);
sbin/hastctl/hastctl.c
550
cfg->hc_controladdr);
sbin/hastctl/hastctl.c
557
cfg->hc_controladdr);
sbin/hastd/control.c
236
control_status(struct hastd_config *cfg, struct nv *nvout,
sbin/hastd/control.c
240
PJDLOG_ASSERT(cfg != NULL);
sbin/hastd/control.c
248
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastd/control.c
304
control_handle(struct hastd_config *cfg)
sbin/hastd/control.c
313
if (proto_accept(cfg->hc_controlconn, &conn) == -1) {
sbin/hastd/control.c
318
cfg->hc_controlin = conn;
sbin/hastd/control.c
369
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastd/control.c
372
control_set_role_common(cfg, nvout, role, res,
sbin/hastd/control.c
376
control_status(cfg, nvout, res, res->hr_name,
sbin/hastd/control.c
395
control_set_role_common(cfg, nvout, role, NULL,
sbin/hastd/control.c
399
control_status(cfg, nvout, NULL, str, ii);
sbin/hastd/control.c
423
cfg->hc_controlin = NULL;
sbin/hastd/control.c
72
control_set_role_common(struct hastd_config *cfg, struct nv *nvout,
sbin/hastd/control.c
82
PJDLOG_ASSERT(cfg != NULL);
sbin/hastd/control.c
85
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastd/control.h
44
void control_handle(struct hastd_config *cfg);
sbin/hastd/hastd.c
1049
proto_close(cfg->hc_controlconn);
sbin/hastd/hastd.c
106
TAILQ_FOREACH_SAFE(tres, &cfg->hc_resources, hr_next, tmres) {
sbin/hastd/hastd.c
1083
maxfd = fd = proto_descriptor(cfg->hc_controlconn);
sbin/hastd/hastd.c
1086
TAILQ_FOREACH(lst, &cfg->hc_listen, hl_next) {
sbin/hastd/hastd.c
1094
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastd/hastd.c
1139
if (FD_ISSET(proto_descriptor(cfg->hc_controlconn), &rfds))
sbin/hastd/hastd.c
1140
control_handle(cfg);
sbin/hastd/hastd.c
1141
TAILQ_FOREACH(lst, &cfg->hc_listen, hl_next) {
sbin/hastd/hastd.c
1147
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastd/hastd.c
123
TAILQ_REMOVE(&cfg->hc_resources, tres, hr_next);
sbin/hastd/hastd.c
1241
cfg = yy_config_parse(cfgpath, true);
sbin/hastd/hastd.c
1242
PJDLOG_ASSERT(cfg != NULL);
sbin/hastd/hastd.c
1245
if (strlcpy(cfg->hc_pidfile, pidfile,
sbin/hastd/hastd.c
1246
sizeof(cfg->hc_pidfile)) >= sizeof(cfg->hc_pidfile)) {
sbin/hastd/hastd.c
1252
pfh = pidfile_open(cfg->hc_pidfile, 0600, &otherpid);
sbin/hastd/hastd.c
1257
cfg->hc_pidfile, (intmax_t)otherpid);
sbin/hastd/hastd.c
126
if (cfg->hc_controlin != NULL)
sbin/hastd/hastd.c
1265
cfg->hc_pidfile);
sbin/hastd/hastd.c
127
proto_close(cfg->hc_controlin);
sbin/hastd/hastd.c
128
proto_close(cfg->hc_controlconn);
sbin/hastd/hastd.c
129
while ((lst = TAILQ_FIRST(&cfg->hc_listen)) != NULL) {
sbin/hastd/hastd.c
1290
if (proto_server(cfg->hc_controladdr, &cfg->hc_controlconn) == -1) {
sbin/hastd/hastd.c
1293
cfg->hc_controladdr);
sbin/hastd/hastd.c
1296
TAILQ_FOREACH(lst, &cfg->hc_listen, hl_next) {
sbin/hastd/hastd.c
130
TAILQ_REMOVE(&cfg->hc_listen, lst, hl_next);
sbin/hastd/hastd.c
1318
cfg->hc_pidfile);
sbin/hastd/hastd.c
1320
pjdlog_debug(1, "PID stored in %s.", cfg->hc_pidfile);
sbin/hastd/hastd.c
1328
cfg->hc_controladdr);
sbin/hastd/hastd.c
1329
TAILQ_FOREACH(lst, &cfg->hc_listen, hl_next)
sbin/hastd/hastd.c
331
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastd/hastd.c
502
if (strcmp(cfg->hc_controladdr, newcfg->hc_controladdr) != 0) {
sbin/hastd/hastd.c
516
TAILQ_FOREACH(clst, &cfg->hc_listen, hl_next) {
sbin/hastd/hastd.c
542
strcmp(cfg->hc_pidfile, newcfg->hc_pidfile) != 0) {
sbin/hastd/hastd.c
572
cfg->hc_controladdr, newcfg->hc_controladdr);
sbin/hastd/hastd.c
573
proto_close(cfg->hc_controlconn);
sbin/hastd/hastd.c
574
cfg->hc_controlconn = newcfg->hc_controlconn;
sbin/hastd/hastd.c
576
strlcpy(cfg->hc_controladdr, newcfg->hc_controladdr,
sbin/hastd/hastd.c
577
sizeof(cfg->hc_controladdr));
sbin/hastd/hastd.c
583
pjdlog_info("Pidfile changed from %s to %s.", cfg->hc_pidfile,
sbin/hastd/hastd.c
587
(void)strlcpy(cfg->hc_pidfile, newcfg->hc_pidfile,
sbin/hastd/hastd.c
588
sizeof(cfg->hc_pidfile));
sbin/hastd/hastd.c
593
while ((clst = TAILQ_FIRST(&cfg->hc_listen)) != NULL) {
sbin/hastd/hastd.c
603
TAILQ_REMOVE(&cfg->hc_listen, clst, hl_next);
sbin/hastd/hastd.c
606
TAILQ_CONCAT(&cfg->hc_listen, &newcfg->hc_listen, hl_next);
sbin/hastd/hastd.c
611
TAILQ_FOREACH_SAFE(cres, &cfg->hc_resources, hr_next, tres) {
sbin/hastd/hastd.c
618
TAILQ_REMOVE(&cfg->hc_resources, cres, hr_next);
sbin/hastd/hastd.c
627
TAILQ_FOREACH(cres, &cfg->hc_resources, hr_next) {
sbin/hastd/hastd.c
633
TAILQ_INSERT_TAIL(&cfg->hc_resources, nres, hr_next);
sbin/hastd/hastd.c
65
static struct hastd_config *cfg;
sbin/hastd/hastd.c
660
TAILQ_FOREACH(cres, &cfg->hc_resources, hr_next) {
sbin/hastd/hastd.c
670
TAILQ_REMOVE(&cfg->hc_resources, cres, hr_next);
sbin/hastd/hastd.c
673
TAILQ_INSERT_TAIL(&cfg->hc_resources, nres, hr_next);
sbin/hastd/hastd.c
703
TAILQ_FOREACH(clst, &cfg->hc_listen, hl_next) {
sbin/hastd/hastd.c
728
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastd/hastd.c
777
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/hastd/hastd.c
824
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
sbin/ifconfig/ifvxlan.c
104
bzero(&cfg, sizeof(cfg));
sbin/ifconfig/ifvxlan.c
106
if (do_cmd(ctx, VXLAN_CMD_GET_CONFIG, &cfg, sizeof(cfg), 0) < 0)
sbin/ifconfig/ifvxlan.c
109
vni = cfg.vxlc_vni;
sbin/ifconfig/ifvxlan.c
110
lsa = &cfg.vxlc_local_sa.sa;
sbin/ifconfig/ifvxlan.c
111
rsa = &cfg.vxlc_remote_sa.sa;
sbin/ifconfig/ifvxlan.c
142
cfg.vxlc_learn ? "" : "no", cfg.vxlc_port_min,
sbin/ifconfig/ifvxlan.c
143
cfg.vxlc_port_max, cfg.vxlc_ttl);
sbin/ifconfig/ifvxlan.c
146
cfg.vxlc_ftable_cnt, cfg.vxlc_ftable_max,
sbin/ifconfig/ifvxlan.c
147
cfg.vxlc_ftable_timeout);
sbin/ifconfig/ifvxlan.c
88
struct ifvxlancfg cfg;
sbin/ifconfig/ifvxlan.c
90
bzero(&cfg, sizeof(cfg));
sbin/ifconfig/ifvxlan.c
92
return (do_cmd(ctx, VXLAN_CMD_GET_CONFIG, &cfg, sizeof(cfg), 0) != -1);
sbin/ifconfig/ifvxlan.c
98
struct ifvxlancfg cfg;
sbin/ipfw/ipfw2.c
2693
ipfw_cfg_lheader *cfg;
sbin/ipfw/ipfw2.c
2696
if (ipfw_get_config(&g_co, &fo, &cfg, &size) != 0)
sbin/ipfw/ipfw2.c
2700
if ((cfg->set_mask & (1<<i)) == 0) {
sbin/ipfw/ipfw2.c
2704
msg = (cfg->set_mask != (uint32_t)-1) ? " enable" : "enable";
sbin/ipfw/ipfw2.c
2706
if ((cfg->set_mask & (1<<i)) != 0) {
sbin/ipfw/ipfw2.c
2711
free(cfg);
sbin/ipfw/ipfw2.c
3010
ipfw_cfg_lheader *cfg;
sbin/ipfw/ipfw2.c
3047
cfg = NULL;
sbin/ipfw/ipfw2.c
3056
if (ipfw_get_config(&g_co, &sfo, &cfg, &sz) != 0)
sbin/ipfw/ipfw2.c
3059
error = ipfw_show_config(&g_co, &sfo, cfg, sz, ac, av);
sbin/ipfw/ipfw2.c
3061
free(cfg);
sbin/ipfw/ipfw2.c
3069
ipfw_cfg_lheader *cfg, size_t sz, int ac, char *av[])
sbin/ipfw/ipfw2.c
3089
readsz = sizeof(*cfg);
sbin/ipfw/ipfw2.c
3092
fo->set_mask = cfg->set_mask;
sbin/ipfw/ipfw2.c
3094
ctlv = (ipfw_obj_ctlv *)(cfg + 1);
sbin/ipfw/ipfw2.c
3102
if (cfg->flags & IPFW_CFG_GET_STATIC) {
sbin/ipfw/ipfw2.c
3113
if ((cfg->flags & IPFW_CFG_GET_STATES) && (readsz != sz)) {
sbin/ipfw/ipfw2.c
3130
if (cfg->flags & IPFW_CFG_GET_STATIC)
sbin/ipfw/ipfw2.c
3155
if ((cfg->flags & IPFW_CFG_GET_STATIC) == 0)
sbin/ipfw/ipfw2.c
3201
ipfw_cfg_lheader *cfg;
sbin/ipfw/ipfw2.c
3213
cfg = NULL;
sbin/ipfw/ipfw2.c
3216
if (cfg != NULL)
sbin/ipfw/ipfw2.c
3217
free(cfg);
sbin/ipfw/ipfw2.c
3218
if ((cfg = calloc(1, sz)) == NULL)
sbin/ipfw/ipfw2.c
3221
cfg->flags = fo->flags;
sbin/ipfw/ipfw2.c
3222
cfg->start_rule = fo->first;
sbin/ipfw/ipfw2.c
3223
cfg->end_rule = fo->last;
sbin/ipfw/ipfw2.c
3225
if (do_get3(IP_FW_XGET, &cfg->opheader, &sz) != 0) {
sbin/ipfw/ipfw2.c
3227
free(cfg);
sbin/ipfw/ipfw2.c
3233
if (sz < cfg->size)
sbin/ipfw/ipfw2.c
3234
sz = cfg->size;
sbin/ipfw/ipfw2.c
3238
*pcfg = cfg;
sbin/ipfw/ipfw2.c
3243
free(cfg);
sbin/ipfw/ipfw2.c
447
ipfw_cfg_lheader *cfg, size_t sz, int ac, char **av);
sbin/ipfw/nat.c
1024
nat_show_data(struct nat44_cfg_nat *cfg, void *arg)
sbin/ipfw/nat.c
1033
if (nat_get_cmd(cfg->name, nla->cmd, &oh) != 0) {
sbin/ipfw/nat.c
1034
warnx("Error getting nat instance %s info", cfg->name);
sbin/ipfw/nat.c
1041
if (nat_get_cmd(cfg->name, nla->cmd, &oh) == 0) {
sbin/ipfw/nat.c
1049
warn("Error getting nat instance %s info", cfg->name);
sbin/ipfw/nat.c
1080
struct nat44_cfg_nat *cfg;
sbin/ipfw/nat.c
1103
cfg = (struct nat44_cfg_nat*)(olh + 1);
sbin/ipfw/nat.c
1105
(void)f(cfg, arg); /* Ignore errors for now */
sbin/ipfw/nat.c
1106
cfg = (struct nat44_cfg_nat *)((caddr_t)cfg +
sbin/ipfw/nat.c
1121
struct nat44_cfg_nat *cfg;
sbin/ipfw/nat.c
1125
sz = sizeof(*oh) + sizeof(*cfg) + 128;
sbin/ipfw/nat.c
1130
cfg = (struct nat44_cfg_nat *)(oh + 1);
sbin/ipfw/nat.c
1133
strlcpy(cfg->name, name, sizeof(cfg->name));
sbin/ipfw/nat.c
1136
sz = cfg->size;
sbin/ipfw/nat.c
46
typedef int (nat_cb_t)(struct nat44_cfg_nat *cfg, void *arg);
sbin/ipfw/nat.c
49
static int nat_show_data(struct nat44_cfg_nat *cfg, void *arg);
sbin/ipfw/nat64clat.c
180
ipfw_nat64clat_cfg *cfg;
sbin/ipfw/nat64clat.c
189
cfg = (ipfw_nat64clat_cfg *)(olh + 1);
sbin/ipfw/nat64clat.c
192
inet_pton(AF_INET6, "64:ff9b::", &cfg->plat_prefix);
sbin/ipfw/nat64clat.c
193
cfg->plat_plen = 96;
sbin/ipfw/nat64clat.c
194
cfg->set = set;
sbin/ipfw/nat64clat.c
220
cfg->plat_prefix = prefix;
sbin/ipfw/nat64clat.c
221
cfg->plat_plen = plen;
sbin/ipfw/nat64clat.c
224
cfg->clat_prefix = prefix;
sbin/ipfw/nat64clat.c
225
cfg->clat_plen = plen;
sbin/ipfw/nat64clat.c
230
cfg->flags |= NAT64_LOG;
sbin/ipfw/nat64clat.c
233
cfg->flags &= ~NAT64_LOG;
sbin/ipfw/nat64clat.c
236
cfg->flags |= NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64clat.c
239
cfg->flags &= ~NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64clat.c
251
olh->objsize = sizeof(*cfg);
sbin/ipfw/nat64clat.c
253
strlcpy(cfg->name, name, sizeof(cfg->name));
sbin/ipfw/nat64clat.c
267
ipfw_nat64clat_cfg *cfg;
sbin/ipfw/nat64clat.c
280
cfg = (ipfw_nat64clat_cfg *)(oh + 1);
sbin/ipfw/nat64clat.c
314
cfg->plat_prefix = prefix;
sbin/ipfw/nat64clat.c
315
cfg->plat_plen = plen;
sbin/ipfw/nat64clat.c
317
cfg->clat_prefix = prefix;
sbin/ipfw/nat64clat.c
318
cfg->clat_plen = plen;
sbin/ipfw/nat64clat.c
323
cfg->flags |= NAT64_LOG;
sbin/ipfw/nat64clat.c
326
cfg->flags &= ~NAT64_LOG;
sbin/ipfw/nat64clat.c
329
cfg->flags |= NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64clat.c
332
cfg->flags &= ~NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64clat.c
434
nat64clat_show_cb(ipfw_nat64clat_cfg *cfg, const char *name, uint8_t set)
sbin/ipfw/nat64clat.c
438
if (name != NULL && strcmp(cfg->name, name) != 0)
sbin/ipfw/nat64clat.c
441
if (g_co.use_set != 0 && cfg->set != set)
sbin/ipfw/nat64clat.c
444
if (g_co.use_set != 0 || cfg->set != 0)
sbin/ipfw/nat64clat.c
445
printf("set %u ", cfg->set);
sbin/ipfw/nat64clat.c
447
inet_ntop(AF_INET6, &cfg->clat_prefix, clat_buf, sizeof(clat_buf));
sbin/ipfw/nat64clat.c
448
inet_ntop(AF_INET6, &cfg->plat_prefix, plat_buf, sizeof(plat_buf));
sbin/ipfw/nat64clat.c
450
cfg->name, clat_buf, cfg->clat_plen, plat_buf, cfg->plat_plen);
sbin/ipfw/nat64clat.c
451
if (cfg->flags & NAT64_LOG)
sbin/ipfw/nat64clat.c
453
if (cfg->flags & NAT64_ALLOW_PRIVATE)
sbin/ipfw/nat64clat.c
460
nat64clat_destroy_cb(ipfw_nat64clat_cfg *cfg, const char *name __unused,
sbin/ipfw/nat64clat.c
464
if (g_co.use_set != 0 && cfg->set != set)
sbin/ipfw/nat64clat.c
467
nat64clat_destroy(cfg->name, cfg->set);
sbin/ipfw/nat64clat.c
502
ipfw_nat64clat_cfg *cfg;
sbin/ipfw/nat64clat.c
507
sz = sizeof(*olh) + 16 * sizeof(*cfg);
sbin/ipfw/nat64clat.c
525
cfg = (ipfw_nat64clat_cfg *)(olh + 1);
sbin/ipfw/nat64clat.c
527
(void)f(cfg, name, set); /* Ignore errors for now */
sbin/ipfw/nat64clat.c
528
cfg = (ipfw_nat64clat_cfg *)((caddr_t)cfg +
sbin/ipfw/nat64clat.c
61
static int nat64clat_show_cb(ipfw_nat64clat_cfg *cfg, const char *name,
sbin/ipfw/nat64clat.c
63
static int nat64clat_destroy_cb(ipfw_nat64clat_cfg *cfg, const char *name,
sbin/ipfw/nat64lsn.c
159
nat64lsn_states_cb(ipfw_nat64lsn_cfg *cfg, const char *name, uint8_t set)
sbin/ipfw/nat64lsn.c
167
if (name != NULL && strcmp(cfg->name, name) != 0)
sbin/ipfw/nat64lsn.c
170
if (set != 0 && cfg->set != set)
sbin/ipfw/nat64lsn.c
181
nat64lsn_fill_ntlv(&oh->ntlv, cfg->name, set);
sbin/ipfw/nat64lsn.c
402
ipfw_nat64lsn_cfg *cfg;
sbin/ipfw/nat64lsn.c
409
cfg = (ipfw_nat64lsn_cfg *)(olh + 1);
sbin/ipfw/nat64lsn.c
412
inet_pton(AF_INET6, "64:ff9b::", &cfg->prefix6);
sbin/ipfw/nat64lsn.c
413
cfg->plen6 = 96;
sbin/ipfw/nat64lsn.c
414
cfg->set = set;
sbin/ipfw/nat64lsn.c
415
cfg->max_ports = NAT64LSN_MAX_PORTS;
sbin/ipfw/nat64lsn.c
416
cfg->jmaxlen = NAT64LSN_JMAXLEN;
sbin/ipfw/nat64lsn.c
417
cfg->nh_delete_delay = NAT64LSN_HOST_AGE;
sbin/ipfw/nat64lsn.c
418
cfg->pg_delete_delay = NAT64LSN_PG_AGE;
sbin/ipfw/nat64lsn.c
419
cfg->st_syn_ttl = NAT64LSN_TCP_SYN_AGE;
sbin/ipfw/nat64lsn.c
420
cfg->st_estab_ttl = NAT64LSN_TCP_EST_AGE;
sbin/ipfw/nat64lsn.c
421
cfg->st_close_ttl = NAT64LSN_TCP_FIN_AGE;
sbin/ipfw/nat64lsn.c
422
cfg->st_udp_ttl = NAT64LSN_UDP_AGE;
sbin/ipfw/nat64lsn.c
423
cfg->st_icmp_ttl = NAT64LSN_ICMP_AGE;
sbin/ipfw/nat64lsn.c
433
nat64lsn_parse_prefix(*av, AF_INET, &cfg->prefix4,
sbin/ipfw/nat64lsn.c
434
&cfg->plen4);
sbin/ipfw/nat64lsn.c
440
nat64lsn_parse_prefix(*av, AF_INET6, &cfg->prefix6,
sbin/ipfw/nat64lsn.c
441
&cfg->plen6);
sbin/ipfw/nat64lsn.c
442
if (ipfw_check_nat64prefix(&cfg->prefix6,
sbin/ipfw/nat64lsn.c
443
cfg->plen6) != 0 &&
sbin/ipfw/nat64lsn.c
444
!IN6_IS_ADDR_UNSPECIFIED(&cfg->prefix6))
sbin/ipfw/nat64lsn.c
451
cfg->jmaxlen = nat64lsn_parse_int(*av, opt);
sbin/ipfw/nat64lsn.c
456
cfg->max_ports = nat64lsn_parse_int(*av, opt);
sbin/ipfw/nat64lsn.c
461
cfg->nh_delete_delay = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
467
cfg->pg_delete_delay = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
473
cfg->st_syn_ttl = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
479
cfg->st_close_ttl = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
485
cfg->st_estab_ttl = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
491
cfg->st_udp_ttl = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
497
cfg->st_icmp_ttl = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
503
cfg->states_chunks = (uint8_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
508
cfg->flags |= NAT64_LOG;
sbin/ipfw/nat64lsn.c
511
cfg->flags &= ~NAT64_LOG;
sbin/ipfw/nat64lsn.c
514
cfg->flags |= NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64lsn.c
517
cfg->flags &= ~NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64lsn.c
520
cfg->flags |= NAT64LSN_ALLOW_SWAPCONF;
sbin/ipfw/nat64lsn.c
523
cfg->flags &= ~NAT64LSN_ALLOW_SWAPCONF;
sbin/ipfw/nat64lsn.c
53
typedef int (nat64lsn_cb_t)(ipfw_nat64lsn_cfg *cfg, const char *name,
sbin/ipfw/nat64lsn.c
533
olh->objsize = sizeof(*cfg);
sbin/ipfw/nat64lsn.c
535
strlcpy(cfg->name, name, sizeof(cfg->name));
sbin/ipfw/nat64lsn.c
549
ipfw_nat64lsn_cfg *cfg;
sbin/ipfw/nat64lsn.c
559
cfg = (ipfw_nat64lsn_cfg *)(oh + 1);
sbin/ipfw/nat64lsn.c
574
cfg->max_ports = nat64lsn_parse_int(*av, opt);
sbin/ipfw/nat64lsn.c
579
cfg->jmaxlen = nat64lsn_parse_int(*av, opt);
sbin/ipfw/nat64lsn.c
584
cfg->nh_delete_delay = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
590
cfg->pg_delete_delay = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
596
cfg->st_syn_ttl = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
602
cfg->st_close_ttl = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
608
cfg->st_estab_ttl = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
614
cfg->st_udp_ttl = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
620
cfg->st_icmp_ttl = (uint16_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
626
cfg->states_chunks = (uint8_t)nat64lsn_parse_int(
sbin/ipfw/nat64lsn.c
63
static int nat64lsn_show_cb(ipfw_nat64lsn_cfg *cfg, const char *name,
sbin/ipfw/nat64lsn.c
631
cfg->flags |= NAT64_LOG;
sbin/ipfw/nat64lsn.c
634
cfg->flags &= ~NAT64_LOG;
sbin/ipfw/nat64lsn.c
637
cfg->flags |= NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64lsn.c
640
cfg->flags &= ~NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64lsn.c
643
cfg->flags |= NAT64LSN_ALLOW_SWAPCONF;
sbin/ipfw/nat64lsn.c
646
cfg->flags &= ~NAT64LSN_ALLOW_SWAPCONF;
sbin/ipfw/nat64lsn.c
65
static int nat64lsn_destroy_cb(ipfw_nat64lsn_cfg *cfg, const char *name,
sbin/ipfw/nat64lsn.c
67
static int nat64lsn_states_cb(ipfw_nat64lsn_cfg *cfg, const char *name,
sbin/ipfw/nat64lsn.c
779
nat64lsn_show_cb(ipfw_nat64lsn_cfg *cfg, const char *name, uint8_t set)
sbin/ipfw/nat64lsn.c
783
if (name != NULL && strcmp(cfg->name, name) != 0)
sbin/ipfw/nat64lsn.c
786
if (g_co.use_set != 0 && cfg->set != set)
sbin/ipfw/nat64lsn.c
789
if (g_co.use_set != 0 || cfg->set != 0)
sbin/ipfw/nat64lsn.c
790
printf("set %u ", cfg->set);
sbin/ipfw/nat64lsn.c
791
inet_ntop(AF_INET, &cfg->prefix4, abuf, sizeof(abuf));
sbin/ipfw/nat64lsn.c
792
printf("nat64lsn %s prefix4 %s/%u", cfg->name, abuf, cfg->plen4);
sbin/ipfw/nat64lsn.c
793
inet_ntop(AF_INET6, &cfg->prefix6, abuf, sizeof(abuf));
sbin/ipfw/nat64lsn.c
794
printf(" prefix6 %s/%u", abuf, cfg->plen6);
sbin/ipfw/nat64lsn.c
795
if (g_co.verbose || cfg->states_chunks > 1)
sbin/ipfw/nat64lsn.c
796
printf(" states_chunks %u", cfg->states_chunks);
sbin/ipfw/nat64lsn.c
797
if (g_co.verbose || cfg->nh_delete_delay != NAT64LSN_HOST_AGE)
sbin/ipfw/nat64lsn.c
798
printf(" host_del_age %u", cfg->nh_delete_delay);
sbin/ipfw/nat64lsn.c
799
if (g_co.verbose || cfg->pg_delete_delay != NAT64LSN_PG_AGE)
sbin/ipfw/nat64lsn.c
800
printf(" pg_del_age %u", cfg->pg_delete_delay);
sbin/ipfw/nat64lsn.c
801
if (g_co.verbose || cfg->st_syn_ttl != NAT64LSN_TCP_SYN_AGE)
sbin/ipfw/nat64lsn.c
802
printf(" tcp_syn_age %u", cfg->st_syn_ttl);
sbin/ipfw/nat64lsn.c
803
if (g_co.verbose || cfg->st_close_ttl != NAT64LSN_TCP_FIN_AGE)
sbin/ipfw/nat64lsn.c
804
printf(" tcp_close_age %u", cfg->st_close_ttl);
sbin/ipfw/nat64lsn.c
805
if (g_co.verbose || cfg->st_estab_ttl != NAT64LSN_TCP_EST_AGE)
sbin/ipfw/nat64lsn.c
806
printf(" tcp_est_age %u", cfg->st_estab_ttl);
sbin/ipfw/nat64lsn.c
807
if (g_co.verbose || cfg->st_udp_ttl != NAT64LSN_UDP_AGE)
sbin/ipfw/nat64lsn.c
808
printf(" udp_age %u", cfg->st_udp_ttl);
sbin/ipfw/nat64lsn.c
809
if (g_co.verbose || cfg->st_icmp_ttl != NAT64LSN_ICMP_AGE)
sbin/ipfw/nat64lsn.c
810
printf(" icmp_age %u", cfg->st_icmp_ttl);
sbin/ipfw/nat64lsn.c
811
if (g_co.verbose || cfg->jmaxlen != NAT64LSN_JMAXLEN)
sbin/ipfw/nat64lsn.c
812
printf(" jmaxlen %u", cfg->jmaxlen);
sbin/ipfw/nat64lsn.c
813
if (cfg->flags & NAT64LSN_ALLOW_SWAPCONF)
sbin/ipfw/nat64lsn.c
815
if (cfg->flags & NAT64_LOG)
sbin/ipfw/nat64lsn.c
817
if (cfg->flags & NAT64_ALLOW_PRIVATE)
sbin/ipfw/nat64lsn.c
824
nat64lsn_destroy_cb(ipfw_nat64lsn_cfg *cfg, const char *name __unused,
sbin/ipfw/nat64lsn.c
828
if (g_co.use_set != 0 && cfg->set != set)
sbin/ipfw/nat64lsn.c
831
nat64lsn_destroy(cfg->name, cfg->set);
sbin/ipfw/nat64lsn.c
866
ipfw_nat64lsn_cfg *cfg;
sbin/ipfw/nat64lsn.c
890
cfg = (ipfw_nat64lsn_cfg *)(olh + 1);
sbin/ipfw/nat64lsn.c
892
(void)f(cfg, name, set); /* Ignore errors for now */
sbin/ipfw/nat64lsn.c
893
cfg = (ipfw_nat64lsn_cfg *)((caddr_t)cfg +
sbin/ipfw/nat64stl.c
214
ipfw_nat64stl_cfg *cfg;
sbin/ipfw/nat64stl.c
221
cfg = (ipfw_nat64stl_cfg *)(olh + 1);
sbin/ipfw/nat64stl.c
224
inet_pton(AF_INET6, "64:ff9b::", &cfg->prefix6);
sbin/ipfw/nat64stl.c
225
cfg->plen6 = 96;
sbin/ipfw/nat64stl.c
226
cfg->set = set;
sbin/ipfw/nat64stl.c
235
table_fill_ntlv(&cfg->ntlv4, *av, set, 4);
sbin/ipfw/nat64stl.c
241
table_fill_ntlv(&cfg->ntlv6, *av, set, 6);
sbin/ipfw/nat64stl.c
252
if (inet_pton(AF_INET6, *av, &cfg->prefix6) != 1)
sbin/ipfw/nat64stl.c
255
cfg->plen6 = strtol(p, NULL, 10);
sbin/ipfw/nat64stl.c
256
if (ipfw_check_nat64prefix(&cfg->prefix6,
sbin/ipfw/nat64stl.c
257
cfg->plen6) != 0)
sbin/ipfw/nat64stl.c
264
cfg->flags |= NAT64_LOG;
sbin/ipfw/nat64stl.c
267
cfg->flags &= ~NAT64_LOG;
sbin/ipfw/nat64stl.c
270
cfg->flags |= NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64stl.c
273
cfg->flags &= ~NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64stl.c
287
olh->objsize = sizeof(*cfg);
sbin/ipfw/nat64stl.c
289
strlcpy(cfg->name, name, sizeof(cfg->name));
sbin/ipfw/nat64stl.c
303
ipfw_nat64stl_cfg *cfg;
sbin/ipfw/nat64stl.c
313
cfg = (ipfw_nat64stl_cfg *)(oh + 1);
sbin/ipfw/nat64stl.c
329
table_fill_ntlv(&cfg->ntlv4, *av, set, 4);
sbin/ipfw/nat64stl.c
334
table_fill_ntlv(&cfg->ntlv6, *av, set, 6);
sbin/ipfw/nat64stl.c
339
cfg->flags |= NAT64_LOG;
sbin/ipfw/nat64stl.c
342
cfg->flags &= ~NAT64_LOG;
sbin/ipfw/nat64stl.c
345
cfg->flags |= NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64stl.c
348
cfg->flags &= ~NAT64_ALLOW_PRIVATE;
sbin/ipfw/nat64stl.c
450
nat64stl_show_cb(ipfw_nat64stl_cfg *cfg, const char *name, uint8_t set)
sbin/ipfw/nat64stl.c
454
if (name != NULL && strcmp(cfg->name, name) != 0)
sbin/ipfw/nat64stl.c
457
if (g_co.use_set != 0 && cfg->set != set)
sbin/ipfw/nat64stl.c
460
if (g_co.use_set != 0 || cfg->set != 0)
sbin/ipfw/nat64stl.c
461
printf("set %u ", cfg->set);
sbin/ipfw/nat64stl.c
464
cfg->name, cfg->ntlv4.name, cfg->ntlv6.name);
sbin/ipfw/nat64stl.c
465
inet_ntop(AF_INET6, &cfg->prefix6, abuf, sizeof(abuf));
sbin/ipfw/nat64stl.c
466
printf(" prefix6 %s/%u", abuf, cfg->plen6);
sbin/ipfw/nat64stl.c
467
if (cfg->flags & NAT64_LOG)
sbin/ipfw/nat64stl.c
469
if (cfg->flags & NAT64_ALLOW_PRIVATE)
sbin/ipfw/nat64stl.c
476
nat64stl_destroy_cb(ipfw_nat64stl_cfg *cfg, const char *name __unused,
sbin/ipfw/nat64stl.c
480
if (g_co.use_set != 0 && cfg->set != set)
sbin/ipfw/nat64stl.c
483
nat64stl_destroy(cfg->name, cfg->set);
sbin/ipfw/nat64stl.c
518
ipfw_nat64stl_cfg *cfg;
sbin/ipfw/nat64stl.c
523
sz = sizeof(*olh) + 16 * sizeof(*cfg);
sbin/ipfw/nat64stl.c
541
cfg = (ipfw_nat64stl_cfg *)(olh + 1);
sbin/ipfw/nat64stl.c
543
(void)f(cfg, name, set); /* Ignore errors for now */
sbin/ipfw/nat64stl.c
544
cfg = (ipfw_nat64stl_cfg *)((caddr_t)cfg +
sbin/ipfw/nat64stl.c
60
static int nat64stl_show_cb(ipfw_nat64stl_cfg *cfg, const char *name,
sbin/ipfw/nat64stl.c
62
static int nat64stl_destroy_cb(ipfw_nat64stl_cfg *cfg, const char *name,
sbin/ipfw/nptv6.c
194
ipfw_nptv6_cfg *cfg;
sbin/ipfw/nptv6.c
202
cfg = (ipfw_nptv6_cfg *)(olh + 1);
sbin/ipfw/nptv6.c
203
cfg->set = set;
sbin/ipfw/nptv6.c
212
nptv6_parse_prefix(*av, &cfg->internal, &iplen);
sbin/ipfw/nptv6.c
221
nptv6_parse_prefix(*av, &cfg->external, &eplen);
sbin/ipfw/nptv6.c
230
if (strlen(*av) >= sizeof(cfg->if_name))
sbin/ipfw/nptv6.c
233
cfg->flags |= NPTV6_DYNAMIC_PREFIX;
sbin/ipfw/nptv6.c
234
strncpy(cfg->if_name, *av, sizeof(cfg->if_name));
sbin/ipfw/nptv6.c
252
cfg->plen = pplen;
sbin/ipfw/nptv6.c
258
cfg->plen = eplen ? eplen : iplen;
sbin/ipfw/nptv6.c
270
n2mask(&mask, cfg->plen);
sbin/ipfw/nptv6.c
271
APPLY_MASK(&cfg->internal, &mask);
sbin/ipfw/nptv6.c
272
if ((cfg->flags & NPTV6_DYNAMIC_PREFIX) == 0)
sbin/ipfw/nptv6.c
273
APPLY_MASK(&cfg->external, &mask);
sbin/ipfw/nptv6.c
276
olh->objsize = sizeof(*cfg);
sbin/ipfw/nptv6.c
278
strlcpy(cfg->name, name, sizeof(cfg->name));
sbin/ipfw/nptv6.c
358
nptv6_show_cb(ipfw_nptv6_cfg *cfg, const char *name, uint8_t set)
sbin/ipfw/nptv6.c
362
if (name != NULL && strcmp(cfg->name, name) != 0)
sbin/ipfw/nptv6.c
365
if (g_co.use_set != 0 && cfg->set != set)
sbin/ipfw/nptv6.c
368
if (g_co.use_set != 0 || cfg->set != 0)
sbin/ipfw/nptv6.c
369
printf("set %u ", cfg->set);
sbin/ipfw/nptv6.c
370
inet_ntop(AF_INET6, &cfg->internal, abuf, sizeof(abuf));
sbin/ipfw/nptv6.c
371
printf("nptv6 %s int_prefix %s ", cfg->name, abuf);
sbin/ipfw/nptv6.c
372
if (cfg->flags & NPTV6_DYNAMIC_PREFIX)
sbin/ipfw/nptv6.c
373
printf("ext_if %s ", cfg->if_name);
sbin/ipfw/nptv6.c
375
inet_ntop(AF_INET6, &cfg->external, abuf, sizeof(abuf));
sbin/ipfw/nptv6.c
378
printf("prefixlen %u\n", cfg->plen);
sbin/ipfw/nptv6.c
383
nptv6_destroy_cb(ipfw_nptv6_cfg *cfg, const char *name __unused, uint8_t set)
sbin/ipfw/nptv6.c
386
if (g_co.use_set != 0 && cfg->set != set)
sbin/ipfw/nptv6.c
389
nptv6_destroy(cfg->name, cfg->set);
sbin/ipfw/nptv6.c
422
ipfw_nptv6_cfg *cfg;
sbin/ipfw/nptv6.c
427
sz = sizeof(*olh) + 16 * sizeof(*cfg);
sbin/ipfw/nptv6.c
444
cfg = (ipfw_nptv6_cfg *)(olh + 1);
sbin/ipfw/nptv6.c
446
(void)f(cfg, name, set);
sbin/ipfw/nptv6.c
447
cfg = (ipfw_nptv6_cfg *)((caddr_t)cfg + olh->objsize);
sbin/ipfw/nptv6.c
59
static int nptv6_show_cb(ipfw_nptv6_cfg *cfg, const char *name, uint8_t set);
sbin/ipfw/nptv6.c
60
static int nptv6_destroy_cb(ipfw_nptv6_cfg *cfg, const char *name, uint8_t set);
sys/amd64/pt/pt.c
339
pt_configure_ranges(struct pt_ctx *ctx, struct pt_cpu_config *cfg)
sys/amd64/pt/pt.c
351
n = cfg->nranges;
sys/amd64/pt/pt.c
362
pt_ext->rtit_addr1_a = cfg->ip_ranges[1].start;
sys/amd64/pt/pt.c
363
pt_ext->rtit_addr1_b = cfg->ip_ranges[1].end;
sys/amd64/pt/pt.c
366
pt_ext->rtit_addr0_a = cfg->ip_ranges[0].start;
sys/amd64/pt/pt.c
367
pt_ext->rtit_addr0_b = cfg->ip_ranges[0].end;
sys/amd64/pt/pt.c
429
struct pt_cpu_config *cfg;
sys/amd64/pt/pt.c
436
cfg = (struct pt_cpu_config *)ctx->config;
sys/amd64/pt/pt.c
440
cfg->rtit_ctl &= PT_SUPPORTED_FLAGS;
sys/amd64/pt/pt.c
441
if (cfg->rtit_ctl & RTIT_CTL_MTCEN) {
sys/amd64/pt/pt.c
449
if (cfg->rtit_ctl & RTIT_CTL_CR3FILTER) {
sys/amd64/pt/pt.c
457
if (cfg->rtit_ctl & RTIT_CTL_DIS_TNT) {
sys/amd64/pt/pt.c
491
pt_ext->rtit_ctl |= cfg->rtit_ctl;
sys/amd64/pt/pt.c
492
if (cfg->nranges != 0) {
sys/amd64/pt/pt.c
494
if ((error = pt_configure_ranges(pt_ctx, cfg)) != 0)
sys/amd64/vmm/amd/amdvi_hw.c
174
struct ivhd_dev_cfg *cfg;
sys/amd64/vmm/amd/amdvi_hw.c
183
cfg = softc->dev_cfg;
sys/amd64/vmm/amd/amdvi_hw.c
187
if ((cfg->start_id <= devid) && (cfg->end_id >= devid)) {
sys/amd64/vmm/amd/amdvi_hw.c
188
ivhd_ats = cfg->enable_ats;
sys/amd64/vmm/amd/amdvi_hw.c
191
cfg++;
sys/amd64/vmm/amd/amdvi_hw.c
797
struct ivhd_dev_cfg *cfg;
sys/amd64/vmm/amd/amdvi_hw.c
800
cfg = softc->dev_cfg;
sys/amd64/vmm/amd/amdvi_hw.c
803
"config:%b%s\n", cfg->start_id, cfg->end_id,
sys/amd64/vmm/amd/amdvi_hw.c
804
cfg->data,
sys/amd64/vmm/amd/amdvi_hw.c
807
cfg->enable_ats ? "ATS enabled" : "");
sys/amd64/vmm/amd/amdvi_hw.c
808
cfg++;
sys/amd64/vmm/amd/ivrs_drv.c
181
uint32_t end_id, uint8_t cfg, bool ats)
sys/amd64/vmm/amd/ivrs_drv.c
200
dev_cfg->data = cfg;
sys/amd64/vmm/io/ppt.c
144
if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL)
sys/amd64/vmm/io/ppt.c
763
rid = dinfo->cfg.msix.msix_table_bar;
sys/amd64/vmm/io/ppt.c
774
if (dinfo->cfg.msix.msix_table_bar !=
sys/amd64/vmm/io/ppt.c
775
dinfo->cfg.msix.msix_pba_bar) {
sys/amd64/vmm/io/ppt.c
776
rid = dinfo->cfg.msix.msix_pba_bar;
sys/arm/allwinner/a10_codec.c
1076
sc->cfg = (void *)ofw_bus_search_compatible(dev, compat_data)->ocd_data;
sys/arm/allwinner/a10_codec.c
110
#define AC_DAC_FIFOS(_sc) ((_sc)->cfg->DAC_FIFOS)
sys/arm/allwinner/a10_codec.c
111
#define AC_DAC_TXDATA(_sc) ((_sc)->cfg->DAC_TXDATA)
sys/arm/allwinner/a10_codec.c
112
#define AC_ADC_FIFOC(_sc) ((_sc)->cfg->ADC_FIFOC)
sys/arm/allwinner/a10_codec.c
1153
if (mixer_init(dev, sc->cfg->mixer_class, sc)) {
sys/arm/allwinner/a10_codec.c
124
#define AC_ADC_FIFOS(_sc) ((_sc)->cfg->ADC_FIFOS)
sys/arm/allwinner/a10_codec.c
125
#define AC_ADC_RXDATA(_sc) ((_sc)->cfg->ADC_RXDATA)
sys/arm/allwinner/a10_codec.c
126
#define AC_DAC_CNT(_sc) ((_sc)->cfg->DAC_CNT)
sys/arm/allwinner/a10_codec.c
127
#define AC_ADC_CNT(_sc) ((_sc)->cfg->ADC_CNT)
sys/arm/allwinner/a10_codec.c
167
struct a10codec_config *cfg;
sys/arm/allwinner/a10_codec.c
666
conf.src_drqtype = sc->cfg->drqtype_sdram;
sys/arm/allwinner/a10_codec.c
667
conf.dst_drqtype = sc->cfg->drqtype_codec;
sys/arm/allwinner/a10_codec.c
670
conf.src_drqtype = sc->cfg->drqtype_codec;
sys/arm/allwinner/a10_codec.c
671
conf.dst_drqtype = sc->cfg->drqtype_sdram;
sys/arm/allwinner/a10_codec.c
737
sc->cfg->mute(sc, 0, ch->dir);
sys/arm/allwinner/a10_codec.c
763
sc->cfg->mute(sc, 0, ch->dir);
sys/arm/allwinner/a10_codec.c
794
sc->cfg->mute(sc, 1, ch->dir);
sys/arm/allwinner/a10_codec.c
84
#define AC_DAC_DPC(_sc) ((_sc)->cfg->DPC)
sys/arm/allwinner/a10_codec.c
86
#define AC_DAC_FIFOC(_sc) ((_sc)->cfg->DAC_FIFOC)
sys/arm/allwinner/a10_dmac.c
231
a10dmac_set_config(device_t dev, void *priv, const struct sunxi_dma_config *cfg)
sys/arm/allwinner/a10_dmac.c
238
switch (cfg->dst_width) {
sys/arm/allwinner/a10_dmac.c
251
switch (cfg->dst_burst_len) {
sys/arm/allwinner/a10_dmac.c
264
switch (cfg->src_width) {
sys/arm/allwinner/a10_dmac.c
277
switch (cfg->src_burst_len) {
sys/arm/allwinner/a10_dmac.c
293
(cfg->dst_drqtype << AWIN_DMA_CTL_DST_DRQ_TYPE_SHIFT) |
sys/arm/allwinner/a10_dmac.c
296
(cfg->src_drqtype << AWIN_DMA_CTL_SRC_DRQ_TYPE_SHIFT);
sys/arm/allwinner/a10_dmac.c
299
if (cfg->dst_noincr)
sys/arm/allwinner/a10_dmac.c
301
if (cfg->src_noincr)
sys/arm/allwinner/a10_dmac.c
306
dst_am = cfg->dst_noincr ? AWIN_DDMA_CTL_DMA_ADDR_IO :
sys/arm/allwinner/a10_dmac.c
308
src_am = cfg->src_noincr ? AWIN_DDMA_CTL_DMA_ADDR_IO :
sys/arm/allwinner/a10_dmac.c
316
dst_bs = cfg->dst_blksize - 1;
sys/arm/allwinner/a10_dmac.c
317
dst_wc = cfg->dst_wait_cyc - 1;
sys/arm/allwinner/a10_dmac.c
318
src_bs = cfg->src_blksize - 1;
sys/arm/allwinner/a10_dmac.c
319
src_wc = cfg->src_wait_cyc - 1;
sys/arm/allwinner/a10_dmac.c
375
uint32_t irqen, sta, cfg;
sys/arm/allwinner/a10_dmac.c
380
cfg = a10dmac_read_ctl(ch);
sys/arm/allwinner/a10_dmac.c
383
cfg &= ~AWIN_NDMA_CTL_DMA_LOADING;
sys/arm/allwinner/a10_dmac.c
386
cfg &= ~AWIN_DDMA_CTL_DMA_LOADING;
sys/arm/allwinner/a10_dmac.c
389
a10dmac_write_ctl(ch, cfg);
sys/arm/allwinner/a10_dmac.c
404
uint32_t cfg;
sys/arm/allwinner/a10_dmac.c
406
cfg = a10dmac_read_ctl(ch);
sys/arm/allwinner/a10_dmac.c
408
if (cfg & AWIN_NDMA_CTL_DMA_LOADING)
sys/arm/allwinner/a10_dmac.c
415
cfg |= AWIN_NDMA_CTL_DMA_LOADING;
sys/arm/allwinner/a10_dmac.c
416
a10dmac_write_ctl(ch, cfg);
sys/arm/allwinner/a10_dmac.c
418
if (cfg & AWIN_DDMA_CTL_DMA_LOADING)
sys/arm/allwinner/a10_dmac.c
425
cfg |= AWIN_DDMA_CTL_DMA_LOADING;
sys/arm/allwinner/a10_dmac.c
426
a10dmac_write_ctl(ch, cfg);
sys/arm/allwinner/a10_dmac.c
436
uint32_t cfg;
sys/arm/allwinner/a10_dmac.c
438
cfg = a10dmac_read_ctl(ch);
sys/arm/allwinner/a10_dmac.c
440
cfg &= ~AWIN_NDMA_CTL_DMA_LOADING;
sys/arm/allwinner/a10_dmac.c
442
cfg &= ~AWIN_DDMA_CTL_DMA_LOADING;
sys/arm/allwinner/a10_dmac.c
444
a10dmac_write_ctl(ch, cfg);
sys/arm/allwinner/a31_dmac.c
351
a31dmac_set_config(device_t dev, void *priv, const struct sunxi_dma_config *cfg)
sys/arm/allwinner/a31_dmac.c
360
switch (cfg->dst_width) {
sys/arm/allwinner/a31_dmac.c
376
switch (cfg->dst_burst_len) {
sys/arm/allwinner/a31_dmac.c
392
switch (cfg->src_width) {
sys/arm/allwinner/a31_dmac.c
407
switch (cfg->src_burst_len) {
sys/arm/allwinner/a31_dmac.c
423
dst_am = cfg->dst_noincr ? DMA_ADDR_MODE_IO : DMA_ADDR_MODE_LINEAR;
sys/arm/allwinner/a31_dmac.c
424
src_am = cfg->src_noincr ? DMA_ADDR_MODE_IO : DMA_ADDR_MODE_LINEAR;
sys/arm/allwinner/a31_dmac.c
425
dst_wc = cfg->dst_wait_cyc;
sys/arm/allwinner/a31_dmac.c
426
src_wc = cfg->src_wait_cyc;
sys/arm/allwinner/a31_dmac.c
433
(cfg->dst_drqtype << DMA_DEST_DRQ_TYPE_SHIFT) |
sys/arm/allwinner/a31_dmac.c
437
(cfg->src_drqtype << DMA_SRC_DRQ_TYPE_SHIFT);
sys/arm/allwinner/aw_i2s.c
228
struct sunxi_i2s_config *cfg;
sys/arm/allwinner/aw_i2s.c
239
#define I2S_TYPE(sc) ((sc)->cfg->type)
sys/arm/allwinner/aw_i2s.c
298
I2S_WRITE(sc, sc->cfg->txchmap, 0x76543210);
sys/arm/allwinner/aw_i2s.c
299
val = I2S_READ(sc, sc->cfg->txchsel);
sys/arm/allwinner/aw_i2s.c
304
I2S_WRITE(sc, sc->cfg->txchsel, val);
sys/arm/allwinner/aw_i2s.c
305
I2S_WRITE(sc, sc->cfg->rxchmap, 0x76543210);
sys/arm/allwinner/aw_i2s.c
306
val = I2S_READ(sc, sc->cfg->rxchsel);
sys/arm/allwinner/aw_i2s.c
311
I2S_WRITE(sc, sc->cfg->rxchsel, val);
sys/arm/allwinner/aw_i2s.c
350
sc->cfg = (void*)ofw_bus_search_compatible(dev, compat_data)->ocd_data;
sys/arm/allwinner/aw_i2s.c
476
chsel = I2S_READ(sc, sc->cfg->txchsel);
sys/arm/allwinner/aw_i2s.c
479
I2S_WRITE(sc, sc->cfg->txchsel, chsel);
sys/arm/allwinner/aw_i2s.c
481
chsel = I2S_READ(sc, sc->cfg->rxchsel);
sys/arm/allwinner/aw_i2s.c
484
I2S_WRITE(sc, sc->cfg->rxchsel, chsel);
sys/arm/allwinner/aw_nmi.c
124
if (SC_NMI_READ(sc, sc->cfg->pending_reg) == 0) {
sys/arm/allwinner/aw_nmi.c
130
SC_NMI_WRITE(sc, sc->cfg->enable_reg, ~NMI_IRQ_ENABLE);
sys/arm/allwinner/aw_nmi.c
144
SC_NMI_WRITE(sc, sc->cfg->enable_reg, NMI_IRQ_ENABLE);
sys/arm/allwinner/aw_nmi.c
154
SC_NMI_WRITE(sc, sc->cfg->enable_reg, ~NMI_IRQ_ENABLE);
sys/arm/allwinner/aw_nmi.c
280
SC_NMI_WRITE(sc, sc->cfg->ctrl_reg, icfg);
sys/arm/allwinner/aw_nmi.c
297
SC_NMI_WRITE(sc, sc->cfg->enable_reg, ~NMI_IRQ_ENABLE);
sys/arm/allwinner/aw_nmi.c
310
SC_NMI_WRITE(sc, sc->cfg->pending_reg, NMI_IRQ_ACK);
sys/arm/allwinner/aw_nmi.c
329
SC_NMI_WRITE(sc, sc->cfg->pending_reg, NMI_IRQ_ACK);
sys/arm/allwinner/aw_nmi.c
353
sc->cfg = (struct aw_nmi_reg_cfg *)
sys/arm/allwinner/aw_nmi.c
368
SC_NMI_WRITE(sc, sc->cfg->enable_reg, ~NMI_IRQ_ENABLE);
sys/arm/allwinner/aw_nmi.c
369
SC_NMI_WRITE(sc, sc->cfg->pending_reg, NMI_IRQ_ACK);
sys/arm/allwinner/aw_nmi.c
88
struct aw_nmi_reg_cfg * cfg;
sys/arm/broadcom/bcm2835/bcm2835_vcbus.c
220
struct bcm283x_memory_soc_cfg *cfg;
sys/arm/broadcom/bcm2835/bcm2835_vcbus.c
224
cfg = bcm283x_get_current_memcfg();
sys/arm/broadcom/bcm2835/bcm2835_vcbus.c
225
map = cfg->memmap;
sys/arm/broadcom/bcm2835/bcm2835_vcbus.c
246
struct bcm283x_memory_soc_cfg *cfg;
sys/arm/broadcom/bcm2835/bcm2835_vcbus.c
250
cfg = bcm283x_get_current_memcfg();
sys/arm/broadcom/bcm2835/bcm2835_vcbus.c
251
map = cfg->memmap;
sys/arm/broadcom/bcm2835/bcm2835_vcbus.c
272
struct bcm283x_memory_soc_cfg *cfg;
sys/arm/broadcom/bcm2835/bcm2835_vcbus.c
274
cfg = bcm283x_get_current_memcfg();
sys/arm/broadcom/bcm2835/bcm2835_vcbus.c
275
return (cfg->busdma_lowaddr);
sys/arm/broadcom/bcm2835/raspberrypi_gpio.c
358
union msg_get_gpio_config cfg;
sys/arm/broadcom/bcm2835/raspberrypi_gpio.c
393
bzero(&cfg, sizeof(cfg));
sys/arm/broadcom/bcm2835/raspberrypi_gpio.c
394
cfg.req.gpio = RPI_FW_GPIO_BASE + i;
sys/arm/broadcom/bcm2835/raspberrypi_gpio.c
396
BCM2835_FIRMWARE_TAG_GET_GPIO_CONFIG, &cfg, sizeof(cfg));
sys/arm/broadcom/bcm2835/raspberrypi_gpio.c
397
if (rv == 0 && cfg.resp.gpio == 0) {
sys/arm/broadcom/bcm2835/raspberrypi_gpio.c
398
if (cfg.resp.dir == BCM2835_FIRMWARE_GPIO_IN)
sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
206
union msg_gpiovirtbuf cfg;
sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
222
BCM2835_FIRMWARE_TAG_GET_GPIOVIRTBUF, &cfg, sizeof(cfg));
sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
235
union msg_gpiovirtbuf cfg;
sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
287
cfg.req.addr = (uint32_t)sc->paddr;
sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
289
BCM2835_FIRMWARE_TAG_SET_GPIOVIRTBUF, &cfg, sizeof(cfg));
sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
291
device_printf(dev, "rv: %d, addr: 0x%x\n", rv, cfg.resp.addr);
sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
292
if (rv != 0 || cfg.resp.addr != 0)
sys/arm/freescale/imx/imx_iomux.c
148
struct pincfg *cfgtuples, *cfg;
sys/arm/freescale/imx/imx_iomux.c
161
for (i = 0, cfg = cfgtuples; i < ntuples; i++, cfg++) {
sys/arm/freescale/imx/imx_iomux.c
162
sion = (cfg->padconf_val & PADCONF_SION) ? PADMUX_SION : 0;
sys/arm/freescale/imx/imx_iomux.c
163
WR4(sc, cfg->mux_reg, cfg->mux_val | sion);
sys/arm/freescale/imx/imx_iomux.c
164
iomux_configure_input(sc, cfg->input_reg, cfg->input_val);
sys/arm/freescale/imx/imx_iomux.c
165
if ((cfg->padconf_val & PADCONF_NONE) == 0)
sys/arm/freescale/imx/imx_iomux.c
166
WR4(sc, cfg->padconf_reg, cfg->padconf_val);
sys/arm/freescale/imx/imx_iomux.c
173
name, cfg->mux_reg, cfg->mux_val | sion,
sys/arm/freescale/imx/imx_iomux.c
174
cfg->input_reg, cfg->input_val,
sys/arm/freescale/imx/imx_iomux.c
175
cfg->padconf_reg, cfg->padconf_val);
sys/arm/freescale/imx/imx_iomuxvar.h
34
void iomux_set_pad(u_int pin, u_int cfg);
sys/arm/nvidia/as3722_gpio.c
142
struct as3722_pincfg *cfg)
sys/arm/nvidia/as3722_gpio.c
157
sc->gpio_pins[pin]->pin_cfg_flags = cfg->flags;
sys/arm/nvidia/as3722_gpio.c
158
if (cfg->function != NULL) {
sys/arm/nvidia/as3722_gpio.c
159
fnc = as3722_pinmux_get_function(sc, cfg->function);
sys/arm/nvidia/as3722_gpio.c
162
"Unknown function %s for pin %s\n", cfg->function,
sys/arm/nvidia/as3722_gpio.c
205
struct as3722_pincfg *cfg, char **pins, int *lpins)
sys/arm/nvidia/as3722_gpio.c
214
rv = OF_getprop_alloc(node, "function", (void **)&cfg->function);
sys/arm/nvidia/as3722_gpio.c
216
cfg->function = NULL;
sys/arm/nvidia/as3722_gpio.c
221
cfg->flags |= as3722_cfg_names[i].config;
sys/arm/nvidia/as3722_gpio.c
229
struct as3722_pincfg cfg;
sys/arm/nvidia/as3722_gpio.c
233
rv = as3722_pinmux_read_node(sc, node, &cfg, &pins, &lpins);
sys/arm/nvidia/as3722_gpio.c
241
rv = as3722_pinmux_config_node(sc, pname, &cfg);
sys/arm/nvidia/as3722_gpio.c
252
if (cfg.function != NULL)
sys/arm/nvidia/as3722_gpio.c
253
OF_prop_free(cfg.function);
sys/arm/nvidia/tegra_pinmux.c
483
const struct tegra_mux *mux, struct pincfg *cfg)
sys/arm/nvidia/tegra_pinmux.c
490
if (cfg->function != NULL) {
sys/arm/nvidia/tegra_pinmux.c
491
tmp = pinmux_mux_function(mux, cfg->function);
sys/arm/nvidia/tegra_pinmux.c
494
"Unknown function %s for pin %s\n", cfg->function,
sys/arm/nvidia/tegra_pinmux.c
502
if (cfg->params[PROP_ID_PULL] != -1) {
sys/arm/nvidia/tegra_pinmux.c
504
reg |= (cfg->params[PROP_ID_PULL] & TEGRA_MUX_PUPD_MASK) <<
sys/arm/nvidia/tegra_pinmux.c
507
if (cfg->params[PROP_ID_TRISTATE] != -1) {
sys/arm/nvidia/tegra_pinmux.c
509
reg |= (cfg->params[PROP_ID_TRISTATE] & 1) <<
sys/arm/nvidia/tegra_pinmux.c
512
if (cfg->params[TEGRA_MUX_ENABLE_INPUT_SHIFT] != -1) {
sys/arm/nvidia/tegra_pinmux.c
514
reg |= (cfg->params[TEGRA_MUX_ENABLE_INPUT_SHIFT] & 1) <<
sys/arm/nvidia/tegra_pinmux.c
517
if (cfg->params[PROP_ID_ENABLE_INPUT] != -1) {
sys/arm/nvidia/tegra_pinmux.c
519
reg |= (cfg->params[PROP_ID_ENABLE_INPUT] & 1) <<
sys/arm/nvidia/tegra_pinmux.c
522
if (cfg->params[PROP_ID_ENABLE_INPUT] != -1) {
sys/arm/nvidia/tegra_pinmux.c
524
reg |= (cfg->params[PROP_ID_OPEN_DRAIN] & 1) <<
sys/arm/nvidia/tegra_pinmux.c
527
if (cfg->params[PROP_ID_LOCK] != -1) {
sys/arm/nvidia/tegra_pinmux.c
529
reg |= (cfg->params[PROP_ID_LOCK] & 1) <<
sys/arm/nvidia/tegra_pinmux.c
532
if (cfg->params[PROP_ID_IORESET] != -1) {
sys/arm/nvidia/tegra_pinmux.c
534
reg |= (cfg->params[PROP_ID_IORESET] & 1) <<
sys/arm/nvidia/tegra_pinmux.c
537
if (cfg->params[PROP_ID_RCV_SEL] != -1) {
sys/arm/nvidia/tegra_pinmux.c
539
reg |= (cfg->params[PROP_ID_RCV_SEL] & 1) <<
sys/arm/nvidia/tegra_pinmux.c
548
const struct tegra_grp *grp, struct pincfg *cfg)
sys/arm/nvidia/tegra_pinmux.c
554
if (cfg->params[PROP_ID_HIGH_SPEED_MODE] != -1) {
sys/arm/nvidia/tegra_pinmux.c
556
reg |= (cfg->params[PROP_ID_HIGH_SPEED_MODE] & 1) <<
sys/arm/nvidia/tegra_pinmux.c
559
if (cfg->params[PROP_ID_SCHMITT] != -1) {
sys/arm/nvidia/tegra_pinmux.c
561
reg |= (cfg->params[PROP_ID_SCHMITT] & 1) <<
sys/arm/nvidia/tegra_pinmux.c
564
if (cfg->params[PROP_ID_DRIVE_TYPE] != -1) {
sys/arm/nvidia/tegra_pinmux.c
566
reg |= (cfg->params[PROP_ID_DRIVE_TYPE] &
sys/arm/nvidia/tegra_pinmux.c
569
if (cfg->params[PROP_ID_SLEW_RATE_RISING] != -1) {
sys/arm/nvidia/tegra_pinmux.c
572
reg |= (cfg->params[PROP_ID_SLEW_RATE_RISING] &
sys/arm/nvidia/tegra_pinmux.c
576
if (cfg->params[PROP_ID_SLEW_RATE_FALLING] != -1) {
sys/arm/nvidia/tegra_pinmux.c
579
reg |= (cfg->params[PROP_ID_SLEW_RATE_FALLING] &
sys/arm/nvidia/tegra_pinmux.c
583
if ((cfg->params[PROP_ID_DRIVE_DOWN_STRENGTH] != -1) &&
sys/arm/nvidia/tegra_pinmux.c
586
reg |= (cfg->params[PROP_ID_DRIVE_DOWN_STRENGTH] &
sys/arm/nvidia/tegra_pinmux.c
589
if ((cfg->params[PROP_ID_DRIVE_UP_STRENGTH] != -1) &&
sys/arm/nvidia/tegra_pinmux.c
592
reg |= (cfg->params[PROP_ID_DRIVE_UP_STRENGTH] &
sys/arm/nvidia/tegra_pinmux.c
600
pinmux_config_node(struct pinmux_softc *sc, char *pin_name, struct pincfg *cfg)
sys/arm/nvidia/tegra_pinmux.c
609
if (cfg->function == NULL) {
sys/arm/nvidia/tegra_pinmux.c
614
if (strcmp(cfg->function, "csi") == 0)
sys/arm/nvidia/tegra_pinmux.c
616
else if (strcmp(cfg->function, "dsi_b") == 0)
sys/arm/nvidia/tegra_pinmux.c
627
rv = pinmux_config_mux(sc, pin_name, mux, cfg);
sys/arm/nvidia/tegra_pinmux.c
634
rv = pinmux_config_grp(sc, pin_name, grp, cfg);
sys/arm/nvidia/tegra_pinmux.c
643
pinmux_read_node(struct pinmux_softc *sc, phandle_t node, struct pincfg *cfg,
sys/arm/nvidia/tegra_pinmux.c
654
(void **)&cfg->function);
sys/arm/nvidia/tegra_pinmux.c
656
cfg->function = NULL;
sys/arm/nvidia/tegra_pinmux.c
660
rv = OF_getencprop(node, prop_names[i].name, &cfg->params[i],
sys/arm/nvidia/tegra_pinmux.c
661
sizeof(cfg->params[i]));
sys/arm/nvidia/tegra_pinmux.c
663
cfg->params[i] = -1;
sys/arm/nvidia/tegra_pinmux.c
671
struct pincfg cfg;
sys/arm/nvidia/tegra_pinmux.c
675
rv = pinmux_read_node(sc, node, &cfg, &pins, &lpins);
sys/arm/nvidia/tegra_pinmux.c
683
rv = pinmux_config_node(sc, pname, &cfg);
sys/arm/nvidia/tegra_pinmux.c
694
if (cfg.function != NULL)
sys/arm/nvidia/tegra_pinmux.c
695
OF_prop_free(cfg.function);
sys/arm/nvidia/tegra_soctherm.c
465
struct tsensor_cfg *cfg;
sys/arm/nvidia/tegra_soctherm.c
469
cfg = sc->soc->tsensor_cfg;
sys/arm/nvidia/tegra_soctherm.c
485
mult = cfg->pdiv * cfg->tsample_ate;
sys/arm/nvidia/tegra_soctherm.c
486
div = cfg->tsample * cfg->pdiv_ate;
sys/arm/nvidia/tegra_soctherm.c
515
struct tsensor_cfg *cfg;
sys/arm/nvidia/tegra_soctherm.c
518
cfg = sc->soc->tsensor_cfg;
sys/arm/nvidia/tegra_soctherm.c
526
val = TSENSOR_CONFIG0_TALL(cfg->tall);
sys/arm/nvidia/tegra_soctherm.c
530
val = TSENSOR_CONFIG1_TSAMPLE(cfg->tsample - 1);
sys/arm/nvidia/tegra_soctherm.c
531
val |= TSENSOR_CONFIG1_TIDDQ_EN(cfg->tiddq_en);
sys/arm/nvidia/tegra_soctherm.c
532
val |= TSENSOR_CONFIG1_TEN_COUNT(cfg->ten_count);
sys/arm/ti/ti_pinmux.c
331
struct pincfg *cfgtuples, *cfg;
sys/arm/ti/ti_pinmux.c
347
for (i = 0, cfg = cfgtuples; i < ntuples; i++, cfg++) {
sys/arm/ti/ti_pinmux.c
352
name, cfg->reg, cfg->conf);
sys/arm/ti/ti_pinmux.c
356
ti_pinmux_write_2(sc, cfg->reg, cfg->conf);
sys/arm/xilinx/zy7_devcfg.c
252
struct zy7_fclk_config *cfg;
sys/arm/xilinx/zy7_devcfg.c
256
cfg = arg1;
sys/arm/xilinx/zy7_devcfg.c
259
switch (cfg->source) {
sys/arm/xilinx/zy7_devcfg.c
280
cfg->source = ZY7_PL_FCLK_SRC_IO;
sys/arm/xilinx/zy7_devcfg.c
282
cfg->source = ZY7_PL_FCLK_SRC_DDR;
sys/arm/xilinx/zy7_devcfg.c
284
cfg->source = ZY7_PL_FCLK_SRC_ARM;
sys/arm/xilinx/zy7_devcfg.c
288
zy7_pl_fclk_set_source(unit, cfg->source);
sys/arm/xilinx/zy7_devcfg.c
289
if (cfg->frequency > 0)
sys/arm/xilinx/zy7_devcfg.c
290
cfg->actual_frequency = zy7_pl_fclk_get_freq(unit);
sys/arm/xilinx/zy7_devcfg.c
298
struct zy7_fclk_config *cfg;
sys/arm/xilinx/zy7_devcfg.c
304
cfg = arg1;
sys/arm/xilinx/zy7_devcfg.c
307
freq = cfg->frequency;
sys/arm/xilinx/zy7_devcfg.c
325
cfg->frequency = freq;
sys/arm/xilinx/zy7_devcfg.c
326
cfg->actual_frequency = new_actual_freq;
sys/arm64/apple/exynos_uart.c
102
.cfg = {
sys/arm64/apple/exynos_uart.c
119
.cfg = {
sys/arm64/apple/exynos_uart.c
217
exynos4210_init_common(struct exynos_uart_cfg *cfg, struct uart_bas *bas,
sys/arm64/apple/exynos_uart.c
226
bas->driver1 = cfg;
sys/arm64/apple/exynos_uart.c
229
if (cfg->cfg_type == EXUART_S5L) {
sys/arm64/apple/exynos_uart.c
242
if (cfg->cfg_type == EXUART_S5L) {
sys/arm64/apple/exynos_uart.c
258
return (exynos4210_init_common(&uart_ex4210_class.cfg, bas, baudrate,
sys/arm64/apple/exynos_uart.c
267
return (exynos4210_init_common(&uart_s5l_class.cfg, bas, baudrate,
sys/arm64/apple/exynos_uart.c
280
struct exynos_uart_cfg *cfg;
sys/arm64/apple/exynos_uart.c
282
cfg = bas->driver1;
sys/arm64/apple/exynos_uart.c
285
cfg->cfg_uart_full_mask) != 0)
sys/arm64/apple/exynos_uart.c
295
struct exynos_uart_cfg *cfg;
sys/arm64/apple/exynos_uart.c
298
cfg = bas->driver1;
sys/arm64/apple/exynos_uart.c
299
if (!intr || cfg->cfg_type != EXUART_S5L) {
sys/arm64/apple/exynos_uart.c
304
if (cfg->cfg_type != EXUART_S5L)
sys/arm64/apple/exynos_uart.c
385
struct exynos_uart_cfg *cfg;
sys/arm64/apple/exynos_uart.c
394
cfg = &class->cfg;
sys/arm64/apple/exynos_uart.c
395
MPASS(sc->sc_sysdev == NULL || cfg == sc->sc_sysdev->bas.driver1);
sys/arm64/apple/exynos_uart.c
396
sc->sc_bas.driver1 = cfg;
sys/arm64/apple/exynos_uart.c
404
struct exynos_uart_cfg *cfg;
sys/arm64/apple/exynos_uart.c
408
cfg = sc->sc_bas.driver1;
sys/arm64/apple/exynos_uart.c
417
if (cfg->cfg_type == EXUART_S5L) {
sys/arm64/apple/exynos_uart.c
60
static void exynos4210_init_common(struct exynos_uart_cfg *cfg,
sys/arm64/apple/exynos_uart.c
89
struct exynos_uart_cfg cfg;
sys/arm64/nvidia/tegra210/max77620_gpio.c
113
struct max77620_pincfg *cfg)
sys/arm64/nvidia/tegra210/max77620_gpio.c
118
cfg->alt_func = false;
sys/arm64/nvidia/tegra210/max77620_gpio.c
123
cfg->alt_func = true;
sys/arm64/nvidia/tegra210/max77620_gpio.c
191
struct max77620_pincfg *cfg)
sys/arm64/nvidia/tegra210/max77620_gpio.c
217
if (cfg->alt_func) {
sys/arm64/nvidia/tegra210/max77620_gpio.c
226
switch (cfg->params[CFG_BIAS_PULL_UP]) {
sys/arm64/nvidia/tegra210/max77620_gpio.c
237
switch (cfg->params[CFG_BIAS_PULL_DOWN]) {
sys/arm64/nvidia/tegra210/max77620_gpio.c
249
if (cfg->params[CFG_OPEN_DRAIN] == 1) {
sys/arm64/nvidia/tegra210/max77620_gpio.c
254
if (cfg->params[CFG_PUSH_PULL] == 1) {
sys/arm64/nvidia/tegra210/max77620_gpio.c
270
struct max77620_pincfg *cfg, char **pins, int *lpins)
sys/arm64/nvidia/tegra210/max77620_gpio.c
282
rv = max77620_pinmux_get_function(sc, function, cfg);
sys/arm64/nvidia/tegra210/max77620_gpio.c
294
&cfg->params[i], sizeof(cfg->params[i]));
sys/arm64/nvidia/tegra210/max77620_gpio.c
296
cfg->params[i] = -1;
sys/arm64/nvidia/tegra210/max77620_gpio.c
306
struct max77620_pincfg cfg;
sys/arm64/nvidia/tegra210/max77620_gpio.c
310
rv = max77620_pinmux_read_node(sc, node, &cfg, &pins, &lpins);
sys/arm64/nvidia/tegra210/max77620_gpio.c
318
rv = max77620_pinmux_config_node(sc, pname, &cfg);
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
454
const struct tegra_mux *mux, struct pincfg *cfg)
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
461
if (cfg->function != NULL) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
462
tmp = pinmux_mux_function(mux, cfg->function);
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
465
"Unknown function %s for pin %s\n", cfg->function,
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
473
if (cfg->params[PROP_ID_PULL] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
475
reg |= (cfg->params[PROP_ID_PULL] & TEGRA_MUX_PUPD_MASK) <<
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
478
if (cfg->params[PROP_ID_TRISTATE] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
480
reg |= (cfg->params[PROP_ID_TRISTATE] & 1) <<
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
483
if (cfg->params[TEGRA_MUX_ENABLE_INPUT_SHIFT] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
485
reg |= (cfg->params[TEGRA_MUX_ENABLE_INPUT_SHIFT] & 1) <<
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
488
if (cfg->params[PROP_ID_ENABLE_INPUT] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
490
reg |= (cfg->params[PROP_ID_ENABLE_INPUT] & 1) <<
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
493
if (cfg->params[PROP_ID_ENABLE_INPUT] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
495
reg |= (cfg->params[PROP_ID_OPEN_DRAIN] & 1) <<
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
498
if (cfg->params[PROP_ID_LOCK] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
500
reg |= (cfg->params[PROP_ID_LOCK] & 1) <<
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
503
if (cfg->params[PROP_ID_IORESET] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
505
reg |= (cfg->params[PROP_ID_IORESET] & 1) <<
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
508
if (cfg->params[PROP_ID_RCV_SEL] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
510
reg |= (cfg->params[PROP_ID_RCV_SEL] & 1) <<
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
519
const struct tegra_grp *grp, struct pincfg *cfg)
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
525
if (cfg->params[PROP_ID_HIGH_SPEED_MODE] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
527
reg |= (cfg->params[PROP_ID_HIGH_SPEED_MODE] & 1) <<
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
530
if (cfg->params[PROP_ID_SCHMITT] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
532
reg |= (cfg->params[PROP_ID_SCHMITT] & 1) <<
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
535
if (cfg->params[PROP_ID_DRIVE_TYPE] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
537
reg |= (cfg->params[PROP_ID_DRIVE_TYPE] &
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
540
if (cfg->params[PROP_ID_SLEW_RATE_RISING] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
543
reg |= (cfg->params[PROP_ID_SLEW_RATE_RISING] &
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
547
if (cfg->params[PROP_ID_SLEW_RATE_FALLING] != -1) {
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
550
reg |= (cfg->params[PROP_ID_SLEW_RATE_FALLING] &
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
554
if ((cfg->params[PROP_ID_DRIVE_DOWN_STRENGTH] != -1) &&
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
557
reg |= (cfg->params[PROP_ID_DRIVE_DOWN_STRENGTH] &
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
560
if ((cfg->params[PROP_ID_DRIVE_UP_STRENGTH] != -1) &&
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
563
reg |= (cfg->params[PROP_ID_DRIVE_UP_STRENGTH] &
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
571
pinmux_config_node(struct pinmux_softc *sc, char *pin_name, struct pincfg *cfg)
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
585
rv = pinmux_config_mux(sc, pin_name, mux, cfg);
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
589
rv = pinmux_config_grp(sc, pin_name, &mux->grp, cfg);
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
598
rv = pinmux_config_grp(sc, pin_name, grp, cfg);
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
612
pinmux_read_node(struct pinmux_softc *sc, phandle_t node, struct pincfg *cfg,
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
622
rv = OF_getprop_alloc(node, "nvidia,function", (void **)&cfg->function);
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
624
cfg->function = NULL;
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
628
rv = OF_getencprop(node, prop_names[i].name, &cfg->params[i],
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
629
sizeof(cfg->params[i]));
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
631
cfg->params[i] = -1;
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
639
struct pincfg cfg;
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
643
rv = pinmux_read_node(sc, node, &cfg, &pins, &lpins);
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
651
rv = pinmux_config_node(sc, pname, &cfg);
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
661
if (cfg.function != NULL)
sys/arm64/nvidia/tegra210/tegra210_pinmux.c
662
OF_prop_free(cfg.function);
sys/arm64/spe/arm_spe_backend.c
300
struct arm_spe_config *cfg;
sys/arm64/spe/arm_spe_backend.c
335
cfg = (struct arm_spe_config *)ctx->config;
sys/arm64/spe/arm_spe_backend.c
336
if (cfg->interval)
sys/arm64/spe/arm_spe_backend.c
337
arm_spe_set_interval(info, cfg->interval);
sys/arm64/spe/arm_spe_backend.c
338
if (cfg->level == ARM_SPE_KERNEL_ONLY)
sys/arm64/spe/arm_spe_backend.c
340
if (cfg->level == ARM_SPE_USER_ONLY)
sys/arm64/spe/arm_spe_backend.c
342
if (cfg->ctx_field)
sys/arm64/spe/arm_spe_backend.c
343
info->ctx_field = cfg->ctx_field;
sys/cam/scsi/scsi_enc_safte.c
1004
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
1008
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
1009
if (cfg == NULL)
sys/cam/scsi/scsi_enc_safte.c
1017
cfg->flag1 = 0;
sys/cam/scsi/scsi_enc_safte.c
1018
cfg->flag2 = 0;
sys/cam/scsi/scsi_enc_safte.c
1026
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
1029
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
1030
if (cfg == NULL)
sys/cam/scsi/scsi_enc_safte.c
1037
TAILQ_INSERT_TAIL(&cfg->requests, &req, links);
sys/cam/scsi/scsi_enc_safte.c
1059
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
1062
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
1063
if (cfg == NULL)
sys/cam/scsi/scsi_enc_safte.c
1074
TAILQ_INSERT_TAIL(&cfg->requests, &req, links);
sys/cam/scsi/scsi_enc_safte.c
1103
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
1113
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
1118
TAILQ_INIT(&cfg->requests);
sys/cam/scsi/scsi_enc_safte.c
259
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
263
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
264
if (cfg == NULL)
sys/cam/scsi/scsi_enc_safte.c
273
cfg->Nfans = buf[0];
sys/cam/scsi/scsi_enc_safte.c
274
cfg->Npwr = buf[1];
sys/cam/scsi/scsi_enc_safte.c
275
cfg->Nslots = buf[2];
sys/cam/scsi/scsi_enc_safte.c
276
cfg->DoorLock = buf[3];
sys/cam/scsi/scsi_enc_safte.c
277
cfg->Ntherm = buf[4];
sys/cam/scsi/scsi_enc_safte.c
278
cfg->Nspkrs = buf[5];
sys/cam/scsi/scsi_enc_safte.c
280
cfg->Ntstats = buf[6] & 0x0f;
sys/cam/scsi/scsi_enc_safte.c
282
cfg->Ntstats = 0;
sys/cam/scsi/scsi_enc_safte.c
285
cfg->Nfans, cfg->Npwr, cfg->Nslots, cfg->DoorLock, cfg->Ntherm,
sys/cam/scsi/scsi_enc_safte.c
286
cfg->Nspkrs, cfg->Ntstats);
sys/cam/scsi/scsi_enc_safte.c
288
enc->enc_cache.nelms = cfg->Nfans + cfg->Npwr + cfg->Nslots +
sys/cam/scsi/scsi_enc_safte.c
289
cfg->DoorLock + cfg->Ntherm + cfg->Nspkrs + cfg->Ntstats + 1;
sys/cam/scsi/scsi_enc_safte.c
300
for (i = 0; i < cfg->Nfans; i++)
sys/cam/scsi/scsi_enc_safte.c
302
cfg->pwroff = (uint8_t) r;
sys/cam/scsi/scsi_enc_safte.c
303
for (i = 0; i < cfg->Npwr; i++)
sys/cam/scsi/scsi_enc_safte.c
305
for (i = 0; i < cfg->DoorLock; i++)
sys/cam/scsi/scsi_enc_safte.c
307
if (cfg->Nspkrs > 0)
sys/cam/scsi/scsi_enc_safte.c
309
for (i = 0; i < cfg->Ntherm; i++)
sys/cam/scsi/scsi_enc_safte.c
311
for (i = 0; i <= cfg->Ntstats; i++)
sys/cam/scsi/scsi_enc_safte.c
313
cfg->slotoff = (uint8_t) r;
sys/cam/scsi/scsi_enc_safte.c
314
for (i = 0; i < cfg->Nslots; i++)
sys/cam/scsi/scsi_enc_safte.c
330
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
333
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
334
if (cfg == NULL)
sys/cam/scsi/scsi_enc_safte.c
339
cfg->flag1 = buf[1];
sys/cam/scsi/scsi_enc_safte.c
340
cfg->flag2 = buf[2];
sys/cam/scsi/scsi_enc_safte.c
342
cfg->adm_status = 0;
sys/cam/scsi/scsi_enc_safte.c
343
if (cfg->flag1 & SAFT_FLG1_GLOBFAIL)
sys/cam/scsi/scsi_enc_safte.c
344
cfg->adm_status |= SES_ENCSTAT_CRITICAL;
sys/cam/scsi/scsi_enc_safte.c
345
else if (cfg->flag1 & SAFT_FLG1_GLOBWARN)
sys/cam/scsi/scsi_enc_safte.c
346
cfg->adm_status |= SES_ENCSTAT_NONCRITICAL;
sys/cam/scsi/scsi_enc_safte.c
355
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
361
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
362
if (cfg == NULL)
sys/cam/scsi/scsi_enc_safte.c
368
cfg->enc_status = 0;
sys/cam/scsi/scsi_enc_safte.c
370
for (nitems = i = 0; i < cfg->Nfans; i++) {
sys/cam/scsi/scsi_enc_safte.c
380
if (cfg->flag1 & SAFT_FLG1_ENCFANFAIL)
sys/cam/scsi/scsi_enc_safte.c
405
if (cfg->Nfans == 1 || (cfg->Ntherm + cfg->Ntstats) == 0)
sys/cam/scsi/scsi_enc_safte.c
406
cfg->enc_status |= SES_ENCSTAT_CRITICAL;
sys/cam/scsi/scsi_enc_safte.c
408
cfg->enc_status |= SES_ENCSTAT_NONCRITICAL;
sys/cam/scsi/scsi_enc_safte.c
420
if (cfg->Nfans == 1)
sys/cam/scsi/scsi_enc_safte.c
421
cfg->enc_status |= SES_ENCSTAT_CRITICAL;
sys/cam/scsi/scsi_enc_safte.c
423
cfg->enc_status |= SES_ENCSTAT_NONCRITICAL;
sys/cam/scsi/scsi_enc_safte.c
428
cfg->enc_status |= SES_ENCSTAT_INFO;
sys/cam/scsi/scsi_enc_safte.c
444
if (cfg->Nfans && nitems == 0)
sys/cam/scsi/scsi_enc_safte.c
445
cfg->enc_status |= SES_ENCSTAT_CRITICAL;
sys/cam/scsi/scsi_enc_safte.c
447
for (i = 0; i < cfg->Npwr; i++) {
sys/cam/scsi/scsi_enc_safte.c
460
cfg->enc_status |= SES_ENCSTAT_INFO;
sys/cam/scsi/scsi_enc_safte.c
465
cfg->enc_status |= SES_ENCSTAT_NONCRITICAL;
sys/cam/scsi/scsi_enc_safte.c
471
cfg->enc_status |= SES_ENCSTAT_NONCRITICAL;
sys/cam/scsi/scsi_enc_safte.c
477
cfg->enc_status |= SES_ENCSTAT_INFO;
sys/cam/scsi/scsi_enc_safte.c
489
cfg->enc_status |= SES_ENCSTAT_INFO;
sys/cam/scsi/scsi_enc_safte.c
503
for (i = 0; i < cfg->Nslots; i++) {
sys/cam/scsi/scsi_enc_safte.c
505
if (cache->elm_map[cfg->slotoff + i].elm_type == ELMTYP_DEVICE)
sys/cam/scsi/scsi_enc_safte.c
506
cache->elm_map[cfg->slotoff + i].encstat[1] = buf[r];
sys/cam/scsi/scsi_enc_safte.c
515
if (cfg->DoorLock) {
sys/cam/scsi/scsi_enc_safte.c
535
cfg->enc_status |= SES_ENCSTAT_INFO;
sys/cam/scsi/scsi_enc_safte.c
553
if (cfg->Nspkrs) {
sys/cam/scsi/scsi_enc_safte.c
575
SAFT_BAIL(r + cfg->Ntherm, xfer_len);
sys/cam/scsi/scsi_enc_safte.c
576
tempflags = buf[r + cfg->Ntherm];
sys/cam/scsi/scsi_enc_safte.c
577
SAFT_BAIL(r + cfg->Ntherm + 1, xfer_len);
sys/cam/scsi/scsi_enc_safte.c
578
tempflags |= (tempflags << 8) | buf[r + cfg->Ntherm + 1];
sys/cam/scsi/scsi_enc_safte.c
580
for (i = 0; i < cfg->Ntherm; i++) {
sys/cam/scsi/scsi_enc_safte.c
614
cfg->enc_status |= SES_ENCSTAT_CRITICAL;
sys/cam/scsi/scsi_enc_safte.c
624
for (i = 0; i <= cfg->Ntstats; i++) {
sys/cam/scsi/scsi_enc_safte.c
627
((i == cfg->Ntstats) ? 15 : (cfg->Ntherm + i)))) {
sys/cam/scsi/scsi_enc_safte.c
634
cfg->enc_status |= SES_ENCSTAT_CRITICAL;
sys/cam/scsi/scsi_enc_safte.c
642
if ((cfg->Ntherm + cfg->Ntstats) == 0)
sys/cam/scsi/scsi_enc_safte.c
656
cfg->enc_status | cfg->slot_status | cfg->adm_status;
sys/cam/scsi/scsi_enc_safte.c
664
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
669
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
670
if (cfg == NULL)
sys/cam/scsi/scsi_enc_safte.c
674
cfg->slot_status = 0;
sys/cam/scsi/scsi_enc_safte.c
675
oid = cfg->slotoff;
sys/cam/scsi/scsi_enc_safte.c
676
for (r = i = 0; i < cfg->Nslots; i++, r += 4) {
sys/cam/scsi/scsi_enc_safte.c
686
cfg->slot_status |= SES_ENCSTAT_CRITICAL;
sys/cam/scsi/scsi_enc_safte.c
689
cfg->slot_status |= SES_ENCSTAT_NONCRITICAL;
sys/cam/scsi/scsi_enc_safte.c
725
cfg->enc_status | cfg->slot_status | cfg->adm_status;
sys/cam/scsi/scsi_enc_safte.c
733
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
738
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
739
if (cfg == NULL)
sys/cam/scsi/scsi_enc_safte.c
747
if (cfg->current_request == NULL) {
sys/cam/scsi/scsi_enc_safte.c
748
cfg->current_request = TAILQ_FIRST(&cfg->requests);
sys/cam/scsi/scsi_enc_safte.c
749
TAILQ_REMOVE(&cfg->requests, cfg->current_request, links);
sys/cam/scsi/scsi_enc_safte.c
750
cfg->current_request_stage = 0;
sys/cam/scsi/scsi_enc_safte.c
751
cfg->current_request_stages = 1;
sys/cam/scsi/scsi_enc_safte.c
753
req = cfg->current_request;
sys/cam/scsi/scsi_enc_safte.c
757
cfg->adm_status = req->elm_stat[0] & ALL_ENC_STAT;
sys/cam/scsi/scsi_enc_safte.c
758
cfg->flag1 &= ~(SAFT_FLG1_GLOBFAIL|SAFT_FLG1_GLOBWARN);
sys/cam/scsi/scsi_enc_safte.c
760
cfg->flag1 |= SAFT_FLG1_GLOBFAIL;
sys/cam/scsi/scsi_enc_safte.c
762
cfg->flag1 |= SAFT_FLG1_GLOBWARN;
sys/cam/scsi/scsi_enc_safte.c
764
buf[1] = cfg->flag1;
sys/cam/scsi/scsi_enc_safte.c
765
buf[2] = cfg->flag2;
sys/cam/scsi/scsi_enc_safte.c
774
switch (cfg->current_request_stage) {
sys/cam/scsi/scsi_enc_safte.c
801
for (i = 0; i < cfg->Nslots; i++) {
sys/cam/scsi/scsi_enc_safte.c
802
ep1 = &enc->enc_cache.elm_map[cfg->slotoff + i];
sys/cam/scsi/scsi_enc_safte.c
806
xfer_len = cfg->Nslots * 3 + 1;
sys/cam/scsi/scsi_enc_safte.c
811
cfg->current_request_stages++;
sys/cam/scsi/scsi_enc_safte.c
814
cfg->current_request_stages++;
sys/cam/scsi/scsi_enc_safte.c
819
buf[1] = idx - cfg->slotoff;
sys/cam/scsi/scsi_enc_safte.c
820
if (cfg->current_request_stage == 1 &&
sys/cam/scsi/scsi_enc_safte.c
842
cfg->current_request_stages = 2;
sys/cam/scsi/scsi_enc_safte.c
843
switch (cfg->current_request_stage) {
sys/cam/scsi/scsi_enc_safte.c
846
cfg->flag1 |= SAFT_FLG1_ENCPWRFAIL;
sys/cam/scsi/scsi_enc_safte.c
848
cfg->flag1 &= ~SAFT_FLG1_ENCPWRFAIL;
sys/cam/scsi/scsi_enc_safte.c
851
buf[1] = cfg->flag1;
sys/cam/scsi/scsi_enc_safte.c
852
buf[2] = cfg->flag2;
sys/cam/scsi/scsi_enc_safte.c
858
buf[1] = idx - cfg->pwroff;
sys/cam/scsi/scsi_enc_safte.c
871
cfg->current_request_stages = 2;
sys/cam/scsi/scsi_enc_safte.c
872
switch (cfg->current_request_stage) {
sys/cam/scsi/scsi_enc_safte.c
875
cfg->flag1 |= SAFT_FLG1_ENCFANFAIL;
sys/cam/scsi/scsi_enc_safte.c
877
cfg->flag1 &= ~SAFT_FLG1_ENCFANFAIL;
sys/cam/scsi/scsi_enc_safte.c
879
buf[1] = cfg->flag1;
sys/cam/scsi/scsi_enc_safte.c
880
buf[2] = cfg->flag2;
sys/cam/scsi/scsi_enc_safte.c
907
cfg->flag2 &= ~SAFT_FLG2_LOCKDOOR;
sys/cam/scsi/scsi_enc_safte.c
909
cfg->flag2 |= SAFT_FLG2_LOCKDOOR;
sys/cam/scsi/scsi_enc_safte.c
911
buf[1] = cfg->flag1;
sys/cam/scsi/scsi_enc_safte.c
912
buf[2] = cfg->flag2;
sys/cam/scsi/scsi_enc_safte.c
919
cfg->flag2 &= ~SAFT_FLG1_ALARM;
sys/cam/scsi/scsi_enc_safte.c
921
cfg->flag2 |= SAFT_FLG1_ALARM;
sys/cam/scsi/scsi_enc_safte.c
923
cfg->flag2 &= ~SAFT_FLG1_ALARM;
sys/cam/scsi/scsi_enc_safte.c
926
buf[1] = cfg->flag1;
sys/cam/scsi/scsi_enc_safte.c
927
buf[2] = cfg->flag2;
sys/cam/scsi/scsi_enc_safte.c
954
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
958
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
959
if (cfg == NULL)
sys/cam/scsi/scsi_enc_safte.c
962
req = cfg->current_request;
sys/cam/scsi/scsi_enc_safte.c
965
if (++cfg->current_request_stage >= cfg->current_request_stages) {
sys/cam/scsi/scsi_enc_safte.c
975
cfg->current_request = NULL;
sys/cam/scsi/scsi_enc_safte.c
986
struct scfg *cfg;
sys/cam/scsi/scsi_enc_safte.c
988
cfg = enc->enc_private;
sys/cam/scsi/scsi_enc_safte.c
989
safte_terminate_control_requests(&cfg->requests, ENXIO);
sys/compat/linsysfs/linsysfs.c
292
dinfo->cfg.bus,
sys/compat/linsysfs/linsysfs.c
293
dinfo->cfg.slot,
sys/compat/linsysfs/linsysfs.c
294
dinfo->cfg.func);
sys/compat/linsysfs/linsysfs.c
338
if (dinfo->cfg.baseclass == PCIC_STORAGE) {
sys/compat/linsysfs/linsysfs.c
380
if (dinfo != NULL && dinfo->cfg.baseclass == PCIC_DISPLAY) {
sys/compat/linuxkpi/common/include/linux/mhi.h
127
const struct mhi_controller_config *cfg)
sys/compat/linuxkpi/common/include/linux/mhi.h
130
return (linuxkpi_mhi_register_controller(mhi_ctrl, cfg));
sys/compat/linuxkpi/common/include/linux/pci.h
668
pcicfgregs *cfg;
sys/compat/linuxkpi/common/include/linux/pci.h
674
cfg = &dinfo->cfg;
sys/compat/linuxkpi/common/include/linux/pci.h
676
if (cfg->pp.pp_cap == 0)
sys/compat/linuxkpi/common/include/linux/pci.h
679
if ((cfg->pp.pp_cap & (1 << (PCIM_PCAP_PME_SHIFT + flag))) != 0)
sys/compat/linuxkpi/common/include/net/mac80211.h
852
struct ieee80211_vif_cfg cfg;
sys/compat/linuxkpi/common/src/linux_80211.c
1377
if (vif->cfg.assoc && lsta->state == IEEE80211_STA_AUTHORIZED) {
sys/compat/linuxkpi/common/src/linux_80211.c
1483
if (vif->cfg.assoc && lsta->state == IEEE80211_STA_AUTHORIZED) {
sys/compat/linuxkpi/common/src/linux_80211.c
1981
vif->cfg.assoc, vif->cfg.aid,
sys/compat/linuxkpi/common/src/linux_80211.c
2013
if (vif->cfg.assoc &&
sys/compat/linuxkpi/common/src/linux_80211.c
2030
vif->cfg.assoc, vif->cfg.aid,
sys/compat/linuxkpi/common/src/linux_80211.c
2107
if (vif->cfg.assoc) {
sys/compat/linuxkpi/common/src/linux_80211.c
2109
vif->cfg.assoc = false;
sys/compat/linuxkpi/common/src/linux_80211.c
2110
vif->cfg.aid = 0;
sys/compat/linuxkpi/common/src/linux_80211.c
2445
vif->cfg.idle = false;
sys/compat/linuxkpi/common/src/linux_80211.c
2452
vif->cfg.assoc = false;
sys/compat/linuxkpi/common/src/linux_80211.c
2453
vif->cfg.aid = 0;
sys/compat/linuxkpi/common/src/linux_80211.c
2815
if (!vif->cfg.assoc || vif->cfg.aid != IEEE80211_NODE_AID(ni)) {
sys/compat/linuxkpi/common/src/linux_80211.c
2817
vif->cfg.assoc = true;
sys/compat/linuxkpi/common/src/linux_80211.c
2818
vif->cfg.aid = IEEE80211_NODE_AID(ni);
sys/compat/linuxkpi/common/src/linux_80211.c
2822
vif->cfg.ssid_len = ni->ni_esslen;
sys/compat/linuxkpi/common/src/linux_80211.c
2823
memcpy(vif->cfg.ssid, ni->ni_essid, ni->ni_esslen);
sys/compat/linuxkpi/common/src/linux_80211.c
3331
vif->cfg.ssid_len = 0;
sys/compat/linuxkpi/common/src/linux_80211.c
3332
memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid));
sys/compat/linuxkpi/common/src/linux_80211.c
3824
if (vif->cfg.assoc)
sys/compat/linuxkpi/common/src/linux_80211.c
3933
vif->cfg.aid = 0;
sys/compat/linuxkpi/common/src/linux_80211.c
3934
vif->cfg.assoc = false;
sys/compat/linuxkpi/common/src/linux_80211.c
3935
vif->cfg.idle = true;
sys/compat/linuxkpi/common/src/linux_80211.c
3936
vif->cfg.ps = false;
sys/compat/linuxkpi/common/src/linux_80211.c
8427
v = htole16(vif->cfg.aid | 1<<15 | 1<<16);
sys/compat/linuxkpi/common/src/linux_80211.c
8498
lvif->lvif_bss_synched, vif->cfg.assoc, lvif->beacons,
sys/compat/linuxkpi/common/src/linux_80211.c
8515
lvif->lvif_bss_synched, vif->cfg.assoc, lvif->beacons,
sys/compat/linuxkpi/common/src/linux_mhi.c
58
const struct mhi_controller_config *cfg)
sys/compat/linuxkpi/common/src/linux_mhi.c
61
if (mhi_ctrl == NULL || cfg == NULL)
sys/compat/linuxkpi/common/src/linux_pci.c
1526
msi = &dinfo->cfg.msi;
sys/compat/linuxkpi/common/src/linux_pci.c
374
if (dinfo->cfg.pcie.pcie_location != 0 &&
sys/compat/linuxkpi/common/src/linux_pci.c
375
dinfo->cfg.pcie.pcie_type == PCIEM_TYPE_ROOT_PORT) {
sys/compat/linuxkpi/common/src/linux_usb.c
557
struct usb_config cfg[1];
sys/compat/linuxkpi/common/src/linux_usb.c
568
memset(cfg, 0, sizeof(cfg));
sys/compat/linuxkpi/common/src/linux_usb.c
570
cfg[0].type = type;
sys/compat/linuxkpi/common/src/linux_usb.c
571
cfg[0].endpoint = addr & UE_ADDR;
sys/compat/linuxkpi/common/src/linux_usb.c
572
cfg[0].direction = addr & (UE_DIR_OUT | UE_DIR_IN);
sys/compat/linuxkpi/common/src/linux_usb.c
574
ep = usbd_get_endpoint(dev, uhe->bsd_iface_index, cfg);
sys/compat/linuxkpi/common/src/linux_usb.c
776
struct usb_config cfg[2];
sys/compat/linuxkpi/common/src/linux_usb.c
791
memset(cfg, 0, sizeof(cfg));
sys/compat/linuxkpi/common/src/linux_usb.c
799
cfg[0].type = type;
sys/compat/linuxkpi/common/src/linux_usb.c
800
cfg[0].endpoint = addr & UE_ADDR;
sys/compat/linuxkpi/common/src/linux_usb.c
801
cfg[0].direction = addr & (UE_DIR_OUT | UE_DIR_IN);
sys/compat/linuxkpi/common/src/linux_usb.c
802
cfg[0].callback = &usb_linux_isoc_callback;
sys/compat/linuxkpi/common/src/linux_usb.c
803
cfg[0].bufsize = 0; /* use wMaxPacketSize */
sys/compat/linuxkpi/common/src/linux_usb.c
804
cfg[0].frames = usb_max_isoc_frames(dev);
sys/compat/linuxkpi/common/src/linux_usb.c
805
cfg[0].flags.proxy_buffer = 1;
sys/compat/linuxkpi/common/src/linux_usb.c
814
cfg[0].flags.ext_buffer = 1;
sys/compat/linuxkpi/common/src/linux_usb.c
816
cfg[0].flags.short_xfer_ok = 1;
sys/compat/linuxkpi/common/src/linux_usb.c
818
bcopy(cfg, cfg + 1, sizeof(*cfg));
sys/compat/linuxkpi/common/src/linux_usb.c
823
uhe->bsd_xfer, cfg, 2, uhe, &Giant)) {
sys/compat/linuxkpi/common/src/linux_usb.c
833
cfg[0].type = type;
sys/compat/linuxkpi/common/src/linux_usb.c
834
cfg[0].endpoint = addr & UE_ADDR;
sys/compat/linuxkpi/common/src/linux_usb.c
835
cfg[0].direction = addr & (UE_DIR_OUT | UE_DIR_IN);
sys/compat/linuxkpi/common/src/linux_usb.c
836
cfg[0].callback = &usb_linux_non_isoc_callback;
sys/compat/linuxkpi/common/src/linux_usb.c
837
cfg[0].bufsize = bufsize;
sys/compat/linuxkpi/common/src/linux_usb.c
838
cfg[0].flags.ext_buffer = 1; /* enable zero-copy */
sys/compat/linuxkpi/common/src/linux_usb.c
839
cfg[0].flags.proxy_buffer = 1;
sys/compat/linuxkpi/common/src/linux_usb.c
840
cfg[0].flags.short_xfer_ok = 1;
sys/compat/linuxkpi/common/src/linux_usb.c
843
uhe->bsd_xfer, cfg, 1, uhe, &Giant)) {
sys/crypto/skein/skein.c
101
Skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
sys/crypto/skein/skein.c
107
Skein_256_Final_Pad(ctx,cfg.b); /* put result into cfg.b[] */
sys/crypto/skein/skein.c
108
memcpy(ctx->X,cfg.b,sizeof(cfg.b)); /* copy over into ctx->X[] */
sys/crypto/skein/skein.c
121
memset(&cfg.w,0,sizeof(cfg.w)); /* pre-pad cfg.w[] with zeroes */
sys/crypto/skein/skein.c
122
cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
sys/crypto/skein/skein.c
123
cfg.w[1] = Skein_Swap64(hashBitLen); /* hash result length in bits */
sys/crypto/skein/skein.c
124
cfg.w[2] = Skein_Swap64(treeInfo); /* tree hash config info (or SKEIN_CFG_TREE_INFO_SEQUENTIAL) */
sys/crypto/skein/skein.c
129
Skein_256_Process_Block(ctx,cfg.b,1,SKEIN_CFG_STR_LEN);
sys/crypto/skein/skein.c
242
} cfg; /* config block */
sys/crypto/skein/skein.c
260
cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER); /* set the schema, version */
sys/crypto/skein/skein.c
261
cfg.w[1] = Skein_Swap64(hashBitLen); /* hash result length in bits */
sys/crypto/skein/skein.c
262
cfg.w[2] = Skein_Swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
sys/crypto/skein/skein.c
263
memset(&cfg.w[3],0,sizeof(cfg) - 3*sizeof(cfg.w[0])); /* zero pad config block */
sys/crypto/skein/skein.c
267
Skein_512_Process_Block(ctx,cfg.b,1,SKEIN_CFG_STR_LEN);
sys/crypto/skein/skein.c
287
} cfg; /* config block */
sys/crypto/skein/skein.c
299
Skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
sys/crypto/skein/skein.c
305
Skein_512_Final_Pad(ctx,cfg.b); /* put result into cfg.b[] */
sys/crypto/skein/skein.c
306
memcpy(ctx->X,cfg.b,sizeof(cfg.b)); /* copy over into ctx->X[] */
sys/crypto/skein/skein.c
319
memset(&cfg.w,0,sizeof(cfg.w)); /* pre-pad cfg.w[] with zeroes */
sys/crypto/skein/skein.c
320
cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
sys/crypto/skein/skein.c
321
cfg.w[1] = Skein_Swap64(hashBitLen); /* hash result length in bits */
sys/crypto/skein/skein.c
322
cfg.w[2] = Skein_Swap64(treeInfo); /* tree hash config info (or SKEIN_CFG_TREE_INFO_SEQUENTIAL) */
sys/crypto/skein/skein.c
327
Skein_512_Process_Block(ctx,cfg.b,1,SKEIN_CFG_STR_LEN);
sys/crypto/skein/skein.c
440
} cfg; /* config block */
sys/crypto/skein/skein.c
45
} cfg; /* config block */
sys/crypto/skein/skein.c
457
cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER); /* set the schema, version */
sys/crypto/skein/skein.c
458
cfg.w[1] = Skein_Swap64(hashBitLen); /* hash result length in bits */
sys/crypto/skein/skein.c
459
cfg.w[2] = Skein_Swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
sys/crypto/skein/skein.c
460
memset(&cfg.w[3],0,sizeof(cfg) - 3*sizeof(cfg.w[0])); /* zero pad config block */
sys/crypto/skein/skein.c
464
Skein1024_Process_Block(ctx,cfg.b,1,SKEIN_CFG_STR_LEN);
sys/crypto/skein/skein.c
484
} cfg; /* config block */
sys/crypto/skein/skein.c
496
Skein_assert(sizeof(cfg.b) >= sizeof(ctx->X));
sys/crypto/skein/skein.c
502
Skein1024_Final_Pad(ctx,cfg.b); /* put result into cfg.b[] */
sys/crypto/skein/skein.c
503
memcpy(ctx->X,cfg.b,sizeof(cfg.b)); /* copy over into ctx->X[] */
sys/crypto/skein/skein.c
516
memset(&cfg.w,0,sizeof(cfg.w)); /* pre-pad cfg.w[] with zeroes */
sys/crypto/skein/skein.c
517
cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER);
sys/crypto/skein/skein.c
518
cfg.w[1] = Skein_Swap64(hashBitLen); /* hash result length in bits */
sys/crypto/skein/skein.c
519
cfg.w[2] = Skein_Swap64(treeInfo); /* tree hash config info (or SKEIN_CFG_TREE_INFO_SEQUENTIAL) */
sys/crypto/skein/skein.c
524
Skein1024_Process_Block(ctx,cfg.b,1,SKEIN_CFG_STR_LEN);
sys/crypto/skein/skein.c
63
cfg.w[0] = Skein_Swap64(SKEIN_SCHEMA_VER); /* set the schema, version */
sys/crypto/skein/skein.c
64
cfg.w[1] = Skein_Swap64(hashBitLen); /* hash result length in bits */
sys/crypto/skein/skein.c
65
cfg.w[2] = Skein_Swap64(SKEIN_CFG_TREE_INFO_SEQUENTIAL);
sys/crypto/skein/skein.c
66
memset(&cfg.w[3],0,sizeof(cfg) - 3*sizeof(cfg.w[0])); /* zero pad config block */
sys/crypto/skein/skein.c
70
Skein_256_Process_Block(ctx,cfg.b,1,SKEIN_CFG_STR_LEN);
sys/crypto/skein/skein.c
89
} cfg; /* config block */
sys/dev/acpica/acpi_pci.c
329
if (dinfo->ap_dinfo.cfg.func == func &&
sys/dev/acpica/acpi_pci.c
330
dinfo->ap_dinfo.cfg.slot == slot) {
sys/dev/alc/if_alc.c
4395
uint32_t cfg;
sys/dev/alc/if_alc.c
4400
cfg = CSR_READ_4(sc, ALC_RXQ_CFG);
sys/dev/alc/if_alc.c
4402
cfg &= ~RXQ_CFG_ENB;
sys/dev/alc/if_alc.c
4403
cfg |= qcfg[1];
sys/dev/alc/if_alc.c
4405
cfg |= RXQ_CFG_QUEUE0_ENB;
sys/dev/alc/if_alc.c
4406
CSR_WRITE_4(sc, ALC_RXQ_CFG, cfg);
sys/dev/alc/if_alc.c
4408
cfg = CSR_READ_4(sc, ALC_TXQ_CFG);
sys/dev/alc/if_alc.c
4409
cfg |= TXQ_CFG_ENB;
sys/dev/alc/if_alc.c
4410
CSR_WRITE_4(sc, ALC_TXQ_CFG, cfg);
sys/dev/bge/if_bge.c
3238
uint32_t cfg, clk;
sys/dev/bge/if_bge.c
3247
cfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID_MASK;
sys/dev/bge/if_bge.c
3248
if (cfg == BGE_MISCCFG_BOARD_ID_5704CIOBE)
sys/dev/bge/if_bge.c
3276
cfg = pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4);
sys/dev/bge/if_bge.c
3277
if (cfg & BGE_PCISTATE_PCI_BUSSPEED)
sys/dev/bge/if_bge.c
3281
if (cfg & BGE_PCISTATE_32BIT_BUS)
sys/dev/bhnd/bcma/bcma_erom.c
1056
struct bcma_corecfg *cfg;
sys/dev/bhnd/bcma/bcma_erom.c
1064
cfg = NULL;
sys/dev/bhnd/bcma/bcma_erom.c
1104
cfg = bcma_alloc_corecfg(core_index, core_unit, core.vendor,
sys/dev/bhnd/bcma/bcma_erom.c
1106
if (cfg == NULL)
sys/dev/bhnd/bcma/bcma_erom.c
1125
cfg->num_master_ports = core.num_mport;
sys/dev/bhnd/bcma/bcma_erom.c
1126
cfg->num_dev_ports = 0; /* determined below */
sys/dev/bhnd/bcma/bcma_erom.c
1127
cfg->num_bridge_ports = 0; /* determined blow */
sys/dev/bhnd/bcma/bcma_erom.c
1128
cfg->num_wrapper_ports = core.num_mwrap + core.num_swrap;
sys/dev/bhnd/bcma/bcma_erom.c
1151
STAILQ_INSERT_TAIL(&cfg->master_ports, mport, mp_link);
sys/dev/bhnd/bcma/bcma_erom.c
1174
cfg->num_dev_ports = 0;
sys/dev/bhnd/bcma/bcma_erom.c
1175
cfg->num_bridge_ports = core.num_dport;
sys/dev/bhnd/bcma/bcma_erom.c
1178
cfg->num_dev_ports = core.num_dport;
sys/dev/bhnd/bcma/bcma_erom.c
1179
cfg->num_bridge_ports = 0;
sys/dev/bhnd/bcma/bcma_erom.c
1185
error = bcma_erom_corecfg_fill_port_regions(erom, cfg, sp_num,
sys/dev/bhnd/bcma/bcma_erom.c
1194
error = bcma_erom_corecfg_fill_port_regions(erom, cfg, sp_num,
sys/dev/bhnd/bcma/bcma_erom.c
1225
error = bcma_erom_corecfg_fill_port_regions(erom, cfg, sp_num,
sys/dev/bhnd/bcma/bcma_erom.c
1245
*result = cfg;
sys/dev/bhnd/bcma/bcma_erom.c
1249
if (cfg != NULL)
sys/dev/bhnd/bcma/bcma_erom.c
1250
bcma_free_corecfg(cfg);
sys/dev/bhnd/bcma/bcma_subr.c
134
bcma_corecfg_get_port_list(struct bcma_corecfg *cfg, bhnd_port_type type)
sys/dev/bhnd/bcma/bcma_subr.c
138
return (&cfg->dev_ports);
sys/dev/bhnd/bcma/bcma_subr.c
141
return (&cfg->bridge_ports);
sys/dev/bhnd/bcma/bcma_subr.c
144
return (&cfg->wrapper_ports);
sys/dev/bhnd/bcma/bcma_subr.c
68
struct bcma_corecfg *cfg;
sys/dev/bhnd/bcma/bcma_subr.c
70
cfg = malloc(sizeof(*cfg), M_BHND, M_NOWAIT);
sys/dev/bhnd/bcma/bcma_subr.c
71
if (cfg == NULL)
sys/dev/bhnd/bcma/bcma_subr.c
74
cfg->core_info = (struct bhnd_core_info) {
sys/dev/bhnd/bcma/bcma_subr.c
82
STAILQ_INIT(&cfg->master_ports);
sys/dev/bhnd/bcma/bcma_subr.c
83
cfg->num_master_ports = 0;
sys/dev/bhnd/bcma/bcma_subr.c
85
STAILQ_INIT(&cfg->dev_ports);
sys/dev/bhnd/bcma/bcma_subr.c
86
cfg->num_dev_ports = 0;
sys/dev/bhnd/bcma/bcma_subr.c
88
STAILQ_INIT(&cfg->bridge_ports);
sys/dev/bhnd/bcma/bcma_subr.c
89
cfg->num_bridge_ports = 0;
sys/dev/bhnd/bcma/bcma_subr.c
91
STAILQ_INIT(&cfg->wrapper_ports);
sys/dev/bhnd/bcma/bcma_subr.c
92
cfg->num_wrapper_ports = 0;
sys/dev/bhnd/bcma/bcma_subr.c
94
return (cfg);
sys/dev/bhnd/bcma/bcmavar.h
88
struct bcma_sport_list *bcma_corecfg_get_port_list(struct bcma_corecfg *cfg,
sys/dev/bhnd/bhndb/bhndb.c
2098
hwcfg = sc->bus_res->cfg;
sys/dev/bhnd/bhndb/bhndb.c
255
for (regw = br->cfg->register_windows;
sys/dev/bhnd/bhndb/bhndb.c
543
hwcfg = hw->cfg;
sys/dev/bhnd/bhndb/bhndb.h
126
const struct bhndb_hwcfg *cfg; /**< associated hardware configuration */
sys/dev/bhnd/bhndb/bhndb_pci.c
1524
regwin_table = probe->hr->cfg->register_windows;
sys/dev/bhnd/bhndb/bhndb_pci.c
576
const struct bhndb_hwcfg *cfg;
sys/dev/bhnd/bhndb/bhndb_pci.c
580
cfg = bres->cfg;
sys/dev/bhnd/bhndb/bhndb_pci.c
582
sprom_win = bhndb_regwin_find_type(cfg->register_windows,
sys/dev/bhnd/bhndb/bhndb_pci.c
674
win = bhndb_regwin_find_core(sc->bhndb.bus_res->cfg->register_windows,
sys/dev/bhnd/bhndb/bhndb_pci_hwdata.c
69
.cfg = &bhndb_pci_hwcfg_ ## _vers \
sys/dev/bhnd/bhndb/bhndb_private.h
196
const struct bhndb_hwcfg *cfg; /**< hardware configuration */
sys/dev/bhnd/bhndb/bhndb_private.h
63
const struct bhndb_hwcfg *cfg);
sys/dev/bhnd/bhndb/bhndb_subr.c
267
const struct bhndb_hwcfg *cfg)
sys/dev/bhnd/bhndb/bhndb_subr.c
286
r->cfg = cfg;
sys/dev/bhnd/bhndb/bhndb_subr.c
344
r->dwa_count = bhndb_regwin_count(cfg->register_windows,
sys/dev/bhnd/bhndb/bhndb_subr.c
365
for (win = cfg->register_windows;
sys/dev/bhnd/bhndb/bhndb_subr.c
407
error = bhndb_alloc_host_resources(&r->res, dev, parent_dev, r->cfg);
sys/dev/bhnd/bhndb/bhndb_subr.c
661
hr->cfg = hwcfg;
sys/dev/bhnd/bhndb/bhndbvar.h
164
const struct bhndb_hwcfg *cfg; /**< bridge hardware configuration */
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
507
uint16_t cfg;
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
511
cfg = BHND_PCI_READ_2(sc, reg);
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
514
cfg |= BHND_PCIE_SRSH_ASPM_ENB;
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
516
cfg &= ~BHND_PCIE_SRSH_ASPM_ENB;
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
518
BHND_PCI_WRITE_2(sc, reg, cfg);
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
521
cfg = pcie_read_config(sc->pci_dev, PCIER_LINK_CTL, 2);
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
524
cfg |= PCIEM_LINK_CTL_ASPMC;
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
526
cfg &= ~PCIEM_LINK_CTL_ASPMC;
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
528
cfg &= ~PCIEM_LINK_CTL_ECPM; /* CLKREQ# */
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
530
pcie_write_config(sc->pci_dev, PCIER_LINK_CTL, cfg, 2);
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
534
cfg = BHND_PCI_READ_2(sc, reg);
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
537
cfg |= BHND_PCIE_SRSH_CLKREQ_ENB;
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
539
cfg &= ~BHND_PCIE_SRSH_CLKREQ_ENB;
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
541
BHND_PCI_WRITE_2(sc, reg, cfg);
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
547
uint16_t cfg;
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
551
cfg = BHND_PCI_READ_2(sc, reg);
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
554
if (!(cfg & BHND_PCIE_SRSH_L23READY_EXIT_NOPRST)) {
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
555
cfg |= BHND_PCIE_SRSH_L23READY_EXIT_NOPRST;
sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
556
BHND_PCI_WRITE_2(sc, reg, cfg);
sys/dev/bhnd/siba/siba.c
1020
struct siba_cfg_block *cfg;
sys/dev/bhnd/siba/siba.c
1035
cfg = siba_find_cfg_block(dinfo, port_type, port_num, region_num);
sys/dev/bhnd/siba/siba.c
1036
if (cfg != NULL)
sys/dev/bhnd/siba/siba.c
1037
return (cfg->cb_rid);
sys/dev/bhnd/siba/siba.c
1073
if (dinfo->cfg[i].cb_rid != rid)
sys/dev/bhnd/siba/siba.c
1092
struct siba_cfg_block *cfg;
sys/dev/bhnd/siba/siba.c
1111
cfg = siba_find_cfg_block(dinfo, port_type, port_num, region_num);
sys/dev/bhnd/siba/siba.c
1112
if (cfg != NULL) {
sys/dev/bhnd/siba/siba.c
1113
*addr = cfg->cb_base;
sys/dev/bhnd/siba/siba.c
1114
*size = cfg->cb_size;
sys/dev/bhnd/siba/siba.c
1214
dinfo->cfg[i] = ((struct siba_cfg_block) {
sys/dev/bhnd/siba/siba.c
128
const struct bhnd_core_info *cfg;
sys/dev/bhnd/siba/siba.c
132
cfg = &dinfo->core_id.core_info;
sys/dev/bhnd/siba/siba.c
136
*result = cfg->vendor;
sys/dev/bhnd/siba/siba.c
139
*result = cfg->device;
sys/dev/bhnd/siba/siba.c
142
*result = cfg->hwrev;
sys/dev/bhnd/siba/siba.c
145
*result = bhnd_core_class(cfg);
sys/dev/bhnd/siba/siba.c
148
*result = (uintptr_t) bhnd_vendor_name(cfg->vendor);
sys/dev/bhnd/siba/siba.c
151
*result = (uintptr_t) bhnd_core_name(cfg);
sys/dev/bhnd/siba/siba.c
154
*result = cfg->core_idx;
sys/dev/bhnd/siba/siba.c
157
*result = cfg->unit;
sys/dev/bhnd/siba/siba_erom.c
507
u_int addrspace, cfg;
sys/dev/bhnd/siba/siba_erom.c
532
error = siba_cfg_index(&sid, type, port, region, &cfg);
sys/dev/bhnd/siba/siba_erom.c
538
cfg_offset = SIBA_CFG_OFFSET(cfg);
sys/dev/bhnd/siba/siba_subr.c
237
siba_cfg_agent_port(u_int cfg)
sys/dev/bhnd/siba/siba_subr.c
250
siba_cfg_agent_region(u_int cfg)
sys/dev/bhnd/siba/siba_subr.c
253
return (cfg);
sys/dev/bhnd/siba/siba_subr.c
417
return (&dinfo->cfg[cfgidx]);
sys/dev/bhnd/siba/siba_subr.c
567
for (u_int i = 0; i < nitems(dinfo->cfg); i++) {
sys/dev/bhnd/siba/siba_subr.c
89
for (u_int i = 0; i < nitems(dinfo->cfg); i++) {
sys/dev/bhnd/siba/siba_subr.c
90
dinfo->cfg[i] = ((struct siba_cfg_block){
sys/dev/bhnd/siba/sibavar.h
101
u_int siba_cfg_agent_port(u_int cfg);
sys/dev/bhnd/siba/sibavar.h
102
u_int siba_cfg_agent_region(u_int cfg);
sys/dev/bhnd/siba/sibavar.h
210
struct siba_cfg_block cfg[SIBA_MAX_CFG]; /**< config block descriptors */
sys/dev/bnxt/bnxt_en/bnxt_dcb.c
176
for (i = 0; i < softc->max_tc; i++, data += sizeof(cos2bw.cfg)) {
sys/dev/bnxt/bnxt_en/bnxt_dcb.c
179
memcpy(&cos2bw.cfg, data, sizeof(cos2bw.cfg));
sys/dev/bnxt/bnxt_en/bnxt_dcb.h
57
struct_group_attr(cfg, __packed,
sys/dev/bnxt/bnxt_re/bnxt_re.h
291
struct_group_attr(cfg, __packed,
sys/dev/bnxt/bnxt_re/bnxt_re.h
673
struct bnxt_re_cos2bw_cfg *cfg);
sys/dev/bnxt/bnxt_re/bnxt_re.h
675
struct bnxt_re_cos2bw_cfg *cfg);
sys/dev/bnxt/bnxt_re/main.c
2923
struct bnxt_re_cos2bw_cfg *cfg)
sys/dev/bnxt/bnxt_re/main.c
2944
for (indx = 0; indx < 8; indx++, data += (sizeof(cfg->cfg))) {
sys/dev/bnxt/bnxt_re/main.c
2945
memcpy(&cfg->cfg, data, sizeof(cfg->cfg));
sys/dev/bnxt/bnxt_re/main.c
2947
cfg->queue_id = resp.queue_id0;
sys/dev/bnxt/bnxt_re/main.c
2948
cfg++;
sys/dev/bnxt/bnxt_re/main.c
2955
struct bnxt_re_cos2bw_cfg *cfg)
sys/dev/bnxt/bnxt_re/main.c
2974
if (cfg[indx].queue_id < 40) {
sys/dev/bnxt/bnxt_re/main.c
2980
data = (char *)&req.unused_0 + indx * (sizeof(*cfg) - 4);
sys/dev/bnxt/bnxt_re/main.c
2981
memcpy(data, &cfg[indx].queue_id, sizeof(*cfg) - 4);
sys/dev/bnxt/bnxt_re/main.c
2983
req.queue_id0 = cfg[0].queue_id;
sys/dev/bwn/if_bwn_pci.c
126
bwn_pci_find_devcfg(device_t dev, const struct bwn_pci_devcfg **cfg,
sys/dev/bwn/if_bwn_pci.c
137
if (cfg != NULL)
sys/dev/bwn/if_bwn_pci.c
138
*cfg = dvc;
sys/dev/cardbus/cardbus.c
142
cardbus_device_setup_regs(pcicfgregs *cfg)
sys/dev/cardbus/cardbus.c
144
device_t dev = cfg->dev;
sys/dev/cardbus/cardbus.c
154
cfg->intline =
sys/dev/cardbus/cardbus.c
156
pci_write_config(dev, PCIR_INTLINE, cfg->intline, 1);
sys/dev/cardbus/cardbus.c
198
if (dinfo->pci.cfg.mfdev)
sys/dev/cardbus/cardbus.c
207
dinfo->pci.cfg.dev = child;
sys/dev/cardbus/cardbus.c
213
pci_cfg_save(dinfo->pci.cfg.dev, &dinfo->pci, 0);
sys/dev/cardbus/cardbus.c
214
pci_cfg_restore(dinfo->pci.cfg.dev, &dinfo->pci);
sys/dev/cardbus/cardbus.c
216
cardbus_device_setup_regs(&dinfo->pci.cfg);
sys/dev/cardbus/cardbus.c
222
pci_cfg_save(dinfo->pci.cfg.dev, &dinfo->pci, 1);
sys/dev/cardbus/cardbus.c
236
if (dinfo->pci.cfg.dev != child)
sys/dev/cardbus/cardbus.c
289
dinfo->pci.cfg.domain, dinfo->pci.cfg.bus,
sys/dev/cardbus/cardbus.c
290
dinfo->pci.cfg.slot, dinfo->pci.cfg.func);
sys/dev/cardbus/cardbus.c
291
pci_cfg_restore(dinfo->pci.cfg.dev, &dinfo->pci);
sys/dev/cardbus/cardbus.c
75
static void cardbus_device_setup_regs(pcicfgregs *cfg);
sys/dev/cardbus/cardbus_device.c
115
minor = (device_get_unit(sc->sc_dev) << 8) + devi->pci.cfg.func;
sys/dev/cardbus/cardbus_device.c
118
"cardbus%d.%d.cis", unit, devi->pci.cfg.func);
sys/dev/cardbus/cardbus_device.c
119
if (devi->pci.cfg.func == 0)
sys/dev/cxgb/common/cxgb_mc5.c
481
u32 cfg = t3_read_reg(adapter, A_MC5_DB_CONFIG);
sys/dev/cxgb/common/cxgb_mc5.c
486
mc5->part_type = (unsigned char) G_TMTYPE(cfg);
sys/dev/cxgb/common/cxgb_mc5.c
487
if (cfg & F_TMTYPEHI)
sys/dev/cxgb/common/cxgb_mc5.c
490
mc5->tcam_size = tcam_part_size[G_TMPARTSIZE(cfg)];
sys/dev/cxgb/common/cxgb_t3_hw.c
4292
static unsigned int __devinit mc7_calc_size(u32 cfg)
sys/dev/cxgb/common/cxgb_t3_hw.c
4294
unsigned int width = G_WIDTH(cfg);
sys/dev/cxgb/common/cxgb_t3_hw.c
4295
unsigned int banks = !!(cfg & F_BKS) + 1;
sys/dev/cxgb/common/cxgb_t3_hw.c
4296
unsigned int org = !!(cfg & F_ORG) + 1;
sys/dev/cxgb/common/cxgb_t3_hw.c
4297
unsigned int density = G_DEN(cfg);
sys/dev/cxgb/common/cxgb_t3_hw.c
4306
u32 cfg;
sys/dev/cxgb/common/cxgb_t3_hw.c
4311
cfg = t3_read_reg(adapter, mc7->offset + A_MC7_CFG);
sys/dev/cxgb/common/cxgb_t3_hw.c
4312
mc7->size = G_DEN(cfg) == M_DEN ? 0 : mc7_calc_size(cfg);
sys/dev/cxgb/common/cxgb_t3_hw.c
4313
mc7->width = G_WIDTH(cfg);
sys/dev/cxgb/common/cxgb_xgmac.c
52
int cfg = t3_read_reg(adap, A_XGM_PORT_CFG + mac->offset);
sys/dev/cxgb/common/cxgb_xgmac.c
55
if (G_PORTSPEED(cfg) != 3) /* not running at 10G */
sys/dev/cxgb/common/cxgb_xgmac.c
736
u32 cfg, active, enforcepkt;
sys/dev/cxgb/common/cxgb_xgmac.c
741
cfg = t3_read_reg(adap, A_MPS_CFG);
sys/dev/cxgb/common/cxgb_xgmac.c
742
active = macidx(mac) ? cfg & F_PORT1ACTIVE : cfg & F_PORT0ACTIVE;
sys/dev/cxgb/common/cxgb_xgmac.c
743
enforcepkt = cfg & F_ENFORCEPKT;
sys/dev/cxgbe/common/t4_hw.c
12186
unsigned int cfg, val, idx;
sys/dev/cxgbe/common/t4_hw.c
12189
ret = t4_cim_read_core(adap, 1, coreid, A_UP_UP_DBG_LA_CFG, 1, &cfg);
sys/dev/cxgbe/common/t4_hw.c
12193
if (cfg & F_UPDBGLAEN) { /* LA is running, freeze it */
sys/dev/cxgbe/common/t4_hw.c
12239
if (cfg & F_UPDBGLAEN) {
sys/dev/cxgbe/common/t4_hw.c
12242
val = cfg & ~F_UPDBGLARDEN;
sys/dev/cxgbe/common/t4_hw.c
12265
unsigned int i, cfg, val, idx;
sys/dev/cxgbe/common/t4_hw.c
12267
cfg = t4_read_reg(adap, A_TP_DBG_LA_CONFIG) & 0xffff;
sys/dev/cxgbe/common/t4_hw.c
12268
if (cfg & F_DBGLAENABLE) /* freeze LA */
sys/dev/cxgbe/common/t4_hw.c
12270
adap->params.tp.la_mask | (cfg ^ F_DBGLAENABLE));
sys/dev/cxgbe/common/t4_hw.c
12294
if (cfg & F_DBGLAENABLE) /* restore running state */
sys/dev/cxgbe/common/t4_hw.c
12296
cfg | adap->params.tp.la_mask);
sys/dev/cxgbe/common/t4_hw.c
4429
u32 cfg, val, req, rsp;
sys/dev/cxgbe/common/t4_hw.c
4431
cfg = t4_read_reg(adap, A_CIM_DEBUGCFG);
sys/dev/cxgbe/common/t4_hw.c
4432
if (cfg & F_LADBGEN)
sys/dev/cxgbe/common/t4_hw.c
4433
t4_write_reg(adap, A_CIM_DEBUGCFG, cfg ^ F_LADBGEN);
sys/dev/cxgbe/common/t4_hw.c
4455
t4_write_reg(adap, A_CIM_DEBUGCFG, cfg);
sys/dev/cxgbe/common/t4_hw.c
4460
u32 cfg;
sys/dev/cxgbe/common/t4_hw.c
4463
cfg = t4_read_reg(adap, A_CIM_DEBUGCFG);
sys/dev/cxgbe/common/t4_hw.c
4464
if (cfg & F_LADBGEN)
sys/dev/cxgbe/common/t4_hw.c
4465
t4_write_reg(adap, A_CIM_DEBUGCFG, cfg ^ F_LADBGEN);
sys/dev/cxgbe/common/t4_hw.c
4476
t4_write_reg(adap, A_CIM_DEBUGCFG, cfg);
sys/dev/cxgbe/common/t4_hw.c
8339
u32 data_reg, mask_reg, cfg;
sys/dev/cxgbe/common/t4_hw.c
8366
cfg = t4_read_reg(adap, A_MPS_TRC_CFG);
sys/dev/cxgbe/common/t4_hw.c
8367
if (cfg & F_TRCMULTIFILTER) {
sys/dev/cxgbe/cudbg/cudbg_lib.c
2326
u32 cfg = 0;
sys/dev/cxgbe/cudbg/cudbg_lib.c
2338
size += sizeof(cfg);
sys/dev/cxgbe/cudbg/cudbg_lib.c
2344
rc = t4_cim_read(padap, A_UP_UP_DBG_LA_CFG, 1, &cfg);
sys/dev/cxgbe/cudbg/cudbg_lib.c
2354
memcpy((char *)scratch_buff.data + scratch_buff.offset, &cfg,
sys/dev/cxgbe/cudbg/cudbg_lib.c
2355
sizeof(cfg));
sys/dev/cxgbe/cudbg/cudbg_lib.c
2359
scratch_buff.offset + sizeof(cfg)), NULL);
sys/dev/cxgbe/t4_main.c
12122
uint32_t cfg, s1, s2;
sys/dev/cxgbe/t4_main.c
12131
cfg = t4_read_reg(sc, A_SGE_STAT_CFG);
sys/dev/cxgbe/t4_main.c
12143
if (G_STATSOURCE_T5(cfg) == 7) {
sys/dev/cxgbe/t4_main.c
12146
mode = is_t5(sc) ? G_STATMODE(cfg) : G_T6_STATMODE(cfg);
sys/dev/cxgbe/t4_main.c
12597
load_cfg(struct adapter *sc, struct t4_data *cfg)
sys/dev/cxgbe/t4_main.c
12611
if (cfg->len == 0) {
sys/dev/cxgbe/t4_main.c
12617
cfg_data = malloc(cfg->len, M_CXGBE, M_WAITOK);
sys/dev/cxgbe/t4_main.c
12619
rc = copyin(cfg->data, cfg_data, cfg->len);
sys/dev/cxgbe/t4_main.c
12621
rc = -t4_load_cfg(sc, cfg_data, cfg->len);
sys/dev/cxgbe/t4_main.c
5005
const struct firmware *cfg, *fw;
sys/dev/cxgbe/t4_main.c
5012
cfg = fw = NULL;
sys/dev/cxgbe/t4_main.c
5018
rc = load_fw_module(sc, &cfg, &fw);
sys/dev/cxgbe/t4_main.c
5024
rc, cfg, fw);
sys/dev/cxgbe/t4_main.c
5085
rc = load_fw_module(sc, &cfg, &fw);
sys/dev/cxgbe/t4_main.c
5089
rc, cfg, fw);
sys/dev/cxgbe/t4_main.c
5132
unload_fw_module(sc, cfg, fw);
sys/dev/cxgbe/t4_main.c
9538
sbuf_cim_la4(struct adapter *sc, struct sbuf *sb, uint32_t *buf, uint32_t cfg)
sys/dev/cxgbe/t4_main.c
9543
cfg & F_UPDBGLACAPTPCONLY ? "" :
sys/dev/cxgbe/t4_main.c
9547
if (cfg & F_UPDBGLACAPTPCONLY) {
sys/dev/cxgbe/t4_main.c
9568
sbuf_cim_la6(struct adapter *sc, struct sbuf *sb, uint32_t *buf, uint32_t cfg)
sys/dev/cxgbe/t4_main.c
9573
cfg & F_UPDBGLACAPTPCONLY ? "" :
sys/dev/cxgbe/t4_main.c
9577
if (cfg & F_UPDBGLACAPTPCONLY) {
sys/dev/cxgbe/t4_main.c
9602
uint32_t cfg, *buf;
sys/dev/cxgbe/t4_main.c
9616
&cfg);
sys/dev/cxgbe/t4_main.c
9623
sbuf_cim_la4(sc, sb, buf, cfg);
sys/dev/cxgbe/t4_main.c
9625
sbuf_cim_la6(sc, sb, buf, cfg);
sys/dev/dpaa/fman.c
262
fman_init(struct fman_softc *sc, struct fman_config *cfg)
sys/dev/dpaa/fman.c
273
muram_handle = FM_MURAM_ConfigAndInit(cfg->mem_base_addr +
sys/dev/dpaa/fman.c
276
device_printf(cfg->fman_device, "couldn't init FM MURAM module"
sys/dev/dpaa/fman.c
283
fm_params.fmId = cfg->fm_id;
sys/dev/dpaa/fman.c
287
fm_params.baseAddr = cfg->mem_base_addr;
sys/dev/dpaa/fman.c
302
fm_params.f_Exception = cfg->exception_callback;
sys/dev/dpaa/fman.c
303
fm_params.f_BusError = cfg->bus_error_callback;
sys/dev/dpaa/fman.c
304
fm_params.h_App = cfg->fman_device;
sys/dev/dpaa/fman.c
305
fm_params.irq = cfg->irq_num;
sys/dev/dpaa/fman.c
306
fm_params.errIrq = cfg->err_irq_num;
sys/dev/dpaa/fman.c
313
device_printf(cfg->fman_device, "couldn't configure FM "
sys/dev/dpaa/fman.c
322
device_printf(cfg->fman_device, "couldn't init FM module\n");
sys/dev/dpaa/fman.c
328
device_printf(cfg->fman_device, "couldn't get FM revision\n");
sys/dev/dpaa/fman.c
332
device_printf(cfg->fman_device, "Hardware version: %d.%d.\n",
sys/dev/dpaa/fman.c
416
struct fman_config cfg;
sys/dev/dpaa/fman.c
462
cfg.fman_device = dev;
sys/dev/dpaa/fman.c
463
cfg.fm_id = device_get_unit(dev);
sys/dev/dpaa/fman.c
464
cfg.mem_base_addr = rman_get_bushandle(sc->mem_res);
sys/dev/dpaa/fman.c
465
cfg.irq_num = (uintptr_t)sc->irq_res;
sys/dev/dpaa/fman.c
466
cfg.err_irq_num = (uintptr_t)sc->err_irq_res;
sys/dev/dpaa/fman.c
467
cfg.exception_callback = fman_exception_callback;
sys/dev/dpaa/fman.c
468
cfg.bus_error_callback = fman_error_callback;
sys/dev/dpaa/fman.c
470
sc->fm_handle = fman_init(sc, &cfg);
sys/dev/dpaa2/dpaa2_ni.c
3588
dpaa2_ni_prepare_key_cfg(struct dpkg_profile_cfg *cfg, uint8_t *key_cfg_buf)
sys/dev/dpaa2/dpaa2_ni.c
3594
if (cfg->num_extracts > DPKG_MAX_NUM_OF_EXTRACTS)
sys/dev/dpaa2/dpaa2_ni.c
3598
dpni_ext->num_extracts = cfg->num_extracts;
sys/dev/dpaa2/dpaa2_ni.c
3600
for (i = 0; i < cfg->num_extracts; i++) {
sys/dev/dpaa2/dpaa2_ni.c
3603
switch (cfg->extracts[i].type) {
sys/dev/dpaa2/dpaa2_ni.c
3605
extr->prot = cfg->extracts[i].extract.from_hdr.prot;
sys/dev/dpaa2/dpaa2_ni.c
3607
cfg->extracts[i].extract.from_hdr.type & 0x0Fu;
sys/dev/dpaa2/dpaa2_ni.c
3608
extr->size = cfg->extracts[i].extract.from_hdr.size;
sys/dev/dpaa2/dpaa2_ni.c
3609
extr->offset = cfg->extracts[i].extract.from_hdr.offset;
sys/dev/dpaa2/dpaa2_ni.c
3610
extr->field = cfg->extracts[i].extract.from_hdr.field;
sys/dev/dpaa2/dpaa2_ni.c
3612
cfg->extracts[i].extract.from_hdr.hdr_index;
sys/dev/dpaa2/dpaa2_ni.c
3615
extr->size = cfg->extracts[i].extract.from_data.size;
sys/dev/dpaa2/dpaa2_ni.c
3617
cfg->extracts[i].extract.from_data.offset;
sys/dev/dpaa2/dpaa2_ni.c
3620
extr->size = cfg->extracts[i].extract.from_parse.size;
sys/dev/dpaa2/dpaa2_ni.c
3622
cfg->extracts[i].extract.from_parse.offset;
sys/dev/dpaa2/dpaa2_ni.c
3628
extr->num_of_byte_masks = cfg->extracts[i].num_of_byte_masks;
sys/dev/dpaa2/dpaa2_ni.c
3629
extr->extract_type = cfg->extracts[i].type & 0x0Fu;
sys/dev/dpaa2/dpaa2_ni.c
3632
extr->masks[j].mask = cfg->extracts[i].masks[j].mask;
sys/dev/dpaa2/dpaa2_ni.c
3634
cfg->extracts[i].masks[j].offset;
sys/dev/dpaa2/dpaa2_rc.c
1336
struct dpaa2_ni_link_cfg *cfg)
sys/dev/dpaa2/dpaa2_rc.c
1348
if (portal == NULL || cmd == NULL || cfg == NULL)
sys/dev/dpaa2/dpaa2_rc.c
1352
args->rate = cfg->rate;
sys/dev/dpaa2/dpaa2_rc.c
1353
args->options = cfg->options;
sys/dev/dpaa2/dpaa2_rc.c
1354
args->adv_speeds = cfg->adv_speeds;
sys/dev/dpaa2/dpaa2_rc.c
1361
struct dpaa2_ni_link_cfg *cfg)
sys/dev/dpaa2/dpaa2_rc.c
1374
if (portal == NULL || cmd == NULL || cfg == NULL)
sys/dev/dpaa2/dpaa2_rc.c
1380
cfg->rate = resp->rate;
sys/dev/dpaa2/dpaa2_rc.c
1381
cfg->options = resp->options;
sys/dev/dpaa2/dpaa2_rc.c
1382
cfg->adv_speeds = resp->adv_speeds;
sys/dev/dpaa2/dpaa2_rc.c
1466
struct dpaa2_ni_pools_cfg *cfg)
sys/dev/dpaa2/dpaa2_rc.c
1479
if (portal == NULL || cmd == NULL || cfg == NULL)
sys/dev/dpaa2/dpaa2_rc.c
1485
args->pools_num = cfg->pools_num < DPAA2_NI_MAX_POOLS
sys/dev/dpaa2/dpaa2_rc.c
1486
? cfg->pools_num : DPAA2_NI_MAX_POOLS;
sys/dev/dpaa2/dpaa2_rc.c
1488
args->bp_obj_id[i] = cfg->pools[i].bp_obj_id;
sys/dev/dpaa2/dpaa2_rc.c
1489
args->buf_sz[i] = cfg->pools[i].buf_sz;
sys/dev/dpaa2/dpaa2_rc.c
1490
args->backup_pool_mask |= (cfg->pools[i].backup_flag & 1) << i;
sys/dev/dpaa2/dpaa2_rc.c
1498
struct dpaa2_ni_err_cfg *cfg)
sys/dev/dpaa2/dpaa2_rc.c
1506
if (portal == NULL || cmd == NULL || cfg == NULL)
sys/dev/dpaa2/dpaa2_rc.c
1512
args->err_mask = cfg->err_mask;
sys/dev/dpaa2/dpaa2_rc.c
1514
args->flags |= cfg->set_err_fas ? 0x10u : 0u;
sys/dev/dpaa2/dpaa2_rc.c
1515
args->flags |= ((uint8_t) cfg->action) & 0x0Fu;
sys/dev/dpaa2/dpaa2_rc.c
1522
struct dpaa2_ni_queue_cfg *cfg)
sys/dev/dpaa2/dpaa2_rc.c
1547
if (portal == NULL || cmd == NULL || cfg == NULL)
sys/dev/dpaa2/dpaa2_rc.c
1553
args->queue_type = (uint8_t) cfg->type;
sys/dev/dpaa2/dpaa2_rc.c
1554
args->tc = cfg->tc;
sys/dev/dpaa2/dpaa2_rc.c
1555
args->idx = cfg->idx;
sys/dev/dpaa2/dpaa2_rc.c
1556
args->chan_id = cfg->chan_id;
sys/dev/dpaa2/dpaa2_rc.c
1562
cfg->dest_id = resp->dest_id;
sys/dev/dpaa2/dpaa2_rc.c
1563
cfg->priority = resp->priority;
sys/dev/dpaa2/dpaa2_rc.c
1564
cfg->flow_ctx = resp->flc;
sys/dev/dpaa2/dpaa2_rc.c
1565
cfg->user_ctx = resp->user_ctx;
sys/dev/dpaa2/dpaa2_rc.c
1566
cfg->fqid = resp->fqid;
sys/dev/dpaa2/dpaa2_rc.c
1567
cfg->qdbin = resp->qdbin;
sys/dev/dpaa2/dpaa2_rc.c
1568
cfg->cgid = resp->cgid;
sys/dev/dpaa2/dpaa2_rc.c
1570
cfg->dest_type = (enum dpaa2_ni_dest_type) resp->flags & 0x0Fu;
sys/dev/dpaa2/dpaa2_rc.c
1571
cfg->cgid_valid = (resp->flags & 0x20u) > 0u ? true : false;
sys/dev/dpaa2/dpaa2_rc.c
1572
cfg->stash_control = (resp->flags & 0x40u) > 0u ? true : false;
sys/dev/dpaa2/dpaa2_rc.c
1573
cfg->hold_active = (resp->flags & 0x80u) > 0u ? true : false;
sys/dev/dpaa2/dpaa2_rc.c
1581
struct dpaa2_ni_queue_cfg *cfg)
sys/dev/dpaa2/dpaa2_rc.c
1601
if (portal == NULL || cmd == NULL || cfg == NULL)
sys/dev/dpaa2/dpaa2_rc.c
1607
args->queue_type = (uint8_t) cfg->type;
sys/dev/dpaa2/dpaa2_rc.c
1608
args->tc = cfg->tc;
sys/dev/dpaa2/dpaa2_rc.c
1609
args->idx = cfg->idx;
sys/dev/dpaa2/dpaa2_rc.c
1610
args->options = cfg->options;
sys/dev/dpaa2/dpaa2_rc.c
1611
args->dest_id = cfg->dest_id;
sys/dev/dpaa2/dpaa2_rc.c
1612
args->priority = cfg->priority;
sys/dev/dpaa2/dpaa2_rc.c
1613
args->flc = cfg->flow_ctx;
sys/dev/dpaa2/dpaa2_rc.c
1614
args->user_ctx = cfg->user_ctx;
sys/dev/dpaa2/dpaa2_rc.c
1615
args->cgid = cfg->cgid;
sys/dev/dpaa2/dpaa2_rc.c
1616
args->chan_id = cfg->chan_id;
sys/dev/dpaa2/dpaa2_rc.c
1618
args->flags |= (uint8_t)(cfg->dest_type & 0x0Fu);
sys/dev/dpaa2/dpaa2_rc.c
1619
args->flags |= cfg->stash_control ? 0x40u : 0u;
sys/dev/dpaa2/dpaa2_rc.c
1620
args->flags |= cfg->hold_active ? 0x80u : 0u;
sys/dev/dpaa2/dpaa2_rc.c
2622
struct dpaa2_con_notif_cfg *cfg)
sys/dev/dpaa2/dpaa2_rc.c
2634
if (portal == NULL || cmd == NULL || cfg == NULL)
sys/dev/dpaa2/dpaa2_rc.c
2638
args->dpio_id = cfg->dpio_id;
sys/dev/dpaa2/dpaa2_rc.c
2639
args->prior = cfg->prior;
sys/dev/dpaa2/dpaa2_rc.c
2640
args->ctx = cfg->qman_ctx;
sys/dev/dpaa2/dpaa2_swp.c
1015
map = swp->cfg.writes_cinh ? swp->cinh_map : swp->cena_map;
sys/dev/dpaa2/dpaa2_swp.c
1016
offset = swp->cfg.mem_backed
sys/dev/dpaa2/dpaa2_swp.c
1028
if (swp->cfg.mem_backed) {
sys/dev/dpaa2/dpaa2_swp.c
1100
map = swp->cfg.writes_cinh ? swp->cinh_map : swp->cena_map;
sys/dev/dpaa2/dpaa2_swp.c
1101
offset = swp->cfg.mem_backed ? DPAA2_SWP_CENA_CR_MEM : DPAA2_SWP_CENA_CR;
sys/dev/dpaa2/dpaa2_swp.c
1111
if (swp->cfg.mem_backed) {
sys/dev/dpaa2/dpaa2_swp.c
1127
struct resource_map *map = swp->cfg.mem_backed
sys/dev/dpaa2/dpaa2_swp.c
1130
const uint32_t offset = swp->cfg.mem_backed
sys/dev/dpaa2/dpaa2_swp.c
1138
if (swp->cfg.mem_backed) {
sys/dev/dpaa2/dpaa2_swp.c
200
p->cfg.mem_backed = false;
sys/dev/dpaa2/dpaa2_swp.c
201
p->cfg.writes_cinh = true;
sys/dev/dpaa2/dpaa2_swp.c
645
uint32_t offset = swp->cfg.mem_backed
sys/dev/dpaa2/dpaa2_swp.c
835
map = swp->cfg.writes_cinh ? swp->cinh_map : swp->cena_map;
sys/dev/dpaa2/dpaa2_swp.c
836
ci_offset = swp->cfg.mem_backed
sys/dev/dpaa2/dpaa2_swp.c
962
map = swp->cfg.writes_cinh ? swp->cinh_map : swp->cena_map;
sys/dev/dpaa2/dpaa2_swp.c
963
offset = swp->cfg.mem_backed
sys/dev/dpaa2/dpaa2_swp.c
976
if (swp->cfg.mem_backed) {
sys/dev/dpaa2/dpaa2_swp.h
412
} cfg; /* Software portal configuration. */
sys/dev/dpaa2/memac_mdio_common.c
192
uint32_t cfg, ctl, val;
sys/dev/dpaa2/memac_mdio_common.c
195
cfg = memac_read_4(sc, MDIO_CFG);
sys/dev/dpaa2/memac_mdio_common.c
197
cfg &= ~MDIO_CFG_ENC45; /* Use Clause 22 */
sys/dev/dpaa2/memac_mdio_common.c
198
memac_write_4(sc, MDIO_CFG, cfg);
sys/dev/dpaa2/memac_mdio_common.c
213
cfg = memac_read_4(sc, MDIO_CFG);
sys/dev/dpaa2/memac_mdio_common.c
214
if (cfg & MDIO_CFG_MDIO_RD_ER)
sys/dev/dpaa2/memac_mdio_common.c
230
uint32_t cfg, ctl, val;
sys/dev/dpaa2/memac_mdio_common.c
237
cfg = memac_read_4(sc, MDIO_CFG);
sys/dev/dpaa2/memac_mdio_common.c
239
cfg &= ~MDIO_CFG_ENC45; /* Use Clause 22 */
sys/dev/dpaa2/memac_mdio_common.c
240
memac_write_4(sc, MDIO_CFG, cfg);
sys/dev/etherswitch/arswitch/arswitch_8327.c
184
ar8327_get_pad_cfg(struct ar8327_pad_cfg *cfg)
sys/dev/etherswitch/arswitch/arswitch_8327.c
188
if (!cfg)
sys/dev/etherswitch/arswitch/arswitch_8327.c
192
switch (cfg->mode) {
sys/dev/etherswitch/arswitch/arswitch_8327.c
198
if (cfg->rxclk_sel)
sys/dev/etherswitch/arswitch/arswitch_8327.c
200
if (cfg->txclk_sel)
sys/dev/etherswitch/arswitch/arswitch_8327.c
206
if (cfg->rxclk_sel)
sys/dev/etherswitch/arswitch/arswitch_8327.c
208
if (cfg->txclk_sel)
sys/dev/etherswitch/arswitch/arswitch_8327.c
221
t |= cfg->txclk_delay_sel << AR8327_PAD_RGMII_TXCLK_DELAY_SEL_S;
sys/dev/etherswitch/arswitch/arswitch_8327.c
222
t |= cfg->rxclk_delay_sel << AR8327_PAD_RGMII_RXCLK_DELAY_SEL_S;
sys/dev/etherswitch/arswitch/arswitch_8327.c
223
if (cfg->rxclk_delay_en)
sys/dev/etherswitch/arswitch/arswitch_8327.c
225
if (cfg->txclk_delay_en)
sys/dev/etherswitch/arswitch/arswitch_8327.c
228
if (cfg->sgmii_delay_en)
sys/dev/etherswitch/arswitch/arswitch_8327.c
235
if (cfg->rxclk_sel)
sys/dev/etherswitch/arswitch/arswitch_8327.c
237
if (cfg->txclk_sel)
sys/dev/etherswitch/arswitch/arswitch_8327.c
243
if (cfg->pipe_rxclk_sel)
sys/dev/etherswitch/arswitch/arswitch_8327.c
245
if (cfg->rxclk_sel)
sys/dev/etherswitch/arswitch/arswitch_8327.c
247
if (cfg->txclk_sel)
sys/dev/etherswitch/arswitch/arswitch_8327.c
253
t |= cfg->txclk_delay_sel << AR8327_PAD_RGMII_TXCLK_DELAY_SEL_S;
sys/dev/etherswitch/arswitch/arswitch_8327.c
254
t |= cfg->rxclk_delay_sel << AR8327_PAD_RGMII_RXCLK_DELAY_SEL_S;
sys/dev/etherswitch/arswitch/arswitch_8327.c
255
if (cfg->rxclk_delay_en)
sys/dev/etherswitch/arswitch/arswitch_8327.c
257
if (cfg->txclk_delay_en)
sys/dev/etherswitch/arswitch/arswitch_8327.c
282
ar8327_get_port_init_status(struct ar8327_port_cfg *cfg)
sys/dev/etherswitch/arswitch/arswitch_8327.c
286
if (!cfg->force_link)
sys/dev/etherswitch/arswitch/arswitch_8327.c
290
t |= cfg->duplex ? AR8X16_PORT_STS_DUPLEX : 0;
sys/dev/etherswitch/arswitch/arswitch_8327.c
291
t |= cfg->rxpause ? AR8X16_PORT_STS_RXFLOW : 0;
sys/dev/etherswitch/arswitch/arswitch_8327.c
292
t |= cfg->txpause ? AR8X16_PORT_STS_TXFLOW : 0;
sys/dev/etherswitch/arswitch/arswitch_8327.c
294
switch (cfg->speed) {
sys/dev/ice/ice_adminq_cmd.h
1619
u8 cfg;
sys/dev/ice/ice_adminq_cmd.h
3130
} cfg;
sys/dev/ice/ice_common.c
3618
struct ice_aqc_set_phy_cfg_data *cfg, struct ice_sq_cd *cd)
sys/dev/ice/ice_common.c
3623
if (!cfg)
sys/dev/ice/ice_common.c
3627
if (cfg->caps & ~ICE_AQ_PHY_ENA_VALID_MASK) {
sys/dev/ice/ice_common.c
3629
cfg->caps);
sys/dev/ice/ice_common.c
3631
cfg->caps &= ICE_AQ_PHY_ENA_VALID_MASK;
sys/dev/ice/ice_common.c
3640
(unsigned long long)LE64_TO_CPU(cfg->phy_type_low));
sys/dev/ice/ice_common.c
3642
(unsigned long long)LE64_TO_CPU(cfg->phy_type_high));
sys/dev/ice/ice_common.c
3643
ice_debug(hw, ICE_DBG_LINK, " caps = 0x%x\n", cfg->caps);
sys/dev/ice/ice_common.c
3645
cfg->low_power_ctrl_an);
sys/dev/ice/ice_common.c
3646
ice_debug(hw, ICE_DBG_LINK, " eee_cap = 0x%x\n", cfg->eee_cap);
sys/dev/ice/ice_common.c
3647
ice_debug(hw, ICE_DBG_LINK, " eeer_value = 0x%x\n", cfg->eeer_value);
sys/dev/ice/ice_common.c
3649
cfg->link_fec_opt);
sys/dev/ice/ice_common.c
3651
status = ice_aq_send_cmd(hw, &desc, cfg, sizeof(*cfg), cd);
sys/dev/ice/ice_common.c
3657
pi->phy.curr_user_phy_cfg = *cfg;
sys/dev/ice/ice_common.c
3794
ice_cfg_phy_fc(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
sys/dev/ice/ice_common.c
3800
if (!pi || !cfg)
sys/dev/ice/ice_common.c
3843
cfg->caps &= ~(ICE_AQC_PHY_EN_TX_LINK_PAUSE |
sys/dev/ice/ice_common.c
3847
cfg->caps |= pause_mask;
sys/dev/ice/ice_common.c
3867
struct ice_aqc_set_phy_cfg_data cfg = { 0 };
sys/dev/ice/ice_common.c
3892
ice_copy_phy_caps_to_cfg(pi, pcaps, &cfg);
sys/dev/ice/ice_common.c
3895
status = ice_cfg_phy_fc(pi, &cfg, pi->fc.req_mode);
sys/dev/ice/ice_common.c
3904
if (cfg.caps != pcaps->caps) {
sys/dev/ice/ice_common.c
3909
cfg.caps |= ICE_AQ_PHY_ENA_AUTO_LINK_UPDT;
sys/dev/ice/ice_common.c
3911
status = ice_aq_set_phy_cfg(hw, pi, &cfg, NULL);
sys/dev/ice/ice_common.c
3988
struct ice_aqc_set_phy_cfg_data *cfg)
sys/dev/ice/ice_common.c
3990
if (!pi || !caps || !cfg)
sys/dev/ice/ice_common.c
3993
ice_memset(cfg, 0, sizeof(*cfg), ICE_NONDMA_MEM);
sys/dev/ice/ice_common.c
3994
cfg->phy_type_low = caps->phy_type_low;
sys/dev/ice/ice_common.c
3995
cfg->phy_type_high = caps->phy_type_high;
sys/dev/ice/ice_common.c
3996
cfg->caps = caps->caps;
sys/dev/ice/ice_common.c
3997
cfg->low_power_ctrl_an = caps->low_power_ctrl_an;
sys/dev/ice/ice_common.c
3998
cfg->eee_cap = caps->eee_cap;
sys/dev/ice/ice_common.c
3999
cfg->eeer_value = caps->eeer_value;
sys/dev/ice/ice_common.c
4000
cfg->link_fec_opt = caps->link_fec_options;
sys/dev/ice/ice_common.c
4001
cfg->module_compliance_enforcement =
sys/dev/ice/ice_common.c
4012
ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
sys/dev/ice/ice_common.c
4019
if (!pi || !cfg)
sys/dev/ice/ice_common.c
4037
cfg->caps |= (pcaps->caps & ICE_AQC_PHY_EN_AUTO_FEC);
sys/dev/ice/ice_common.c
4038
cfg->link_fec_opt = pcaps->link_fec_options;
sys/dev/ice/ice_common.c
4045
cfg->link_fec_opt &= ICE_AQC_PHY_FEC_10G_KR_40G_KR4_EN |
sys/dev/ice/ice_common.c
4047
cfg->link_fec_opt |= ICE_AQC_PHY_FEC_10G_KR_40G_KR4_REQ |
sys/dev/ice/ice_common.c
4054
cfg->link_fec_opt &= ICE_AQC_PHY_FEC_25G_RS_CLAUSE91_EN;
sys/dev/ice/ice_common.c
4055
cfg->link_fec_opt |= ICE_AQC_PHY_FEC_25G_RS_528_REQ |
sys/dev/ice/ice_common.c
4060
cfg->link_fec_opt &= ~ICE_AQC_PHY_FEC_MASK;
sys/dev/ice/ice_common.c
4068
cfg->link_fec_opt |= ICE_AQC_PHY_FEC_DIS;
sys/dev/ice/ice_common.c
4072
cfg->caps &= ICE_AQC_PHY_CAPS_MASK;
sys/dev/ice/ice_common.c
4073
cfg->link_fec_opt |= pcaps->link_fec_options;
sys/dev/ice/ice_common.c
4089
cfg->link_fec_opt = tlv.fec_options;
sys/dev/ice/ice_common.c
725
li->fec_info = link_data.cfg & ICE_AQ_FEC_MASK;
sys/dev/ice/ice_common.c
727
li->pacing = link_data.cfg & (ICE_AQ_CFG_PACING_M |
sys/dev/ice/ice_common.h
212
struct ice_aqc_set_phy_cfg_data *cfg, struct ice_sq_cd *cd);
sys/dev/ice/ice_common.h
228
struct ice_aqc_set_phy_cfg_data *cfg);
sys/dev/ice/ice_common.h
232
struct ice_aqc_set_phy_cfg_data *cfg);
sys/dev/ice/ice_common.h
234
ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
sys/dev/ice/ice_flow.c
1279
const struct ice_rss_hash_cfg *cfg)
sys/dev/ice/ice_flow.c
1288
ice_for_each_set_bit(i, (const ice_bitmap_t *)&cfg->hash_flds,
sys/dev/ice/ice_flow.c
1294
ICE_FLOW_SET_HDRS(seg, cfg->addl_hdrs);
sys/dev/ice/ice_flow.c
1297
if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV4)
sys/dev/ice/ice_flow.c
1301
else if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV6)
sys/dev/ice/ice_flow.c
1305
else if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV4_GRE)
sys/dev/ice/ice_flow.c
1309
else if (cfg->hdr_type == ICE_RSS_INNER_HEADERS_W_OUTER_IPV6_GRE)
sys/dev/ice/ice_flow.c
1509
rss_cfg->hash.symm = prof->cfg.symm;
sys/dev/ice/ice_flow.c
1549
const struct ice_rss_hash_cfg *cfg)
sys/dev/ice/ice_flow.c
1557
if (cfg->symm)
sys/dev/ice/ice_flow.c
1560
segs_cnt = (cfg->hdr_type == ICE_RSS_OUTER_HEADERS) ?
sys/dev/ice/ice_flow.c
1570
status = ice_flow_set_rss_seg_info(segs, segs_cnt, cfg);
sys/dev/ice/ice_flow.c
1624
ICE_FLOW_GEN_PROFID(cfg->hash_flds,
sys/dev/ice/ice_flow.c
1626
cfg->hdr_type),
sys/dev/ice/ice_flow.c
1642
prof->cfg.symm = cfg->symm;
sys/dev/ice/ice_flow.c
1661
const struct ice_rss_hash_cfg *cfg)
sys/dev/ice/ice_flow.c
1666
if (!ice_is_vsi_valid(hw, vsi_handle) || !cfg ||
sys/dev/ice/ice_flow.c
1667
cfg->hdr_type > ICE_RSS_ANY_HEADERS ||
sys/dev/ice/ice_flow.c
1668
cfg->hash_flds == ICE_HASH_INVALID)
sys/dev/ice/ice_flow.c
1672
local_cfg = *cfg;
sys/dev/ice/ice_flow.c
1673
if (cfg->hdr_type < ICE_RSS_ANY_HEADERS) {
sys/dev/ice/ice_flow.c
1699
const struct ice_rss_hash_cfg *cfg)
sys/dev/ice/ice_flow.c
1707
segs_cnt = (cfg->hdr_type == ICE_RSS_OUTER_HEADERS) ?
sys/dev/ice/ice_flow.c
1716
status = ice_flow_set_rss_seg_info(segs, segs_cnt, cfg);
sys/dev/ice/ice_flow.c
1759
const struct ice_rss_hash_cfg *cfg)
sys/dev/ice/ice_flow.c
1764
if (!ice_is_vsi_valid(hw, vsi_handle) || !cfg ||
sys/dev/ice/ice_flow.c
1765
cfg->hdr_type > ICE_RSS_ANY_HEADERS ||
sys/dev/ice/ice_flow.c
1766
cfg->hash_flds == ICE_HASH_INVALID)
sys/dev/ice/ice_flow.c
1770
local_cfg = *cfg;
sys/dev/ice/ice_flow.c
1771
if (cfg->hdr_type < ICE_RSS_ANY_HEADERS) {
sys/dev/ice/ice_flow.h
290
} cfg;
sys/dev/ice/ice_flow.h
349
const struct ice_rss_hash_cfg *cfg);
sys/dev/ice/ice_flow.h
352
const struct ice_rss_hash_cfg *cfg);
sys/dev/ice/ice_fw_logging.c
153
struct ice_fwlog_cfg *cfg = &sc->hw.fwlog_cfg;
sys/dev/ice/ice_fw_logging.c
158
enabled = !!(cfg->options & option);
sys/dev/ice/ice_fw_logging.c
165
cfg->options |= option;
sys/dev/ice/ice_fw_logging.c
167
cfg->options &= ~option;
sys/dev/ice/ice_fw_logging.c
169
return ice_reconfig_fw_log(sc, cfg);
sys/dev/ice/ice_fw_logging.c
188
struct ice_fwlog_cfg *cfg = &sc->hw.fwlog_cfg;
sys/dev/ice/ice_fw_logging.c
194
resolution = cfg->log_resolution;
sys/dev/ice/ice_fw_logging.c
206
cfg->log_resolution = resolution;
sys/dev/ice/ice_fw_logging.c
208
return ice_reconfig_fw_log(sc, cfg);
sys/dev/ice/ice_fw_logging.c
225
struct ice_fwlog_cfg *cfg = &sc->hw.fwlog_cfg;
sys/dev/ice/ice_fw_logging.c
237
if (cfg->options & ICE_FWLOG_OPTION_IS_REGISTERED)
sys/dev/ice/ice_fw_logging.c
276
struct ice_fwlog_cfg *cfg = &sc->hw.fwlog_cfg;
sys/dev/ice/ice_fw_logging.c
285
log_level = cfg->module_entries[module].log_level;
sys/dev/ice/ice_fw_logging.c
327
cfg->module_entries[module].log_level = log_level;
sys/dev/ice/ice_fw_logging.c
329
return ice_reconfig_fw_log(sc, cfg);
sys/dev/ice/ice_fw_logging.c
348
struct ice_fwlog_cfg *cfg;
sys/dev/ice/ice_fw_logging.c
353
cfg = &hw->fwlog_cfg;
sys/dev/ice/ice_fw_logging.c
382
cfg->module_entries[i].module_id = i;
sys/dev/ice/ice_fw_logging.c
383
cfg->module_entries[i].log_level = ICE_FWLOG_LEVEL_NONE;
sys/dev/ice/ice_fw_logging.c
393
cfg->log_resolution = 10;
sys/dev/ice/ice_fw_logging.c
399
cfg->options |= ICE_FWLOG_OPTION_ARQ_ENA;
sys/dev/ice/ice_fw_logging.c
59
static int ice_reconfig_fw_log(struct ice_softc *sc, struct ice_fwlog_cfg *cfg);
sys/dev/ice/ice_fw_logging.c
80
ice_reconfig_fw_log(struct ice_softc *sc, struct ice_fwlog_cfg *cfg)
sys/dev/ice/ice_fw_logging.c
84
ice_fwlog_init(&sc->hw, cfg);
sys/dev/ice/ice_fw_logging.c
92
status = ice_fwlog_set(&sc->hw, cfg);
sys/dev/ice/ice_fwlog.c
100
if (cfg->log_resolution < ICE_AQC_FW_LOG_MIN_RESOLUTION ||
sys/dev/ice/ice_fwlog.c
101
cfg->log_resolution > ICE_AQC_FW_LOG_MAX_RESOLUTION) {
sys/dev/ice/ice_fwlog.c
103
cfg->log_resolution, ICE_AQC_FW_LOG_MIN_RESOLUTION,
sys/dev/ice/ice_fwlog.c
108
if (!valid_module_entries(hw, cfg->module_entries,
sys/dev/ice/ice_fwlog.c
125
ice_fwlog_init(struct ice_hw *hw, struct ice_fwlog_cfg *cfg)
sys/dev/ice/ice_fwlog.c
127
if (!valid_cfg(hw, cfg))
sys/dev/ice/ice_fwlog.c
130
cache_cfg(hw, cfg);
sys/dev/ice/ice_fwlog.c
170
cmd->ops.cfg.log_resolution = CPU_TO_LE16(log_resolution);
sys/dev/ice/ice_fwlog.c
171
cmd->ops.cfg.mdl_cnt = CPU_TO_LE16(num_entries);
sys/dev/ice/ice_fwlog.c
213
ice_fwlog_set(struct ice_hw *hw, struct ice_fwlog_cfg *cfg)
sys/dev/ice/ice_fwlog.c
220
if (!valid_cfg(hw, cfg))
sys/dev/ice/ice_fwlog.c
223
status = ice_aq_fwlog_set(hw, cfg->module_entries,
sys/dev/ice/ice_fwlog.c
224
ICE_AQC_FW_LOG_ID_MAX, cfg->options,
sys/dev/ice/ice_fwlog.c
225
cfg->log_resolution);
sys/dev/ice/ice_fwlog.c
227
cache_cfg(hw, cfg);
sys/dev/ice/ice_fwlog.c
277
struct ice_fwlog_cfg *cfg;
sys/dev/ice/ice_fwlog.c
286
cfg = (struct ice_fwlog_cfg *)ice_calloc(hw, 1, sizeof(*cfg));
sys/dev/ice/ice_fwlog.c
287
if (!cfg)
sys/dev/ice/ice_fwlog.c
290
status = ice_fwlog_get(hw, cfg);
sys/dev/ice/ice_fwlog.c
294
status = ice_aq_fwlog_set(hw, entries, num_entries, cfg->options,
sys/dev/ice/ice_fwlog.c
295
cfg->log_resolution);
sys/dev/ice/ice_fwlog.c
300
ice_free(hw, cfg);
sys/dev/ice/ice_fwlog.c
370
ice_aq_fwlog_get(struct ice_hw *hw, struct ice_fwlog_cfg *cfg)
sys/dev/ice/ice_fwlog.c
379
ice_memset(cfg, 0, sizeof(*cfg), ICE_NONDMA_MEM);
sys/dev/ice/ice_fwlog.c
396
module_id_cnt = LE16_TO_CPU(cmd->ops.cfg.mdl_cnt);
sys/dev/ice/ice_fwlog.c
406
cfg->log_resolution = LE16_TO_CPU(cmd->ops.cfg.log_resolution);
sys/dev/ice/ice_fwlog.c
408
cfg->options |= ICE_FWLOG_OPTION_ARQ_ENA;
sys/dev/ice/ice_fwlog.c
41
static void cache_cfg(struct ice_hw *hw, struct ice_fwlog_cfg *cfg)
sys/dev/ice/ice_fwlog.c
410
cfg->options |= ICE_FWLOG_OPTION_UART_ENA;
sys/dev/ice/ice_fwlog.c
412
cfg->options |= ICE_FWLOG_OPTION_IS_REGISTERED;
sys/dev/ice/ice_fwlog.c
419
cfg->module_entries[i].module_id =
sys/dev/ice/ice_fwlog.c
421
cfg->module_entries[i].log_level = fw_module->log_level;
sys/dev/ice/ice_fwlog.c
43
hw->fwlog_cfg = *cfg;
sys/dev/ice/ice_fwlog.c
441
struct ice_fwlog_cfg *cfg;
sys/dev/ice/ice_fwlog.c
446
cfg = (struct ice_fwlog_cfg *)ice_calloc(hw, 1, sizeof(*cfg));
sys/dev/ice/ice_fwlog.c
447
if (!cfg)
sys/dev/ice/ice_fwlog.c
454
status = ice_aq_fwlog_get(hw, cfg);
sys/dev/ice/ice_fwlog.c
461
ice_free(hw, cfg);
sys/dev/ice/ice_fwlog.c
470
ice_fwlog_get(struct ice_hw *hw, struct ice_fwlog_cfg *cfg)
sys/dev/ice/ice_fwlog.c
477
if (!cfg)
sys/dev/ice/ice_fwlog.c
480
status = ice_aq_fwlog_get(hw, cfg);
sys/dev/ice/ice_fwlog.c
484
cache_cfg(hw, cfg);
sys/dev/ice/ice_fwlog.c
93
static bool valid_cfg(struct ice_hw *hw, struct ice_fwlog_cfg *cfg)
sys/dev/ice/ice_fwlog.c
95
if (!cfg) {
sys/dev/ice/ice_fwlog.h
79
int ice_fwlog_init(struct ice_hw *hw, struct ice_fwlog_cfg *cfg);
sys/dev/ice/ice_fwlog.h
80
int ice_fwlog_set(struct ice_hw *hw, struct ice_fwlog_cfg *cfg);
sys/dev/ice/ice_fwlog.h
81
int ice_fwlog_get(struct ice_hw *hw, struct ice_fwlog_cfg *cfg);
sys/dev/ice/ice_lib.c
141
struct ice_aqc_set_phy_cfg_data *cfg);
sys/dev/ice/ice_lib.c
144
struct ice_aqc_set_phy_cfg_data *cfg);
sys/dev/ice/ice_lib.c
147
struct ice_aqc_set_phy_cfg_data *cfg);
sys/dev/ice/ice_lib.c
3634
struct ice_aqc_set_phy_cfg_data cfg = { 0 };
sys/dev/ice/ice_lib.c
3665
ice_copy_phy_caps_to_cfg(hw->port_info, &pcaps, &cfg);
sys/dev/ice/ice_lib.c
3668
cfg.phy_type_high = types & hw->port_info->phy.phy_type_high;
sys/dev/ice/ice_lib.c
3670
cfg.phy_type_low = types & hw->port_info->phy.phy_type_low;
sys/dev/ice/ice_lib.c
3671
cfg.caps |= ICE_AQ_PHY_ENA_AUTO_LINK_UPDT;
sys/dev/ice/ice_lib.c
3673
status = ice_aq_set_phy_cfg(hw, hw->port_info, &cfg, NULL);
sys/dev/ice/ice_lib.c
9559
struct ice_aqc_set_phy_cfg_data *cfg)
sys/dev/ice/ice_lib.c
9659
cfg->phy_type_low = htole64(phy_low);
sys/dev/ice/ice_lib.c
9660
cfg->phy_type_high = htole64(phy_high);
sys/dev/ice/ice_lib.c
9676
struct ice_aqc_set_phy_cfg_data *cfg)
sys/dev/ice/ice_lib.c
9681
cfg->caps &= ~ICE_AQC_PHY_EN_AUTO_FEC;
sys/dev/ice/ice_lib.c
9682
status = ice_cfg_phy_fec(pi, cfg, pi->phy.curr_user_fec_req);
sys/dev/ice/ice_lib.c
9700
struct ice_aqc_set_phy_cfg_data *cfg)
sys/dev/ice/ice_lib.c
9702
cfg->caps &= ~(ICE_AQ_PHY_ENA_TX_PAUSE_ABILITY |
sys/dev/ice/ice_lib.c
9707
cfg->caps |= ICE_AQ_PHY_ENA_TX_PAUSE_ABILITY |
sys/dev/ice/ice_lib.c
9711
cfg->caps |= ICE_AQ_PHY_ENA_RX_PAUSE_ABILITY;
sys/dev/ice/ice_lib.c
9714
cfg->caps |= ICE_AQ_PHY_ENA_TX_PAUSE_ABILITY;
sys/dev/ice/ice_lib.c
9739
struct ice_aqc_set_phy_cfg_data cfg = { 0 };
sys/dev/ice/ice_lib.c
9772
ice_copy_phy_caps_to_cfg(pi, &pcaps, &cfg);
sys/dev/ice/ice_lib.c
9776
ice_apply_saved_phy_req_to_cfg(sc, &cfg)) {
sys/dev/ice/ice_lib.c
9778
cfg.phy_type_low = pcaps.phy_type_low;
sys/dev/ice/ice_lib.c
9779
cfg.phy_type_high = pcaps.phy_type_high;
sys/dev/ice/ice_lib.c
9782
ice_apply_saved_fec_req_to_cfg(sc, &cfg)) {
sys/dev/ice/ice_lib.c
9788
ice_apply_saved_fc_req_to_cfg(pi, &cfg);
sys/dev/ice/ice_lib.c
9792
cfg.caps |= ICE_AQ_PHY_ENA_AUTO_LINK_UPDT | ICE_AQ_PHY_ENA_LINK;
sys/dev/ice/ice_lib.c
9794
status = ice_aq_set_phy_cfg(hw, pi, &cfg, NULL);
sys/dev/ice/virtchnl.h
1948
struct virtchnl_queue_bw cfg[1];
sys/dev/ice/virtchnl.h
2069
struct virtchnl_hqos_cfg cfg[1];
sys/dev/ice/virtchnl.h
2324
sizeof(q_bw->cfg[0]);
sys/dev/ichiic/ig4_iic.c
1007
if (sc->cfg.txfifo_depth == 0) {
sys/dev/ichiic/ig4_iic.c
1010
sc->cfg.txfifo_depth =
sys/dev/ichiic/ig4_iic.c
1014
if (sc->cfg.rxfifo_depth == 0) {
sys/dev/ichiic/ig4_iic.c
1017
sc->cfg.rxfifo_depth =
sys/dev/ichiic/ig4_iic.c
1023
sc->cfg.rxfifo_depth, sc->cfg.txfifo_depth);
sys/dev/ichiic/ig4_iic.c
442
burst = sc->cfg.txfifo_depth -
sys/dev/ichiic/ig4_iic.c
449
burst = sc->cfg.txfifo_depth -
sys/dev/ichiic/ig4_iic.c
453
burst = MIN(burst, sc->cfg.rxfifo_depth -
sys/dev/ichiic/ig4_iic.c
503
burst = sc->cfg.txfifo_depth -
sys/dev/ichiic/ig4_iic.c
516
if (len - sent <= sc->cfg.txfifo_depth)
sys/dev/ichiic/ig4_iic.c
517
lowat = sc->cfg.txfifo_depth - (len - sent);
sys/dev/ichiic/ig4_iic.c
835
sc->cfg.version = reg_read(sc, IG4_REG_COMP_VER);
sys/dev/ichiic/ig4_iic.c
836
sc->cfg.bus_speed = reg_read(sc, IG4_REG_CTL) & IG4_CTL_SPEED_MASK;
sys/dev/ichiic/ig4_iic.c
837
sc->cfg.ss_scl_hcnt =
sys/dev/ichiic/ig4_iic.c
839
sc->cfg.ss_scl_lcnt =
sys/dev/ichiic/ig4_iic.c
841
sc->cfg.fs_scl_hcnt =
sys/dev/ichiic/ig4_iic.c
843
sc->cfg.fs_scl_lcnt =
sys/dev/ichiic/ig4_iic.c
845
sc->cfg.ss_sda_hold = sc->cfg.fs_sda_hold =
sys/dev/ichiic/ig4_iic.c
848
if (sc->cfg.bus_speed != IG4_CTL_SPEED_STD)
sys/dev/ichiic/ig4_iic.c
849
sc->cfg.bus_speed = IG4_CTL_SPEED_FAST;
sys/dev/ichiic/ig4_iic.c
855
sc->cfg.txfifo_depth = IG4_PARAM1_TXFIFO_DEPTH(v);
sys/dev/ichiic/ig4_iic.c
857
sc->cfg.rxfifo_depth = IG4_PARAM1_RXFIFO_DEPTH(v);
sys/dev/ichiic/ig4_iic.c
863
sc->cfg.bus_speed = IG4_CTL_SPEED_FAST;
sys/dev/ichiic/ig4_iic.c
864
ig4iic_clk_params(hw, IG4_CTL_SPEED_STD, &sc->cfg.ss_scl_hcnt,
sys/dev/ichiic/ig4_iic.c
865
&sc->cfg.ss_scl_lcnt, &sc->cfg.ss_sda_hold);
sys/dev/ichiic/ig4_iic.c
866
ig4iic_clk_params(hw, IG4_CTL_SPEED_FAST, &sc->cfg.fs_scl_hcnt,
sys/dev/ichiic/ig4_iic.c
867
&sc->cfg.fs_scl_lcnt, &sc->cfg.fs_sda_hold);
sys/dev/ichiic/ig4_iic.c
869
sc->cfg.txfifo_depth = hw->txfifo_depth;
sys/dev/ichiic/ig4_iic.c
871
sc->cfg.rxfifo_depth = hw->rxfifo_depth;
sys/dev/ichiic/ig4_iic.c
881
sc->cfg.bus_speed = IG4_CTL_SPEED_STD;
sys/dev/ichiic/ig4_iic.c
882
sc->cfg.ss_scl_hcnt = sc->cfg.fs_scl_hcnt = 100;
sys/dev/ichiic/ig4_iic.c
883
sc->cfg.ss_scl_lcnt = sc->cfg.fs_scl_lcnt = 125;
sys/dev/ichiic/ig4_iic.c
885
sc->cfg.ss_sda_hold = sc->cfg.fs_sda_hold = 28;
sys/dev/ichiic/ig4_iic.c
891
ig4iic_acpi_params(handle, "SSCN", &sc->cfg.ss_scl_hcnt,
sys/dev/ichiic/ig4_iic.c
892
&sc->cfg.ss_scl_lcnt, &sc->cfg.ss_sda_hold);
sys/dev/ichiic/ig4_iic.c
893
ig4iic_acpi_params(handle, "FMCN", &sc->cfg.fs_scl_hcnt,
sys/dev/ichiic/ig4_iic.c
894
&sc->cfg.fs_scl_lcnt, &sc->cfg.fs_sda_hold);
sys/dev/ichiic/ig4_iic.c
901
sc->cfg.bus_speed == IG4_CTL_SPEED_STD ? "Std" : "Fast");
sys/dev/ichiic/ig4_iic.c
904
sc->cfg.ss_scl_hcnt, sc->cfg.ss_scl_lcnt,
sys/dev/ichiic/ig4_iic.c
905
sc->cfg.ss_sda_hold);
sys/dev/ichiic/ig4_iic.c
907
sc->cfg.fs_scl_hcnt, sc->cfg.fs_scl_lcnt,
sys/dev/ichiic/ig4_iic.c
908
sc->cfg.fs_sda_hold);
sys/dev/ichiic/ig4_iic.c
974
reg_write(sc, IG4_REG_SS_SCL_HCNT, sc->cfg.ss_scl_hcnt);
sys/dev/ichiic/ig4_iic.c
975
reg_write(sc, IG4_REG_SS_SCL_LCNT, sc->cfg.ss_scl_lcnt);
sys/dev/ichiic/ig4_iic.c
976
reg_write(sc, IG4_REG_FS_SCL_HCNT, sc->cfg.fs_scl_hcnt);
sys/dev/ichiic/ig4_iic.c
977
reg_write(sc, IG4_REG_FS_SCL_LCNT, sc->cfg.fs_scl_lcnt);
sys/dev/ichiic/ig4_iic.c
979
(sc->cfg.bus_speed & IG4_CTL_SPEED_MASK) == IG4_CTL_SPEED_STD ?
sys/dev/ichiic/ig4_iic.c
980
sc->cfg.ss_sda_hold : sc->cfg.fs_sda_hold);
sys/dev/ichiic/ig4_iic.c
989
(sc->cfg.bus_speed & IG4_CTL_SPEED_MASK));
sys/dev/ichiic/ig4_var.h
90
struct ig4_cfg cfg;
sys/dev/iicbus/sensor/htu21.c
253
htu21_get_cfg(device_t dev, uint8_t *cfg)
sys/dev/iicbus/sensor/htu21.c
271
msgs[1].buf = cfg;
sys/dev/iicbus/sensor/htu21.c
278
htu21_set_cfg(device_t dev, uint8_t cfg)
sys/dev/iicbus/sensor/htu21.c
288
buf[1] = cfg;
sys/dev/iicbus/sensor/htu21.c
302
uint8_t cfg;
sys/dev/iicbus/sensor/htu21.c
308
error = htu21_get_cfg(dev, &cfg);
sys/dev/iicbus/sensor/htu21.c
311
heater = (cfg & 0x04) != 0;
sys/dev/iicbus/sensor/htu21.c
317
cfg &= ~0x04;
sys/dev/iicbus/sensor/htu21.c
318
cfg |= (heater > 0) << 2;
sys/dev/iicbus/sensor/htu21.c
319
error = htu21_set_cfg(dev, cfg);
sys/dev/iicbus/sensor/htu21.c
327
uint8_t cfg;
sys/dev/iicbus/sensor/htu21.c
333
error = htu21_get_cfg(dev, &cfg);
sys/dev/iicbus/sensor/htu21.c
336
power = (cfg & 0x40) == 0;
sys/dev/iwm/if_iwm.c
1066
count = sc->cfg->mqrx_supported ? IWM_RX_MQ_RING_COUNT :
sys/dev/iwm/if_iwm.c
1349
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) {
sys/dev/iwm/if_iwm.c
1430
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) {
sys/dev/iwm/if_iwm.c
1475
(sc->cfg->integrated ? IWM_RFH_GEN_CFG_RB_CHUNK_SIZE_64 :
sys/dev/iwm/if_iwm.c
1535
if (sc->cfg->host_interrupt_operation_mode)
sys/dev/iwm/if_iwm.c
1548
if (sc->cfg->mqrx_supported)
sys/dev/iwm/if_iwm.c
1597
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000)
sys/dev/iwm/if_iwm.c
1776
if (sc->cfg->device_family < IWM_DEVICE_FAMILY_8000) {
sys/dev/iwm/if_iwm.c
1915
sc->cfg->eeprom_size) {
sys/dev/iwm/if_iwm.c
1978
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000)
sys/dev/iwm/if_iwm.c
2028
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000)
sys/dev/iwm/if_iwm.c
2102
if (sc->cfg->device_family < IWM_DEVICE_FAMILY_8000)
sys/dev/iwm/if_iwm.c
2111
if (sc->cfg->device_family < IWM_DEVICE_FAMILY_8000)
sys/dev/iwm/if_iwm.c
2122
if (sc->cfg->device_family < IWM_DEVICE_FAMILY_8000)
sys/dev/iwm/if_iwm.c
2133
if (sc->cfg->device_family < IWM_DEVICE_FAMILY_8000)
sys/dev/iwm/if_iwm.c
2145
if (sc->cfg->device_family < IWM_DEVICE_FAMILY_8000) {
sys/dev/iwm/if_iwm.c
2167
if (cfg->mac_addr_from_csr) {
sys/dev/iwm/if_iwm.c
2171
if (sc->cfg->device_family < IWM_DEVICE_FAMILY_8000) {
sys/dev/iwm/if_iwm.c
2203
if (sc->cfg->device_family < IWM_DEVICE_FAMILY_8000) {
sys/dev/iwm/if_iwm.c
2228
if (sc->cfg->device_family >= IWM_DEVICE_FAMILY_8000) {
sys/dev/iwm/if_iwm.c
2245
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) {
sys/dev/iwm/if_iwm.c
2246
memcpy(data->nvm_ch_flags, sc->cfg->nvm_type == IWM_NVM_SDP ?
sys/dev/iwm/if_iwm.c
2270
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) {
sys/dev/iwm/if_iwm.c
2272
!sections[sc->cfg->nvm_hw_section_num].data) {
sys/dev/iwm/if_iwm.c
2277
} else if (sc->cfg->device_family >= IWM_DEVICE_FAMILY_8000) {
sys/dev/iwm/if_iwm.c
2286
if (!sections[sc->cfg->nvm_hw_section_num].data &&
sys/dev/iwm/if_iwm.c
2300
panic("unknown device family %d\n", sc->cfg->device_family);
sys/dev/iwm/if_iwm.c
2303
hw = (const uint16_t *) sections[sc->cfg->nvm_hw_section_num].data;
sys/dev/iwm/if_iwm.c
2307
regulatory = sc->cfg->nvm_type == IWM_NVM_SDP ?
sys/dev/iwm/if_iwm.c
2329
if (sc->cfg->nvm_hw_section_num >= IWM_NVM_NUM_OF_SECTIONS)
sys/dev/iwm/if_iwm.c
2336
nvm_buffer = malloc(sc->cfg->eeprom_size, M_DEVBUF, M_NOWAIT | M_ZERO);
sys/dev/iwm/if_iwm.c
2704
if (sc->cfg->device_family >= IWM_DEVICE_FAMILY_8000)
sys/dev/iwm/if_iwm.c
2855
if (sc->cfg->device_family >= IWM_DEVICE_FAMILY_8000) {
sys/dev/iwm/if_iwm.c
2946
if (sc->cfg->device_family < IWM_DEVICE_FAMILY_8000) {
sys/dev/iwm/if_iwm.c
3059
if (sc->cfg->mqrx_supported)
sys/dev/iwm/if_iwm.c
3414
ret = sc->cfg->mqrx_supported ?
sys/dev/iwm/if_iwm.c
3722
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_9000)
sys/dev/iwm/if_iwm.c
4644
if (sc->cfg->device_family >= IWM_DEVICE_FAMILY_8000)
sys/dev/iwm/if_iwm.c
4822
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000)
sys/dev/iwm/if_iwm.c
5638
if (sc->cfg->mqrx_supported) {
sys/dev/iwm/if_iwm.c
5846
const struct iwm_cfg *cfg;
sys/dev/iwm/if_iwm.c
587
fwp = firmware_get(sc->cfg->fw_name);
sys/dev/iwm/if_iwm.c
5874
device_set_desc(dev, iwm_devices[i].cfg->name);
sys/dev/iwm/if_iwm.c
5894
sc->cfg = iwm_devices[i].cfg;
sys/dev/iwm/if_iwm.c
591
sc->cfg->fw_name, error);
sys/dev/iwm/if_iwm.c
6037
if (sc->cfg->device_family >= IWM_DEVICE_FAMILY_8000) {
sys/dev/iwm/if_iwm.c
6084
if (sc->cfg == &iwm7265_cfg &&
sys/dev/iwm/if_iwm.c
6086
sc->cfg = &iwm7265d_cfg;
sys/dev/iwm/if_iwm.c
612
sc->cfg->fw_name);
sys/dev/iwm/if_iwm.c
959
if (sc->cfg->mqrx_supported) {
sys/dev/iwm/if_iwm.c
988
if (sc->cfg->mqrx_supported) {
sys/dev/iwm/if_iwm_pcie_trans.c
283
if (sc->cfg->device_family >= IWM_DEVICE_FAMILY_8000)
sys/dev/iwm/if_iwm_pcie_trans.c
480
if (sc->cfg->device_family < IWM_DEVICE_FAMILY_8000) {
sys/dev/iwm/if_iwm_pcie_trans.c
506
if (trans->cfg->base_params->pll_cfg_val)
sys/dev/iwm/if_iwm_pcie_trans.c
508
trans->cfg->base_params->pll_cfg_val);
sys/dev/iwm/if_iwm_pcie_trans.c
531
if (sc->cfg->host_interrupt_operation_mode) {
sys/dev/iwm/if_iwm_pcie_trans.c
566
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) {
sys/dev/iwm/if_iwm_pcie_trans.c
640
if (sc->cfg->mqrx_supported)
sys/dev/iwm/if_iwm_pcie_trans.c
665
if (sc->cfg->mqrx_supported) {
sys/dev/iwm/if_iwm_pcie_trans.c
684
if (!sc->cfg->apmg_wake_up_wa)
sys/dev/iwm/if_iwm_pcie_trans.c
709
if (sc->cfg->apmg_wake_up_wa &&
sys/dev/iwm/if_iwm_phy_db.c
177
struct iwm_phy_db_entry cfg;
sys/dev/iwm/if_iwm_phy_db.c
219
return &phy_db->cfg;
sys/dev/iwm/if_iwm_sf.c
254
if (sc->cfg->disable_dummy_notification)
sys/dev/iwm/if_iwm_sta.c
139
return sc->cfg->mqrx_supported ? sizeof(struct iwm_add_sta_cmd) :
sys/dev/iwm/if_iwm_sta.c
323
if (sta->sta_id == IWM_AUX_STA_ID && sc->cfg->mqrx_supported)
sys/dev/iwm/if_iwmvar.h
484
const struct iwm_cfg *cfg;
sys/dev/iwx/if_iwx.c
10159
return dev_info->cfg;
sys/dev/iwx/if_iwx.c
10197
const struct iwx_device_cfg *cfg;
sys/dev/iwx/if_iwx.c
10398
cfg = iwx_find_device_cfg(sc);
sys/dev/iwx/if_iwx.c
10399
DPRINTF(("%s: cfg=%p\n", __func__, cfg));
sys/dev/iwx/if_iwx.c
10400
if (cfg) {
sys/dev/iwx/if_iwx.c
10401
sc->sc_fwname = cfg->fw_name;
sys/dev/iwx/if_iwx.c
10402
sc->sc_pnvm_name = cfg->pnvm_name;
sys/dev/iwx/if_iwx.c
10403
sc->sc_tx_with_siso_diversity = cfg->tx_with_siso_diversity;
sys/dev/iwx/if_iwx.c
10404
sc->sc_uhb_supported = cfg->uhb_supported;
sys/dev/iwx/if_iwx.c
10405
if (cfg->xtal_latency) {
sys/dev/iwx/if_iwx.c
10406
sc->sc_xtal_latency = cfg->xtal_latency;
sys/dev/iwx/if_iwx.c
10407
sc->sc_low_latency_xtal = cfg->low_latency_xtal;
sys/dev/iwx/if_iwx.c
9678
const struct iwx_device_cfg *cfg;
sys/dev/iwx/if_iwx.c
9683
{ .device = (_device), .subdevice = (_subdevice), .cfg = &(_cfg), \
sys/dev/ixgbe/ixgbe_dcb.c
209
void ixgbe_dcb_unpack_pfc_cee(struct ixgbe_dcb_config *cfg, u8 *map, u8 *pfc_up)
sys/dev/ixgbe/ixgbe_dcb.c
211
struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
sys/dev/ixgbe/ixgbe_dcb.c
224
void ixgbe_dcb_unpack_refill_cee(struct ixgbe_dcb_config *cfg, int direction,
sys/dev/ixgbe/ixgbe_dcb.c
227
struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
sys/dev/ixgbe/ixgbe_dcb.c
234
void ixgbe_dcb_unpack_max_cee(struct ixgbe_dcb_config *cfg, u16 *max)
sys/dev/ixgbe/ixgbe_dcb.c
236
struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
sys/dev/ixgbe/ixgbe_dcb.c
243
void ixgbe_dcb_unpack_bwgid_cee(struct ixgbe_dcb_config *cfg, int direction,
sys/dev/ixgbe/ixgbe_dcb.c
246
struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
sys/dev/ixgbe/ixgbe_dcb.c
253
void ixgbe_dcb_unpack_tsa_cee(struct ixgbe_dcb_config *cfg, int direction,
sys/dev/ixgbe/ixgbe_dcb.c
256
struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
sys/dev/ixgbe/ixgbe_dcb.c
263
u8 ixgbe_dcb_get_tc_from_up(struct ixgbe_dcb_config *cfg, int direction, u8 up)
sys/dev/ixgbe/ixgbe_dcb.c
265
struct ixgbe_dcb_tc_config *tc_config = &cfg->tc_config[0];
sys/dev/ixgbe/ixgbe_dcb.c
267
u8 tc = cfg->num_tcs.pg_tcs;
sys/dev/ixgbe/ixgbe_dcb.c
286
void ixgbe_dcb_unpack_map_cee(struct ixgbe_dcb_config *cfg, int direction,
sys/dev/ixgbe/ixgbe_dcb.c
292
map[up] = ixgbe_dcb_get_tc_from_up(cfg, direction, up);
sys/dev/ixgbe/ixgbe_e610.c
1324
struct ixgbe_aci_cmd_set_phy_cfg_data *cfg)
sys/dev/ixgbe/ixgbe_e610.c
1326
if (!caps || !cfg)
sys/dev/ixgbe/ixgbe_e610.c
1329
memset(cfg, 0, sizeof(*cfg));
sys/dev/ixgbe/ixgbe_e610.c
1330
cfg->phy_type_low = caps->phy_type_low;
sys/dev/ixgbe/ixgbe_e610.c
1331
cfg->phy_type_high = caps->phy_type_high;
sys/dev/ixgbe/ixgbe_e610.c
1332
cfg->caps = caps->caps;
sys/dev/ixgbe/ixgbe_e610.c
1333
cfg->low_power_ctrl_an = caps->low_power_ctrl_an;
sys/dev/ixgbe/ixgbe_e610.c
1334
cfg->eee_cap = caps->eee_cap;
sys/dev/ixgbe/ixgbe_e610.c
1335
cfg->eeer_value = caps->eeer_value;
sys/dev/ixgbe/ixgbe_e610.c
1336
cfg->link_fec_opt = caps->link_fec_options;
sys/dev/ixgbe/ixgbe_e610.c
1337
cfg->module_compliance_enforcement =
sys/dev/ixgbe/ixgbe_e610.c
1339
cfg->eee_entry_delay = caps->eee_entry_delay;
sys/dev/ixgbe/ixgbe_e610.c
1356
struct ixgbe_aci_cmd_set_phy_cfg_data *cfg)
sys/dev/ixgbe/ixgbe_e610.c
1362
if (!cfg)
sys/dev/ixgbe/ixgbe_e610.c
1367
if (cfg->caps & ~IXGBE_ACI_PHY_ENA_VALID_MASK) {
sys/dev/ixgbe/ixgbe_e610.c
1368
cfg->caps &= IXGBE_ACI_PHY_ENA_VALID_MASK;
sys/dev/ixgbe/ixgbe_e610.c
1375
status = ixgbe_aci_send_cmd(hw, &desc, cfg, sizeof(*cfg));
sys/dev/ixgbe/ixgbe_e610.c
1379
memcpy(&cfg_obsolete, cfg, sizeof(cfg_obsolete));
sys/dev/ixgbe/ixgbe_e610.c
1387
hw->phy.curr_user_phy_cfg = *cfg;
sys/dev/ixgbe/ixgbe_e610.c
1615
li->fec_info = link_data.cfg & IXGBE_ACI_FEC_MASK;
sys/dev/ixgbe/ixgbe_e610.c
1617
li->pacing = link_data.cfg & (IXGBE_ACI_CFG_PACING_M |
sys/dev/ixgbe/ixgbe_e610.c
3840
struct ixgbe_fwlog_cfg *cfg)
sys/dev/ixgbe/ixgbe_e610.c
3842
hw->fwlog_cfg = *cfg;
sys/dev/ixgbe/ixgbe_e610.c
3898
struct ixgbe_fwlog_cfg *cfg)
sys/dev/ixgbe/ixgbe_e610.c
3900
if (!cfg) {
sys/dev/ixgbe/ixgbe_e610.c
3904
if (cfg->log_resolution < IXGBE_ACI_FW_LOG_MIN_RESOLUTION ||
sys/dev/ixgbe/ixgbe_e610.c
3905
cfg->log_resolution > IXGBE_ACI_FW_LOG_MAX_RESOLUTION) {
sys/dev/ixgbe/ixgbe_e610.c
3909
if (!ixgbe_fwlog_valid_module_entries(hw, cfg->module_entries,
sys/dev/ixgbe/ixgbe_e610.c
3928
s32 ixgbe_fwlog_init(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg)
sys/dev/ixgbe/ixgbe_e610.c
3930
if (!ixgbe_fwlog_valid_cfg(hw, cfg))
sys/dev/ixgbe/ixgbe_e610.c
3933
ixgbe_fwlog_cache_cfg(hw, cfg);
sys/dev/ixgbe/ixgbe_e610.c
3975
cmd->ops.cfg.log_resolution = IXGBE_CPU_TO_LE16(log_resolution);
sys/dev/ixgbe/ixgbe_e610.c
3976
cmd->ops.cfg.mdl_cnt = IXGBE_CPU_TO_LE16(num_entries);
sys/dev/ixgbe/ixgbe_e610.c
4019
s32 ixgbe_fwlog_set(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg)
sys/dev/ixgbe/ixgbe_e610.c
4026
if (!ixgbe_fwlog_valid_cfg(hw, cfg))
sys/dev/ixgbe/ixgbe_e610.c
4029
status = ixgbe_aci_fwlog_set(hw, cfg->module_entries,
sys/dev/ixgbe/ixgbe_e610.c
4030
IXGBE_ACI_FW_LOG_ID_MAX, cfg->options,
sys/dev/ixgbe/ixgbe_e610.c
4031
cfg->log_resolution);
sys/dev/ixgbe/ixgbe_e610.c
4033
ixgbe_fwlog_cache_cfg(hw, cfg);
sys/dev/ixgbe/ixgbe_e610.c
4087
struct ixgbe_fwlog_cfg cfg;
sys/dev/ixgbe/ixgbe_e610.c
4099
status = ixgbe_fwlog_get(hw, &cfg);
sys/dev/ixgbe/ixgbe_e610.c
4103
status = ixgbe_aci_fwlog_set(hw, entries, num_entries, cfg.options,
sys/dev/ixgbe/ixgbe_e610.c
4104
cfg.log_resolution);
sys/dev/ixgbe/ixgbe_e610.c
4189
static s32 ixgbe_aci_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg)
sys/dev/ixgbe/ixgbe_e610.c
4198
memset(cfg, 0, sizeof(*cfg));
sys/dev/ixgbe/ixgbe_e610.c
4214
module_id_cnt = IXGBE_LE16_TO_CPU(cmd->ops.cfg.mdl_cnt);
sys/dev/ixgbe/ixgbe_e610.c
4219
cfg->log_resolution = (u8)IXGBE_LE16_TO_CPU(cmd->ops.cfg.log_resolution);
sys/dev/ixgbe/ixgbe_e610.c
4221
cfg->options |= IXGBE_FWLOG_OPTION_ARQ_ENA;
sys/dev/ixgbe/ixgbe_e610.c
4223
cfg->options |= IXGBE_FWLOG_OPTION_UART_ENA;
sys/dev/ixgbe/ixgbe_e610.c
4225
cfg->options |= IXGBE_FWLOG_OPTION_IS_REGISTERED;
sys/dev/ixgbe/ixgbe_e610.c
4232
cfg->module_entries[i].module_id =
sys/dev/ixgbe/ixgbe_e610.c
4234
cfg->module_entries[i].log_level = fw_module->log_level;
sys/dev/ixgbe/ixgbe_e610.c
4257
struct ixgbe_fwlog_cfg cfg;
sys/dev/ixgbe/ixgbe_e610.c
4266
status = ixgbe_aci_fwlog_get(hw, &cfg);
sys/dev/ixgbe/ixgbe_e610.c
4280
s32 ixgbe_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg)
sys/dev/ixgbe/ixgbe_e610.c
4287
if (!cfg)
sys/dev/ixgbe/ixgbe_e610.c
4290
status = ixgbe_aci_fwlog_get(hw, cfg);
sys/dev/ixgbe/ixgbe_e610.c
4294
ixgbe_fwlog_cache_cfg(hw, cfg);
sys/dev/ixgbe/ixgbe_e610.c
4781
struct ixgbe_aci_cmd_set_phy_cfg_data *cfg,
sys/dev/ixgbe/ixgbe_e610.c
4788
if (!cfg)
sys/dev/ixgbe/ixgbe_e610.c
4828
cfg->caps &= ~(IXGBE_ACI_PHY_EN_TX_LINK_PAUSE |
sys/dev/ixgbe/ixgbe_e610.c
4832
cfg->caps |= pause_mask;
sys/dev/ixgbe/ixgbe_e610.c
4851
struct ixgbe_aci_cmd_set_phy_cfg_data cfg = { 0 };
sys/dev/ixgbe/ixgbe_e610.c
4860
ixgbe_copy_phy_caps_to_cfg(&pcaps, &cfg);
sys/dev/ixgbe/ixgbe_e610.c
4863
status = ixgbe_cfg_phy_fc(hw, &cfg, hw->fc.requested_mode);
sys/dev/ixgbe/ixgbe_e610.c
4868
if (cfg.caps != pcaps.caps) {
sys/dev/ixgbe/ixgbe_e610.c
4869
cfg.caps |= IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT;
sys/dev/ixgbe/ixgbe_e610.c
4871
status = ixgbe_aci_set_phy_cfg(hw, &cfg);
sys/dev/ixgbe/ixgbe_e610.h
172
s32 ixgbe_fwlog_init(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg);
sys/dev/ixgbe/ixgbe_e610.h
174
s32 ixgbe_fwlog_set(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg);
sys/dev/ixgbe/ixgbe_e610.h
181
s32 ixgbe_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg);
sys/dev/ixgbe/ixgbe_e610.h
199
struct ixgbe_aci_cmd_set_phy_cfg_data *cfg,
sys/dev/ixgbe/ixgbe_e610.h
68
struct ixgbe_aci_cmd_set_phy_cfg_data *cfg);
sys/dev/ixgbe/ixgbe_e610.h
70
struct ixgbe_aci_cmd_set_phy_cfg_data *cfg);
sys/dev/ixgbe/ixgbe_e610.h
72
struct ixgbe_aci_cmd_set_phy_cfg_data *cfg);
sys/dev/ixgbe/ixgbe_fw_logging.c
109
cfg->log_resolution = resolution;
sys/dev/ixgbe/ixgbe_fw_logging.c
111
return ixgbe_reconfig_fw_log(sc, cfg);
sys/dev/ixgbe/ixgbe_fw_logging.c
128
struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg;
sys/dev/ixgbe/ixgbe_fw_logging.c
135
if (cfg->options & IXGBE_FWLOG_OPTION_IS_REGISTERED)
sys/dev/ixgbe/ixgbe_fw_logging.c
21
ixgbe_reconfig_fw_log(struct ixgbe_softc *sc, struct ixgbe_fwlog_cfg *cfg)
sys/dev/ixgbe/ixgbe_fw_logging.c
218
struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg;
sys/dev/ixgbe/ixgbe_fw_logging.c
227
log_level = cfg->module_entries[module].log_level;
sys/dev/ixgbe/ixgbe_fw_logging.c
25
ixgbe_fwlog_init(&sc->hw, cfg);
sys/dev/ixgbe/ixgbe_fw_logging.c
268
cfg->module_entries[module].log_level = log_level;
sys/dev/ixgbe/ixgbe_fw_logging.c
270
return ixgbe_reconfig_fw_log(sc, cfg);
sys/dev/ixgbe/ixgbe_fw_logging.c
30
status = ixgbe_fwlog_set(&sc->hw, cfg);
sys/dev/ixgbe/ixgbe_fw_logging.c
407
struct ixgbe_fwlog_cfg *cfg;
sys/dev/ixgbe/ixgbe_fw_logging.c
412
cfg = &hw->fwlog_cfg;
sys/dev/ixgbe/ixgbe_fw_logging.c
421
cfg->log_resolution = 10;
sys/dev/ixgbe/ixgbe_fw_logging.c
427
cfg->options |= IXGBE_FWLOG_OPTION_ARQ_ENA;
sys/dev/ixgbe/ixgbe_fw_logging.c
456
cfg->module_entries[i].module_id = i;
sys/dev/ixgbe/ixgbe_fw_logging.c
457
cfg->module_entries[i].log_level = IXGBE_FWLOG_LEVEL_NONE;
sys/dev/ixgbe/ixgbe_fw_logging.c
56
struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg;
sys/dev/ixgbe/ixgbe_fw_logging.c
61
enabled = !!(cfg->options & option);
sys/dev/ixgbe/ixgbe_fw_logging.c
68
cfg->options |= option;
sys/dev/ixgbe/ixgbe_fw_logging.c
70
cfg->options &= ~option;
sys/dev/ixgbe/ixgbe_fw_logging.c
72
return ixgbe_reconfig_fw_log(sc, cfg);
sys/dev/ixgbe/ixgbe_fw_logging.c
91
struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg;
sys/dev/ixgbe/ixgbe_fw_logging.c
97
resolution = cfg->log_resolution;
sys/dev/ixgbe/ixgbe_type_e610.h
1023
u8 cfg;
sys/dev/ixgbe/ixgbe_type_e610.h
1948
} cfg;
sys/dev/liquidio/base/lio_config.h
102
#define LIO_GET_IQ_CFG(cfg) ((cfg)->iq)
sys/dev/liquidio/base/lio_config.h
103
#define LIO_GET_IQ_MAX_Q_CFG(cfg) ((cfg)->iq.max_iqs)
sys/dev/liquidio/base/lio_config.h
104
#define LIO_GET_IQ_INSTR_TYPE_CFG(cfg) ((cfg)->iq.instr_type)
sys/dev/liquidio/base/lio_config.h
106
#define LIO_GET_IQ_INTR_PKT_CFG(cfg) ((cfg)->iq.iq_intr_pkt)
sys/dev/liquidio/base/lio_config.h
108
#define LIO_GET_OQ_MAX_Q_CFG(cfg) ((cfg)->oq.max_oqs)
sys/dev/liquidio/base/lio_config.h
109
#define LIO_GET_OQ_PKTS_PER_INTR_CFG(cfg) ((cfg)->oq.pkts_per_intr)
sys/dev/liquidio/base/lio_config.h
110
#define LIO_GET_OQ_REFILL_THRESHOLD_CFG(cfg) ((cfg)->oq.refill_threshold)
sys/dev/liquidio/base/lio_config.h
111
#define LIO_GET_OQ_INTR_PKT_CFG(cfg) ((cfg)->oq.oq_intr_pkt)
sys/dev/liquidio/base/lio_config.h
112
#define LIO_GET_OQ_INTR_TIME_CFG(cfg) ((cfg)->oq.oq_intr_time)
sys/dev/liquidio/base/lio_config.h
114
#define LIO_GET_NUM_NIC_PORTS_CFG(cfg) ((cfg)->num_nic_ports)
sys/dev/liquidio/base/lio_config.h
115
#define LIO_GET_NUM_DEF_TX_DESCS_CFG(cfg) ((cfg)->num_def_tx_descs)
sys/dev/liquidio/base/lio_config.h
116
#define LIO_GET_NUM_DEF_RX_DESCS_CFG(cfg) ((cfg)->num_def_rx_descs)
sys/dev/liquidio/base/lio_config.h
117
#define LIO_GET_DEF_RX_BUF_SIZE_CFG(cfg) ((cfg)->def_rx_buf_size)
sys/dev/liquidio/base/lio_config.h
119
#define LIO_GET_NUM_RX_DESCS_NIC_IF_CFG(cfg, idx) \
sys/dev/liquidio/base/lio_config.h
120
((cfg)->nic_if_cfg[idx].num_rx_descs)
sys/dev/liquidio/base/lio_config.h
121
#define LIO_GET_NUM_TX_DESCS_NIC_IF_CFG(cfg, idx) \
sys/dev/liquidio/base/lio_config.h
122
((cfg)->nic_if_cfg[idx].num_tx_descs)
sys/dev/liquidio/base/lio_config.h
123
#define LIO_GET_NUM_RX_BUF_SIZE_NIC_IF_CFG(cfg, idx) \
sys/dev/liquidio/base/lio_config.h
124
((cfg)->nic_if_cfg[idx].rx_buf_size)
sys/dev/liquidio/base/lio_config.h
126
#define LIO_GET_IS_SLI_BP_ON_CFG(cfg) ((cfg)->misc.enable_sli_oq_bp)
sys/dev/liquidio/base/lio_config.h
131
#define LIO_SET_NUM_RX_DESCS_NIC_IF(cfg, idx, value) \
sys/dev/liquidio/base/lio_config.h
132
((cfg)->nic_if_cfg[idx].num_rx_descs = value)
sys/dev/liquidio/base/lio_config.h
133
#define LIO_SET_NUM_TX_DESCS_NIC_IF(cfg, idx, value) \
sys/dev/liquidio/base/lio_config.h
134
((cfg)->nic_if_cfg[idx].num_tx_descs = value)
sys/dev/liquidio/lio_sysctl.c
1524
struct octeon_intrmod_cfg *cfg;
sys/dev/liquidio/lio_sysctl.c
1540
cfg = (struct octeon_intrmod_cfg *)sc->virtdptr;
sys/dev/liquidio/lio_sysctl.c
1542
memcpy(cfg, intr_cfg, sizeof(struct octeon_intrmod_cfg));
sys/dev/liquidio/lio_sysctl.c
1543
lio_swap_8B_data((uint64_t *)cfg,
sys/dev/mii/lxtphy.c
250
int cfg;
sys/dev/mii/lxtphy.c
252
cfg = PHY_READ(sc, MII_LXTPHY_CONFIG);
sys/dev/mii/lxtphy.c
253
cfg &= ~CONFIG_100BASEFX;
sys/dev/mii/lxtphy.c
254
PHY_WRITE(sc, MII_LXTPHY_CONFIG, cfg);
sys/dev/mii/lxtphy.c
260
int cfg;
sys/dev/mii/lxtphy.c
262
cfg = PHY_READ(sc, MII_LXTPHY_CONFIG);
sys/dev/mii/lxtphy.c
263
cfg |= CONFIG_100BASEFX;
sys/dev/mii/lxtphy.c
264
PHY_WRITE(sc, MII_LXTPHY_CONFIG, cfg);
sys/dev/mii/mcommphy.c
325
mii_fdt_phy_config_t *cfg;
sys/dev/mii/mcommphy.c
328
cfg = mii_fdt_get_config(sc->dev);
sys/dev/mii/mcommphy.c
330
if (OF_hasprop(cfg->phynode, "motorcomm,tx-clk-10-inverted"))
sys/dev/mii/mcommphy.c
332
if (OF_hasprop(cfg->phynode, "motorcomm,tx-clk-100-inverted"))
sys/dev/mii/mcommphy.c
334
if (OF_hasprop(cfg->phynode, "motorcomm,tx-clk-1000-inverted"))
sys/dev/mii/mcommphy.c
338
if (OF_getencprop(cfg->phynode, "rx-internal-delay-ps", &val,
sys/dev/mii/mcommphy.c
342
if (OF_getencprop(cfg->phynode, "tx-internal-delay-ps", &val,
sys/dev/mii/mcommphy.c
347
mii_fdt_free_config(cfg);
sys/dev/mii/micphy.c
251
mii_fdt_phy_config_t *cfg;
sys/dev/mii/micphy.c
272
cfg = mii_fdt_get_config(dev);
sys/dev/mii/micphy.c
275
ksz9031_load_values(sc, cfg->phynode);
sys/dev/mii/micphy.c
277
ksz9021_load_values(sc, cfg->phynode);
sys/dev/mii/micphy.c
279
mii_fdt_free_config(cfg);
sys/dev/mii/mii_fdt.c
177
mii_fdt_free_config(struct mii_fdt_phy_config *cfg)
sys/dev/mii/mii_fdt.c
180
free(cfg, M_OFWPROP);
sys/dev/mii/mii_fdt.c
187
mii_fdt_phy_config_t *cfg;
sys/dev/mii/mii_fdt.c
195
cfg = malloc(sizeof(*cfg), M_OFWPROP, M_ZERO | M_WAITOK);
sys/dev/mii/mii_fdt.c
201
if ((cfg->macnode = ofw_bus_get_node(macdev)) == -1)
sys/dev/mii/mii_fdt.c
202
return (cfg);
sys/dev/mii/mii_fdt.c
204
cfg->con_type = mii_fdt_get_contype(cfg->macnode);
sys/dev/mii/mii_fdt.c
210
cfg->phynode = mii_fdt_lookup_phy(cfg->macnode, ma->mii_phyno);
sys/dev/mii/mii_fdt.c
211
if (cfg->phynode == -1)
sys/dev/mii/mii_fdt.c
212
return (cfg);
sys/dev/mii/mii_fdt.c
214
if (OF_getencprop(cfg->phynode, "max-speed", &val, sizeof(val)) > 0)
sys/dev/mii/mii_fdt.c
215
cfg->max_speed = val;
sys/dev/mii/mii_fdt.c
217
if (ofw_bus_node_is_compatible(cfg->phynode,
sys/dev/mii/mii_fdt.c
219
cfg->flags |= MIIF_FDT_COMPAT_CLAUSE45;
sys/dev/mii/mii_fdt.c
221
if (OF_hasprop(cfg->phynode, "broken-turn-around"))
sys/dev/mii/mii_fdt.c
222
cfg->flags |= MIIF_FDT_BROKEN_TURNAROUND;
sys/dev/mii/mii_fdt.c
223
if (OF_hasprop(cfg->phynode, "enet-phy-lane-swap"))
sys/dev/mii/mii_fdt.c
224
cfg->flags |= MIIF_FDT_LANE_SWAP;
sys/dev/mii/mii_fdt.c
225
if (OF_hasprop(cfg->phynode, "enet-phy-lane-no-swap"))
sys/dev/mii/mii_fdt.c
226
cfg->flags |= MIIF_FDT_NO_LANE_SWAP;
sys/dev/mii/mii_fdt.c
227
if (OF_hasprop(cfg->phynode, "eee-broken-100tx"))
sys/dev/mii/mii_fdt.c
228
cfg->flags |= MIIF_FDT_EEE_BROKEN_100TX;
sys/dev/mii/mii_fdt.c
229
if (OF_hasprop(cfg->phynode, "eee-broken-1000t"))
sys/dev/mii/mii_fdt.c
230
cfg->flags |= MIIF_FDT_EEE_BROKEN_1000T;
sys/dev/mii/mii_fdt.c
231
if (OF_hasprop(cfg->phynode, "eee-broken-10gt"))
sys/dev/mii/mii_fdt.c
232
cfg->flags |= MIIF_FDT_EEE_BROKEN_10GT;
sys/dev/mii/mii_fdt.c
233
if (OF_hasprop(cfg->phynode, "eee-broken-1000kx"))
sys/dev/mii/mii_fdt.c
234
cfg->flags |= MIIF_FDT_EEE_BROKEN_1000KX;
sys/dev/mii/mii_fdt.c
235
if (OF_hasprop(cfg->phynode, "eee-broken-10gkx4"))
sys/dev/mii/mii_fdt.c
236
cfg->flags |= MIIF_FDT_EEE_BROKEN_10GKX4;
sys/dev/mii/mii_fdt.c
237
if (OF_hasprop(cfg->phynode, "eee-broken-10gkr"))
sys/dev/mii/mii_fdt.c
238
cfg->flags |= MIIF_FDT_EEE_BROKEN_10GKR;
sys/dev/mii/mii_fdt.c
240
return (cfg);
sys/dev/mii/mii_fdt.h
70
void mii_fdt_free_config(struct mii_fdt_phy_config *cfg);
sys/dev/mii/vscphy.c
121
mii_fdt_phy_config_t *cfg;
sys/dev/mii/vscphy.c
124
cfg = mii_fdt_get_config(vsc->dev);
sys/dev/mii/vscphy.c
125
vsc->contype = cfg->con_type;
sys/dev/mii/vscphy.c
126
vsc->laneswap = (cfg->flags & MIIF_FDT_LANE_SWAP) &&
sys/dev/mii/vscphy.c
127
!(cfg->flags & MIIF_FDT_NO_LANE_SWAP);
sys/dev/mii/vscphy.c
128
if (OF_getencprop(cfg->phynode, "rx-delay", &val, sizeof(val)) > 0)
sys/dev/mii/vscphy.c
130
if (OF_getencprop(cfg->phynode, "tx-delay", &val, sizeof(val)) > 0)
sys/dev/mii/vscphy.c
132
vsc->mii_sc.mii_maxspeed = cfg->max_speed;
sys/dev/mii/vscphy.c
133
mii_fdt_free_config(cfg);
sys/dev/mlx4/mlx4_core/fw.h
256
int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg);
sys/dev/mlx4/mlx4_core/mlx4_fw.c
177
int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg)
sys/dev/mlx4/mlx4_core/mlx4_fw.c
193
MLX4_PUT(inbox, cfg->log_pg_sz, MOD_STAT_CFG_PG_SZ_OFFSET);
sys/dev/mlx4/mlx4_core/mlx4_fw.c
194
MLX4_PUT(inbox, cfg->log_pg_sz_m, MOD_STAT_CFG_PG_SZ_M_OFFSET);
sys/dev/mpt/mpt.h
589
#define mpt_port_page0 cfg.spi._port_page0
sys/dev/mpt/mpt.h
590
#define mpt_port_page1 cfg.spi._port_page1
sys/dev/mpt/mpt.h
591
#define mpt_port_page2 cfg.spi._port_page2
sys/dev/mpt/mpt.h
592
#define mpt_dev_page0 cfg.spi._dev_page0
sys/dev/mpt/mpt.h
593
#define mpt_dev_page1 cfg.spi._dev_page1
sys/dev/mpt/mpt.h
594
#define mpt_ini_id cfg.spi._ini_id
sys/dev/mpt/mpt.h
595
#define mpt_tag_enable cfg.spi._tag_enable
sys/dev/mpt/mpt.h
596
#define mpt_disc_enable cfg.spi._disc_enable
sys/dev/mpt/mpt.h
600
#define mpt_fcport_page0 cfg.fc._port_page0
sys/dev/mpt/mpt.h
601
#define mpt_fcport_speed cfg.fc._port_speed
sys/dev/mpt/mpt.h
603
} cfg;
sys/dev/netmap/netmap_freebsd.c
1217
nm_os_kctx_create(struct nm_kctx_cfg *cfg, void *opaque)
sys/dev/netmap/netmap_freebsd.c
1226
nmk->worker_ctx.worker_fn = cfg->worker_fn;
sys/dev/netmap/netmap_freebsd.c
1227
nmk->worker_ctx.worker_private = cfg->worker_private;
sys/dev/netmap/netmap_freebsd.c
1228
nmk->worker_ctx.type = cfg->type;
sys/dev/netmap/netmap_freebsd.c
1232
nmk->attach_user = cfg->attach_user;
sys/dev/netmap/netmap_kern.h
2332
struct nm_kctx *nm_os_kctx_create(struct nm_kctx_cfg *cfg,
sys/dev/ntb/ntb.c
65
char cfg[128] = "";
sys/dev/ntb/ntb.c
81
TUNABLE_STR_FETCH(buf, cfg, sizeof(cfg));
sys/dev/ntb/ntb.c
82
n = cfg;
sys/dev/ntb/ntb_hw/ntb_hw_intel.c
1648
msix = &dinfo->cfg.msix;
sys/dev/ntb/ntb_transport.c
349
char cfg[128] = "";
sys/dev/ntb/ntb_transport.c
444
TUNABLE_STR_FETCH(buf, cfg, sizeof(cfg));
sys/dev/ntb/ntb_transport.c
445
n = cfg;
sys/dev/oce/oce_if.c
1530
frag_len = (len > rq->cfg.frag_size) ? rq->cfg.frag_size : len;
sys/dev/oce/oce_if.c
1603
cq_info.num_frags = cq_info.pkt_size / rq->cfg.frag_size;
sys/dev/oce/oce_if.c
1604
if(cq_info.pkt_size % rq->cfg.frag_size)
sys/dev/oce/oce_if.c
1884
pd->mbuf->m_len = pd->mbuf->m_pkthdr.len = rq->cfg.frag_size;
sys/dev/oce/oce_if.h
654
struct mq_config cfg;
sys/dev/oce/oce_if.h
703
struct wq_config cfg;
sys/dev/oce/oce_if.h
738
struct rq_config cfg;
sys/dev/oce/oce_mbox.c
1664
fwcmd->params.req.frag_size = rq->cfg.frag_size/2048;
sys/dev/oce/oce_mbox.c
1668
fwcmd->params.req.frag_size = OCE_LOG2(rq->cfg.frag_size);
sys/dev/oce/oce_mbox.c
1672
fwcmd->params.req.max_frame_size = rq->cfg.mtu;
sys/dev/oce/oce_mbox.c
1673
fwcmd->params.req.is_rss_queue = rq->cfg.is_rss_queue;
sys/dev/oce/oce_mbox.c
1725
fwcmd->params.req.nic_wq_type = wq->cfg.wq_type;
sys/dev/oce/oce_mbox.c
1727
fwcmd->params.req.wq_size = OCE_LOG2(wq->cfg.q_len) + 1;
sys/dev/oce/oce_mbox.c
2297
fwcmd->params.req.frag_size = rq->cfg.frag_size/2048;
sys/dev/oce/oce_mbox.c
2302
fwcmd->params.req.max_frame_size = rq->cfg.mtu;
sys/dev/oce/oce_mbox.c
2304
if(rq->cfg.is_rss_queue) {
sys/dev/oce/oce_queue.c
1129
num_frags = cqe->pkt_size / rq->cfg.frag_size;
sys/dev/oce/oce_queue.c
1130
if(cqe->pkt_size % rq->cfg.frag_size)
sys/dev/oce/oce_queue.c
1153
num_frags = cqe2->coalesced_size / rq->cfg.frag_size;
sys/dev/oce/oce_queue.c
1154
if(cqe2->coalesced_size % rq->cfg.frag_size)
sys/dev/oce/oce_queue.c
224
wq->cfg.q_len = q_len;
sys/dev/oce/oce_queue.c
225
wq->cfg.wq_type = (uint8_t) wq_type;
sys/dev/oce/oce_queue.c
226
wq->cfg.eqd = OCE_DEFAULT_WQ_EQD;
sys/dev/oce/oce_queue.c
227
wq->cfg.nbufs = 2 * wq->cfg.q_len;
sys/dev/oce/oce_queue.c
228
wq->cfg.nhdl = 2 * wq->cfg.q_len;
sys/dev/oce/oce_queue.c
332
wq->wq_free = wq->cfg.q_len;
sys/dev/oce/oce_queue.c
405
rq->cfg.q_len = q_len;
sys/dev/oce/oce_queue.c
406
rq->cfg.frag_size = frag_size;
sys/dev/oce/oce_queue.c
407
rq->cfg.mtu = mtu;
sys/dev/oce/oce_queue.c
408
rq->cfg.eqd = 0;
sys/dev/oce/oce_queue.c
410
rq->cfg.is_rss_queue = rss;
sys/dev/oce/oce_queue.c
500
rq->cfg.if_id = if_id;
sys/dev/oce/oce_queue.c
713
mq->cfg.q_len = (uint8_t) q_len;
sys/dev/oce/oce_queue.c
714
mq->cfg.eqd = 0;
sys/dev/oce/oce_queue.c
917
rc = oce_alloc_rx_bufs(rq, rq->cfg.q_len - 1);
sys/dev/pci/pci.c
1001
cfg->pcix.pcix_location = ptr;
sys/dev/pci/pci.c
1009
cfg->pcie.pcie_location = ptr;
sys/dev/pci/pci.c
1011
cfg->pcie.pcie_type = val & PCIEM_FLAGS_TYPE;
sys/dev/pci/pci.c
1014
cfg->ea.ea_location = ptr;
sys/dev/pci/pci.c
1015
pci_ea_fill_info(pcib, cfg);
sys/dev/pci/pci.c
1028
if (cfg->ht.ht_slave != 0 && cfg->ht.ht_msimap != 0 &&
sys/dev/pci/pci.c
1029
!(cfg->ht.ht_msictrl & PCIM_HTCMD_MSI_ENABLE)) {
sys/dev/pci/pci.c
1032
cfg->domain, cfg->bus, cfg->slot, cfg->func);
sys/dev/pci/pci.c
1033
cfg->ht.ht_msictrl |= PCIM_HTCMD_MSI_ENABLE;
sys/dev/pci/pci.c
1034
WREG(cfg->ht.ht_msimap + PCIR_HT_COMMAND, cfg->ht.ht_msictrl,
sys/dev/pci/pci.c
1048
pci_read_vpd_reg(device_t pcib, pcicfgregs *cfg, int reg, uint32_t *data)
sys/dev/pci/pci.c
1054
WREG(cfg->vpd.vpd_reg + PCIR_VPD_ADDR, reg, 2);
sys/dev/pci/pci.c
1056
while ((REG(cfg->vpd.vpd_reg + PCIR_VPD_ADDR, 2) & 0x8000) != 0x8000) {
sys/dev/pci/pci.c
1061
*data = (REG(cfg->vpd.vpd_reg + PCIR_VPD_DATA, 4));
sys/dev/pci/pci.c
1068
pci_write_vpd_reg(device_t pcib, pcicfgregs *cfg, int reg, uint32_t data)
sys/dev/pci/pci.c
107
static void pci_fixancient(pcicfgregs *cfg);
sys/dev/pci/pci.c
1074
WREG(cfg->vpd.vpd_reg + PCIR_VPD_DATA, data, 4);
sys/dev/pci/pci.c
1075
WREG(cfg->vpd.vpd_reg + PCIR_VPD_ADDR, reg | 0x8000, 2);
sys/dev/pci/pci.c
1076
while ((REG(cfg->vpd.vpd_reg + PCIR_VPD_ADDR, 2) & 0x8000) == 0x8000) {
sys/dev/pci/pci.c
108
static int pci_printf(pcicfgregs *cfg, const char *fmt, ...);
sys/dev/pci/pci.c
1090
pcicfgregs *cfg;
sys/dev/pci/pci.c
1105
if (pci_read_vpd_reg(vrs->pcib, vrs->cfg, vrs->off, &reg))
sys/dev/pci/pci.c
122
pcicfgregs *cfg);
sys/dev/pci/pci.c
123
static void pci_read_cap(device_t pcib, pcicfgregs *cfg);
sys/dev/pci/pci.c
124
static int pci_read_vpd_reg(device_t pcib, pcicfgregs *cfg,
sys/dev/pci/pci.c
1245
pcicfgregs *cfg;
sys/dev/pci/pci.c
1249
cfg = vrs->cfg;
sys/dev/pci/pci.c
1250
vpd = &cfg->vpd;
sys/dev/pci/pci.c
1264
pci_printf(cfg,
sys/dev/pci/pci.c
127
static int pci_write_vpd_reg(device_t pcib, pcicfgregs *cfg,
sys/dev/pci/pci.c
1279
pcicfgregs *cfg;
sys/dev/pci/pci.c
1283
cfg = vrs->cfg;
sys/dev/pci/pci.c
1284
vpd = &cfg->vpd;
sys/dev/pci/pci.c
1290
pci_printf(cfg, "out of memory");
sys/dev/pci/pci.c
130
static void pci_read_vpd(device_t pcib, pcicfgregs *cfg);
sys/dev/pci/pci.c
1328
pci_parse_vpd(device_t pcib, pcicfgregs *cfg)
sys/dev/pci/pci.c
1338
vrs.cfg = cfg;
sys/dev/pci/pci.c
1344
pci_printf(cfg, "no VPD ident found\n");
sys/dev/pci/pci.c
1347
cfg->vpd.vpd_ident = vpd_read_value(&vrs, size);
sys/dev/pci/pci.c
1348
if (cfg->vpd.vpd_ident == NULL) {
sys/dev/pci/pci.c
1349
pci_printf(cfg, "error accessing VPD ident data\n");
sys/dev/pci/pci.c
1356
pci_printf(cfg, "no read-only VPD data found\n");
sys/dev/pci/pci.c
1362
pci_printf(cfg, "error accessing read-only VPD data\n");
sys/dev/pci/pci.c
1378
pci_printf(cfg, "error accessing writeable VPD data\n");
sys/dev/pci/pci.c
1387
pci_printf(cfg, "No valid VPD end tag found\n");
sys/dev/pci/pci.c
1393
pci_read_vpd(device_t pcib, pcicfgregs *cfg)
sys/dev/pci/pci.c
1397
status = pci_parse_vpd(pcib, cfg);
sys/dev/pci/pci.c
1399
vpd_free(&cfg->vpd);
sys/dev/pci/pci.c
1400
cfg->vpd.vpd_cached = 1;
sys/dev/pci/pci.c
1409
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
1411
if (!cfg->vpd.vpd_cached && cfg->vpd.vpd_reg != 0)
sys/dev/pci/pci.c
1412
pci_read_vpd(device_get_parent(dev), cfg);
sys/dev/pci/pci.c
1414
*identptr = cfg->vpd.vpd_ident;
sys/dev/pci/pci.c
1427
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
1430
if (!cfg->vpd.vpd_cached && cfg->vpd.vpd_reg != 0)
sys/dev/pci/pci.c
1431
pci_read_vpd(device_get_parent(dev), cfg);
sys/dev/pci/pci.c
1433
for (i = 0; i < cfg->vpd.vpd_rocnt; i++)
sys/dev/pci/pci.c
1434
if (memcmp(kw, cfg->vpd.vpd_ros[i].keyword,
sys/dev/pci/pci.c
1435
sizeof(cfg->vpd.vpd_ros[i].keyword)) == 0) {
sys/dev/pci/pci.c
1436
*vptr = cfg->vpd.vpd_ros[i].value;
sys/dev/pci/pci.c
1448
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
1450
if (!cfg->vpd.vpd_cached && cfg->vpd.vpd_reg != 0)
sys/dev/pci/pci.c
1451
pci_read_vpd(device_get_parent(device_get_parent(dev)), cfg);
sys/dev/pci/pci.c
1452
return (&cfg->vpd);
sys/dev/pci/pci.c
1546
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
1561
switch (cfg->hdrtype & PCIM_HDRTYPE) {
sys/dev/pci/pci.c
1629
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
1634
if (cfg->pcie.pcie_location == 0)
sys/dev/pci/pci.c
1666
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
1671
if (cfg->pcie.pcie_location == 0)
sys/dev/pci/pci.c
1698
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
1715
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
1740
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
1759
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
1778
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
1796
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
1832
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
1848
if (cfg->msi.msi_alloc != 0 || cfg->msix.msix_alloc != 0)
sys/dev/pci/pci.c
1856
if (cfg->msix.msix_location == 0 || !pci_do_msix)
sys/dev/pci/pci.c
1861
cfg->msix.msix_table_bar);
sys/dev/pci/pci.c
1865
cfg->msix.msix_table_res = rle->res;
sys/dev/pci/pci.c
1866
if (cfg->msix.msix_pba_bar != cfg->msix.msix_table_bar) {
sys/dev/pci/pci.c
1868
cfg->msix.msix_pba_bar);
sys/dev/pci/pci.c
1873
cfg->msix.msix_pba_res = rle->res;
sys/dev/pci/pci.c
1875
ctrl = pci_read_config(child, cfg->msix.msix_location + PCIR_MSIX_CTRL,
sys/dev/pci/pci.c
1945
cfg->msix.msix_ctrl = ctrl;
sys/dev/pci/pci.c
1950
cfg->msix.msix_vectors = mallocarray(actual, sizeof(struct msix_vector),
sys/dev/pci/pci.c
1952
cfg->msix.msix_table = mallocarray(actual,
sys/dev/pci/pci.c
1956
cfg->msix.msix_vectors[i].mv_irq = rle->start;
sys/dev/pci/pci.c
1957
cfg->msix.msix_table[i].mte_vector = i + 1;
sys/dev/pci/pci.c
1962
pci_write_config(child, cfg->msix.msix_location + PCIR_MSIX_CTRL,
sys/dev/pci/pci.c
1964
cfg->msix.msix_ctrl = ctrl;
sys/dev/pci/pci.c
1967
cfg->msix.msix_alloc = actual;
sys/dev/pci/pci.c
1968
cfg->msix.msix_table_len = actual;
sys/dev/pci/pci.c
2017
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
2139
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
2192
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
2207
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
2218
struct pcicfg_msix *msix = &dinfo->cfg.msix;
sys/dev/pci/pci.c
2232
struct pcicfg_ht *ht = &dinfo->cfg.ht;
sys/dev/pci/pci.c
2260
cap = dinfo->cfg.pcie.pcie_location;
sys/dev/pci/pci.c
2275
cap = dinfo->cfg.pcie.pcie_location;
sys/dev/pci/pci.c
2291
cap = dinfo->cfg.pcie.pcie_location;
sys/dev/pci/pci.c
2307
cap = dinfo->cfg.pcie.pcie_location;
sys/dev/pci/pci.c
2328
cap = dinfo->cfg.pcie.pcie_location;
sys/dev/pci/pci.c
2344
cap = dinfo->cfg.pcie.pcie_location;
sys/dev/pci/pci.c
2365
cap = dinfo->cfg.pcie.pcie_location;
sys/dev/pci/pci.c
2387
struct pcicfg_msi *msi = &dinfo->cfg.msi;
sys/dev/pci/pci.c
2414
struct pcicfg_msi *msi = &dinfo->cfg.msi;
sys/dev/pci/pci.c
2434
struct pcicfg_msi *msi = &dinfo->cfg.msi;
sys/dev/pci/pci.c
2460
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
2474
if (cfg->msi.msi_alloc > 0) {
sys/dev/pci/pci.c
2476
if (cfg->msi.msi_handlers == 0)
sys/dev/pci/pci.c
2478
for (i = 0; i < cfg->msi.msi_alloc; i++) {
sys/dev/pci/pci.c
2487
dinfo->cfg.msi.msi_addr = addr;
sys/dev/pci/pci.c
2488
dinfo->cfg.msi.msi_data = data;
sys/dev/pci/pci.c
2501
if (cfg->msix.msix_alloc > 0) {
sys/dev/pci/pci.c
2504
for (i = 0; i < cfg->msix.msix_alloc; i++) {
sys/dev/pci/pci.c
2505
mv = &cfg->msix.msix_vectors[i];
sys/dev/pci/pci.c
2513
for (j = 0; j < cfg->msix.msix_table_len; j++) {
sys/dev/pci/pci.c
2514
mte = &cfg->msix.msix_table[j];
sys/dev/pci/pci.c
2630
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
2646
if (cfg->msi.msi_alloc != 0 || cfg->msix.msix_alloc != 0)
sys/dev/pci/pci.c
2654
if (cfg->msi.msi_location == 0 || !pci_do_msi)
sys/dev/pci/pci.c
2657
ctrl = pci_read_config(child, cfg->msi.msi_location + PCIR_MSI_CTRL, 2);
sys/dev/pci/pci.c
2736
cfg->msi.msi_ctrl = ctrl;
sys/dev/pci/pci.c
2737
pci_write_config(child, cfg->msi.msi_location + PCIR_MSI_CTRL, ctrl, 2);
sys/dev/pci/pci.c
2740
cfg->msi.msi_alloc = actual;
sys/dev/pci/pci.c
2741
cfg->msi.msi_handlers = 0;
sys/dev/pci/pci.c
2751
struct pcicfg_msi *msi = &dinfo->cfg.msi;
sys/dev/pci/pci.c
2806
struct pcicfg_msi *msi = &dinfo->cfg.msi;
sys/dev/pci/pci.c
2827
if (dinfo->cfg.vpd.vpd_reg)
sys/dev/pci/pci.c
2828
vpd_free(&dinfo->cfg.vpd);
sys/dev/pci/pci.c
2830
STAILQ_FOREACH_SAFE(pm, &dinfo->cfg.maps, pm_link, next) {
sys/dev/pci/pci.c
2851
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
2855
if (cfg->pp.pp_location == 0)
sys/dev/pci/pci.c
2886
status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_location +
sys/dev/pci/pci.c
2893
if ((cfg->pp.pp_cap & PCIM_PCAP_D1SUPP) == 0)
sys/dev/pci/pci.c
2898
if ((cfg->pp.pp_cap & PCIM_PCAP_D2SUPP) == 0)
sys/dev/pci/pci.c
2910
pci_printf(cfg, "Transition from %s to %s\n",
sys/dev/pci/pci.c
2914
PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_location + PCIR_POWER_STATUS,
sys/dev/pci/pci.c
2925
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
2929
if (cfg->pp.pp_location != 0) {
sys/dev/pci/pci.c
2930
status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_location +
sys/dev/pci/pci.c
2961
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
2964
if (cfg->pp.pp_location != 0) {
sys/dev/pci/pci.c
2965
status = pci_read_config(dev, dinfo->cfg.pp.pp_location +
sys/dev/pci/pci.c
2969
pci_write_config(dev, dinfo->cfg.pp.pp_location +
sys/dev/pci/pci.c
2979
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
2982
if (cfg->pp.pp_location != 0) {
sys/dev/pci/pci.c
2983
status = pci_read_config(dev, dinfo->cfg.pp.pp_location +
sys/dev/pci/pci.c
2986
pci_write_config(dev, dinfo->cfg.pp.pp_location +
sys/dev/pci/pci.c
2995
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
2997
return (cfg->pp.pp_location != 0);
sys/dev/pci/pci.c
3086
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
3089
cfg->vendor, cfg->device, cfg->revid);
sys/dev/pci/pci.c
3091
cfg->domain, cfg->bus, cfg->slot, cfg->func);
sys/dev/pci/pci.c
3093
cfg->baseclass, cfg->subclass, cfg->progif, cfg->hdrtype,
sys/dev/pci/pci.c
3094
cfg->mfdev);
sys/dev/pci/pci.c
3096
cfg->cmdreg, cfg->statreg, cfg->cachelnsz);
sys/dev/pci/pci.c
3098
cfg->lattimer, cfg->lattimer * 30, cfg->mingnt,
sys/dev/pci/pci.c
3099
cfg->mingnt * 250, cfg->maxlat, cfg->maxlat * 250);
sys/dev/pci/pci.c
3100
if (cfg->intpin > 0)
sys/dev/pci/pci.c
3102
cfg->intpin +'a' -1, cfg->intline);
sys/dev/pci/pci.c
3103
if (cfg->pp.pp_location) {
sys/dev/pci/pci.c
3106
status = pci_read_config(cfg->dev, cfg->pp.pp_location +
sys/dev/pci/pci.c
3109
cfg->pp.pp_cap & PCIM_PCAP_SPEC,
sys/dev/pci/pci.c
3110
cfg->pp.pp_cap & PCIM_PCAP_D1SUPP ? " D1" : "",
sys/dev/pci/pci.c
3111
cfg->pp.pp_cap & PCIM_PCAP_D2SUPP ? " D2" : "",
sys/dev/pci/pci.c
3114
if (cfg->msi.msi_location) {
sys/dev/pci/pci.c
3117
ctrl = cfg->msi.msi_ctrl;
sys/dev/pci/pci.c
3124
if (cfg->msix.msix_location) {
sys/dev/pci/pci.c
3127
msgnum = PCI_MSIX_MSGNUM(cfg->msix.msix_ctrl);
sys/dev/pci/pci.c
3130
if (cfg->msix.msix_table_bar == cfg->msix.msix_pba_bar)
sys/dev/pci/pci.c
3132
cfg->msix.msix_table_bar);
sys/dev/pci/pci.c
3135
cfg->msix.msix_table_bar,
sys/dev/pci/pci.c
3136
cfg->msix.msix_pba_bar);
sys/dev/pci/pci.c
3168
if (PCIR_IS_BIOS(&dinfo->cfg, reg)) {
sys/dev/pci/pci.c
3238
if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg))
sys/dev/pci/pci.c
3258
STAILQ_FOREACH(pm, &dinfo->cfg.maps, pm_link) {
sys/dev/pci/pci.c
3271
return (STAILQ_FIRST(&dinfo->cfg.maps));
sys/dev/pci/pci.c
3287
if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg) &&
sys/dev/pci/pci.c
3291
if ((dinfo->cfg.flags & PCICFG_VF) != 0) {
sys/dev/pci/pci.c
3294
iov = dinfo->cfg.iov;
sys/dev/pci/pci.c
3301
if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg) || PCI_BAR_MEM(pm->pm_value))
sys/dev/pci/pci.c
3318
STAILQ_FOREACH(prev, &dinfo->cfg.maps, pm_link) {
sys/dev/pci/pci.c
3326
STAILQ_INSERT_AFTER(&dinfo->cfg.maps, prev, pm, pm_link);
sys/dev/pci/pci.c
3328
STAILQ_INSERT_TAIL(&dinfo->cfg.maps, pm, pm_link);
sys/dev/pci/pci.c
3340
STAILQ_FOREACH(pm, &dinfo->cfg.maps, pm_link) {
sys/dev/pci/pci.c
3341
if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg))
sys/dev/pci/pci.c
3591
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
3596
if (cfg->intpin == 0)
sys/dev/pci/pci.c
3603
cfg->domain, cfg->bus, cfg->slot, cfg->intpin + 'A' - 1);
sys/dev/pci/pci.c
3615
if (!PCI_INTERRUPT_VALID(cfg->intline) || force_route)
sys/dev/pci/pci.c
3618
irq = cfg->intline;
sys/dev/pci/pci.c
3626
if (irq != cfg->intline) {
sys/dev/pci/pci.c
3627
cfg->intline = irq;
sys/dev/pci/pci.c
3815
pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg,
sys/dev/pci/pci.c
3823
switch (cfg->hdrtype & PCIM_HDRTYPE) {
sys/dev/pci/pci.c
3923
pcicfgregs *cfg;
sys/dev/pci/pci.c
3929
cfg = &dinfo->cfg;
sys/dev/pci/pci.c
3931
switch (cfg->hdrtype & PCIM_HDRTYPE) {
sys/dev/pci/pci.c
3978
iov = dinfo->cfg.iov;
sys/dev/pci/pci.c
4013
STAILQ_FOREACH(ea, &dinfo->cfg.ea.ea_entries, eae_link) {
sys/dev/pci/pci.c
4040
iov = dinfo->cfg.iov;
sys/dev/pci/pci.c
4043
if (dinfo->cfg.ea.ea_location == 0)
sys/dev/pci/pci.c
4046
STAILQ_FOREACH(ea, &dinfo->cfg.ea.ea_entries, eae_link) {
sys/dev/pci/pci.c
4143
pcicfgregs *cfg;
sys/dev/pci/pci.c
4150
cfg = &dinfo->cfg;
sys/dev/pci/pci.c
4152
devid = (cfg->device << 16) | cfg->vendor;
sys/dev/pci/pci.c
4165
for (i = 0; i < cfg->nummaps;) {
sys/dev/pci/pci.c
4197
if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline) &&
sys/dev/pci/pci.c
4224
pci_reserve_secbus(bus, dev, cfg, rl);
sys/dev/pci/pci.c
4259
PCIB_TRY_ENABLE_ARI(pcib, dinfo->cfg.dev);
sys/dev/pci/pci.c
4398
vf_dinfo->cfg.flags |= PCICFG_VF;
sys/dev/pci/pci.c
4401
return (vf_dinfo->cfg.dev);
sys/dev/pci/pci.c
4423
if (dinfo->cfg.pcie.pcie_location == 0)
sys/dev/pci/pci.c
4459
if (dinfo->cfg.pcie.pcie_location != 0 &&
sys/dev/pci/pci.c
4460
dinfo->cfg.pcie.pcie_type == PCIEM_TYPE_ROOT_PORT) {
sys/dev/pci/pci.c
4461
r2 = pci_read_config(dev, dinfo->cfg.pcie.pcie_location +
sys/dev/pci/pci.c
4465
pci_write_config(dev, dinfo->cfg.pcie.pcie_location +
sys/dev/pci/pci.c
4472
pci_printf(&dinfo->cfg,
sys/dev/pci/pci.c
4501
pci_printf(&dinfo->cfg,
sys/dev/pci/pci.c
4518
r = pci_read_config(dev, dinfo->cfg.pcie.pcie_location +
sys/dev/pci/pci.c
4522
pci_write_config(dev, dinfo->cfg.pcie.pcie_location +
sys/dev/pci/pci.c
4532
dinfo->cfg.dev = dev = device_add_child(bus, NULL, DEVICE_UNIT_ANY);
sys/dev/pci/pci.c
4542
pci_child_added(dinfo->cfg.dev);
sys/dev/pci/pci.c
4547
EVENTHANDLER_INVOKE(pci_add_device, dinfo->cfg.dev);
sys/dev/pci/pci.c
473
if ((dinfo->cfg.domain == domain) &&
sys/dev/pci/pci.c
474
(dinfo->cfg.bus == bus) &&
sys/dev/pci/pci.c
475
(dinfo->cfg.slot == slot) &&
sys/dev/pci/pci.c
476
(dinfo->cfg.func == func)) {
sys/dev/pci/pci.c
481
return (dinfo != NULL ? dinfo->cfg.dev : NULL);
sys/dev/pci/pci.c
4827
pci_printf(&dinfo->cfg, "reprobing on driver added\n");
sys/dev/pci/pci.c
4871
if (dinfo->cfg.msi.msi_alloc > 0) {
sys/dev/pci/pci.c
4872
if (dinfo->cfg.msi.msi_addr == 0) {
sys/dev/pci/pci.c
4873
KASSERT(dinfo->cfg.msi.msi_handlers == 0,
sys/dev/pci/pci.c
4879
dinfo->cfg.msi.msi_addr = addr;
sys/dev/pci/pci.c
4880
dinfo->cfg.msi.msi_data = data;
sys/dev/pci/pci.c
4882
if (dinfo->cfg.msi.msi_handlers == 0)
sys/dev/pci/pci.c
4883
pci_enable_msi(child, dinfo->cfg.msi.msi_addr,
sys/dev/pci/pci.c
4884
dinfo->cfg.msi.msi_data);
sys/dev/pci/pci.c
4885
dinfo->cfg.msi.msi_handlers++;
sys/dev/pci/pci.c
4887
KASSERT(dinfo->cfg.msix.msix_alloc > 0,
sys/dev/pci/pci.c
4889
KASSERT(rid <= dinfo->cfg.msix.msix_table_len,
sys/dev/pci/pci.c
4891
mte = &dinfo->cfg.msix.msix_table[rid - 1];
sys/dev/pci/pci.c
4893
mv = &dinfo->cfg.msix.msix_vectors[mte->mte_vector - 1];
sys/dev/pci/pci.c
492
if ((dinfo->cfg.vendor == vendor) &&
sys/dev/pci/pci.c
493
(dinfo->cfg.device == device)) {
sys/dev/pci/pci.c
494
return (dinfo->cfg.dev);
sys/dev/pci/pci.c
4974
if (dinfo->cfg.msi.msi_alloc > 0) {
sys/dev/pci/pci.c
4975
KASSERT(rid <= dinfo->cfg.msi.msi_alloc,
sys/dev/pci/pci.c
4977
if (dinfo->cfg.msi.msi_handlers == 0)
sys/dev/pci/pci.c
4979
dinfo->cfg.msi.msi_handlers--;
sys/dev/pci/pci.c
4980
if (dinfo->cfg.msi.msi_handlers == 0)
sys/dev/pci/pci.c
4983
KASSERT(dinfo->cfg.msix.msix_alloc > 0,
sys/dev/pci/pci.c
4985
KASSERT(rid <= dinfo->cfg.msix.msix_table_len,
sys/dev/pci/pci.c
4987
mte = &dinfo->cfg.msix.msix_table[rid - 1];
sys/dev/pci/pci.c
507
if (dinfo->cfg.baseclass == class &&
sys/dev/pci/pci.c
508
dinfo->cfg.subclass == subclass) {
sys/dev/pci/pci.c
509
return (dinfo->cfg.dev);
sys/dev/pci/pci.c
5190
pci_printf(&dinfo->cfg, "Device leaked IRQ resources\n");
sys/dev/pci/pci.c
5191
if (dinfo->cfg.msi.msi_alloc != 0 || dinfo->cfg.msix.msix_alloc != 0) {
sys/dev/pci/pci.c
5192
if (dinfo->cfg.msi.msi_alloc != 0)
sys/dev/pci/pci.c
5193
pci_printf(&dinfo->cfg, "Device leaked %d MSI "
sys/dev/pci/pci.c
5194
"vectors\n", dinfo->cfg.msi.msi_alloc);
sys/dev/pci/pci.c
5196
pci_printf(&dinfo->cfg, "Device leaked %d MSI-X "
sys/dev/pci/pci.c
5197
"vectors\n", dinfo->cfg.msix.msix_alloc);
sys/dev/pci/pci.c
5201
pci_printf(&dinfo->cfg, "Device leaked memory resources\n");
sys/dev/pci/pci.c
5203
pci_printf(&dinfo->cfg, "Device leaked I/O resources\n");
sys/dev/pci/pci.c
5205
pci_printf(&dinfo->cfg, "Device leaked PCI bus numbers\n");
sys/dev/pci/pci.c
524
if (from != dinfo->cfg.dev)
sys/dev/pci/pci.c
529
if (dinfo->cfg.baseclass == class &&
sys/dev/pci/pci.c
530
dinfo->cfg.subclass == subclass) {
sys/dev/pci/pci.c
531
return (dinfo->cfg.dev);
sys/dev/pci/pci.c
5341
pcicfgregs *cfg;
sys/dev/pci/pci.c
5344
cfg = &dinfo->cfg;
sys/dev/pci/pci.c
5355
*result = cfg->subvendor;
sys/dev/pci/pci.c
5358
*result = cfg->subdevice;
sys/dev/pci/pci.c
5361
*result = cfg->vendor;
sys/dev/pci/pci.c
5364
*result = cfg->device;
sys/dev/pci/pci.c
5367
*result = (cfg->device << 16) | cfg->vendor;
sys/dev/pci/pci.c
5370
*result = cfg->baseclass;
sys/dev/pci/pci.c
5373
*result = cfg->subclass;
sys/dev/pci/pci.c
5376
*result = cfg->progif;
sys/dev/pci/pci.c
5379
*result = cfg->revid;
sys/dev/pci/pci.c
5382
*result = cfg->intpin;
sys/dev/pci/pci.c
5385
*result = cfg->intline;
sys/dev/pci/pci.c
5388
*result = cfg->domain;
sys/dev/pci/pci.c
5391
*result = cfg->bus;
sys/dev/pci/pci.c
5394
*result = cfg->slot;
sys/dev/pci/pci.c
5397
*result = cfg->func;
sys/dev/pci/pci.c
5400
*result = cfg->cmdreg;
sys/dev/pci/pci.c
5403
*result = cfg->cachelnsz;
sys/dev/pci/pci.c
5406
if (cfg->hdrtype != PCIM_HDRTYPE_NORMAL) {
sys/dev/pci/pci.c
5410
*result = cfg->mingnt;
sys/dev/pci/pci.c
5413
if (cfg->hdrtype != PCIM_HDRTYPE_NORMAL) {
sys/dev/pci/pci.c
5417
*result = cfg->maxlat;
sys/dev/pci/pci.c
5420
*result = cfg->lattimer;
sys/dev/pci/pci.c
5437
dinfo->cfg.intpin = value;
sys/dev/pci/pci.c
546
if (from != dinfo->cfg.dev)
sys/dev/pci/pci.c
5491
if (dinfo->cfg.dev)
sys/dev/pci/pci.c
5492
name = device_get_name(dinfo->cfg.dev);
sys/dev/pci/pci.c
5498
(name && *name) ? (int)device_get_unit(dinfo->cfg.dev) :
sys/dev/pci/pci.c
551
if (dinfo->cfg.baseclass == class) {
sys/dev/pci/pci.c
552
return (dinfo->cfg.dev);
sys/dev/pci/pci.c
5549
if (PCIR_IS_BIOS(&dinfo->cfg, rid))
sys/dev/pci/pci.c
5558
if (PCI_BAR_MEM(map) || PCIR_IS_BIOS(&dinfo->cfg, rid)) {
sys/dev/pci/pci.c
560
pci_printf(pcicfgregs *cfg, const char *fmt, ...)
sys/dev/pci/pci.c
5633
pcicfgregs *cfg;
sys/dev/pci/pci.c
5640
cfg = &dinfo->cfg;
sys/dev/pci/pci.c
565
retval = printf("pci%d:%d:%d:%d: ", cfg->domain, cfg->bus, cfg->slot,
sys/dev/pci/pci.c
5650
if (rid == 0 && (cfg->msi.msi_alloc > 0 ||
sys/dev/pci/pci.c
5651
cfg->msix.msix_alloc > 0))
sys/dev/pci/pci.c
5659
if (rid == 0 && !PCI_INTERRUPT_VALID(cfg->intline) &&
sys/dev/pci/pci.c
566
cfg->func);
sys/dev/pci/pci.c
5660
(cfg->intpin != 0))
sys/dev/pci/pci.c
5670
if (cfg->hdrtype == PCIM_HDRTYPE_BRIDGE) {
sys/dev/pci/pci.c
5710
if (dinfo->cfg.flags & PCICFG_VF) {
sys/dev/pci/pci.c
5733
pcicfgregs *cfg __unused;
sys/dev/pci/pci.c
5739
cfg = &dinfo->cfg;
sys/dev/pci/pci.c
5742
if (cfg->flags & PCICFG_VF) {
sys/dev/pci/pci.c
5759
if (cfg->hdrtype == PCIM_HDRTYPE_BRIDGE &&
sys/dev/pci/pci.c
5785
if (dinfo->cfg.flags & PCICFG_VF) {
sys/dev/pci/pci.c
5808
if (type == SYS_RES_MEMORY && PCIR_IS_BIOS(&dinfo->cfg, rid))
sys/dev/pci/pci.c
5833
if (dinfo->cfg.flags & PCICFG_VF) {
sys/dev/pci/pci.c
5855
if (type == SYS_RES_MEMORY && PCIR_IS_BIOS(&dinfo->cfg, rid))
sys/dev/pci/pci.c
5873
if (dinfo->cfg.flags & PCICFG_VF) {
sys/dev/pci/pci.c
5902
if (dinfo->cfg.flags & PCICFG_VF) {
sys/dev/pci/pci.c
5930
if (dinfo->cfg.flags & PCICFG_VF) {
sys/dev/pci/pci.c
5971
pci_printf(&dinfo->cfg,
sys/dev/pci/pci.c
6058
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
6065
if (cfg->flags & PCICFG_VF) {
sys/dev/pci/pci.c
6069
return (cfg->device << 16 | cfg->vendor);
sys/dev/pci/pci.c
6071
return (cfg->vendor);
sys/dev/pci/pci.c
6073
return (cfg->vendor & 0xff);
sys/dev/pci/pci.c
6081
return (cfg->device);
sys/dev/pci/pci.c
6083
return (cfg->device & 0xff);
sys/dev/pci/pci.c
6092
cfg->bus, cfg->slot, cfg->func, reg, width));
sys/dev/pci/pci.c
6100
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
6103
cfg->bus, cfg->slot, cfg->func, reg, val, width);
sys/dev/pci/pci.c
6120
pcicfgregs *cfg;
sys/dev/pci/pci.c
6123
cfg = &dinfo->cfg;
sys/dev/pci/pci.c
6125
"subdevice=0x%04x class=0x%02x%02x%02x", cfg->vendor, cfg->device,
sys/dev/pci/pci.c
6126
cfg->subvendor, cfg->subdevice, cfg->baseclass, cfg->subclass,
sys/dev/pci/pci.c
6127
cfg->progif);
sys/dev/pci/pci.c
6153
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/pci/pci.c
6156
cfg->intpin));
sys/dev/pci/pci.c
6239
struct pcicfg_pcie *cfg;
sys/dev/pci/pci.c
6242
cfg = &dinfo->cfg.pcie;
sys/dev/pci/pci.c
6243
pos = cfg->pcie_location;
sys/dev/pci/pci.c
6245
version = cfg->pcie_flags & PCIEM_FLAGS_VERSION;
sys/dev/pci/pci.c
6247
WREG(PCIER_DEVICE_CTL, cfg->pcie_device_ctl);
sys/dev/pci/pci.c
6249
if (version > 1 || cfg->pcie_type == PCIEM_TYPE_ROOT_PORT ||
sys/dev/pci/pci.c
6250
cfg->pcie_type == PCIEM_TYPE_ENDPOINT ||
sys/dev/pci/pci.c
6251
cfg->pcie_type == PCIEM_TYPE_LEGACY_ENDPOINT)
sys/dev/pci/pci.c
6252
WREG(PCIER_LINK_CTL, cfg->pcie_link_ctl);
sys/dev/pci/pci.c
6254
if (version > 1 || (cfg->pcie_type == PCIEM_TYPE_ROOT_PORT ||
sys/dev/pci/pci.c
6255
(cfg->pcie_type == PCIEM_TYPE_DOWNSTREAM_PORT &&
sys/dev/pci/pci.c
6256
(cfg->pcie_flags & PCIEM_FLAGS_SLOT))))
sys/dev/pci/pci.c
6257
WREG(PCIER_SLOT_CTL, cfg->pcie_slot_ctl);
sys/dev/pci/pci.c
6259
if (version > 1 || cfg->pcie_type == PCIEM_TYPE_ROOT_PORT ||
sys/dev/pci/pci.c
6260
cfg->pcie_type == PCIEM_TYPE_ROOT_EC)
sys/dev/pci/pci.c
6261
WREG(PCIER_ROOT_CTL, cfg->pcie_root_ctl);
sys/dev/pci/pci.c
6264
WREG(PCIER_DEVICE_CTL2, cfg->pcie_device_ctl2);
sys/dev/pci/pci.c
6265
WREG(PCIER_LINK_CTL2, cfg->pcie_link_ctl2);
sys/dev/pci/pci.c
6266
WREG(PCIER_SLOT_CTL2, cfg->pcie_slot_ctl2);
sys/dev/pci/pci.c
6274
pci_write_config(dev, dinfo->cfg.pcix.pcix_location + PCIXR_COMMAND,
sys/dev/pci/pci.c
6275
dinfo->cfg.pcix.pcix_command, 2);
sys/dev/pci/pci.c
6292
pci_write_config(dev, PCIR_INTLINE, dinfo->cfg.intline, 1);
sys/dev/pci/pci.c
6293
pci_write_config(dev, PCIR_INTPIN, dinfo->cfg.intpin, 1);
sys/dev/pci/pci.c
6294
pci_write_config(dev, PCIR_CACHELNSZ, dinfo->cfg.cachelnsz, 1);
sys/dev/pci/pci.c
6295
pci_write_config(dev, PCIR_LATTIMER, dinfo->cfg.lattimer, 1);
sys/dev/pci/pci.c
6296
pci_write_config(dev, PCIR_PROGIF, dinfo->cfg.progif, 1);
sys/dev/pci/pci.c
6297
pci_write_config(dev, PCIR_REVID, dinfo->cfg.revid, 1);
sys/dev/pci/pci.c
6298
switch (dinfo->cfg.hdrtype & PCIM_HDRTYPE) {
sys/dev/pci/pci.c
6300
pci_write_config(dev, PCIR_MINGNT, dinfo->cfg.mingnt, 1);
sys/dev/pci/pci.c
6301
pci_write_config(dev, PCIR_MAXLAT, dinfo->cfg.maxlat, 1);
sys/dev/pci/pci.c
6305
dinfo->cfg.bridge.br_seclat, 1);
sys/dev/pci/pci.c
6307
dinfo->cfg.bridge.br_subbus, 1);
sys/dev/pci/pci.c
6309
dinfo->cfg.bridge.br_secbus, 1);
sys/dev/pci/pci.c
6311
dinfo->cfg.bridge.br_pribus, 1);
sys/dev/pci/pci.c
6313
dinfo->cfg.bridge.br_control, 2);
sys/dev/pci/pci.c
6317
dinfo->cfg.bridge.br_seclat, 1);
sys/dev/pci/pci.c
6319
dinfo->cfg.bridge.br_subbus, 1);
sys/dev/pci/pci.c
6321
dinfo->cfg.bridge.br_secbus, 1);
sys/dev/pci/pci.c
6323
dinfo->cfg.bridge.br_pribus, 1);
sys/dev/pci/pci.c
6325
dinfo->cfg.bridge.br_control, 2);
sys/dev/pci/pci.c
6330
if ((dinfo->cfg.hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_BRIDGE)
sys/dev/pci/pci.c
6331
pci_write_config(dev, PCIR_COMMAND, dinfo->cfg.cmdreg, 2);
sys/dev/pci/pci.c
6336
if (dinfo->cfg.pcie.pcie_location != 0)
sys/dev/pci/pci.c
6338
if (dinfo->cfg.pcix.pcix_location != 0)
sys/dev/pci/pci.c
6342
if (dinfo->cfg.msi.msi_location != 0)
sys/dev/pci/pci.c
6344
if (dinfo->cfg.msix.msix_location != 0)
sys/dev/pci/pci.c
6348
if (dinfo->cfg.iov != NULL)
sys/dev/pci/pci.c
6357
struct pcicfg_pcie *cfg;
sys/dev/pci/pci.c
6360
cfg = &dinfo->cfg.pcie;
sys/dev/pci/pci.c
6361
pos = cfg->pcie_location;
sys/dev/pci/pci.c
6363
cfg->pcie_flags = RREG(PCIER_FLAGS);
sys/dev/pci/pci.c
6365
version = cfg->pcie_flags & PCIEM_FLAGS_VERSION;
sys/dev/pci/pci.c
6367
cfg->pcie_device_ctl = RREG(PCIER_DEVICE_CTL);
sys/dev/pci/pci.c
6369
if (version > 1 || cfg->pcie_type == PCIEM_TYPE_ROOT_PORT ||
sys/dev/pci/pci.c
6370
cfg->pcie_type == PCIEM_TYPE_ENDPOINT ||
sys/dev/pci/pci.c
6371
cfg->pcie_type == PCIEM_TYPE_LEGACY_ENDPOINT)
sys/dev/pci/pci.c
6372
cfg->pcie_link_ctl = RREG(PCIER_LINK_CTL);
sys/dev/pci/pci.c
6374
if (version > 1 || (cfg->pcie_type == PCIEM_TYPE_ROOT_PORT ||
sys/dev/pci/pci.c
6375
(cfg->pcie_type == PCIEM_TYPE_DOWNSTREAM_PORT &&
sys/dev/pci/pci.c
6376
(cfg->pcie_flags & PCIEM_FLAGS_SLOT))))
sys/dev/pci/pci.c
6377
cfg->pcie_slot_ctl = RREG(PCIER_SLOT_CTL);
sys/dev/pci/pci.c
6379
if (version > 1 || cfg->pcie_type == PCIEM_TYPE_ROOT_PORT ||
sys/dev/pci/pci.c
6380
cfg->pcie_type == PCIEM_TYPE_ROOT_EC)
sys/dev/pci/pci.c
6381
cfg->pcie_root_ctl = RREG(PCIER_ROOT_CTL);
sys/dev/pci/pci.c
6384
cfg->pcie_device_ctl2 = RREG(PCIER_DEVICE_CTL2);
sys/dev/pci/pci.c
6385
cfg->pcie_link_ctl2 = RREG(PCIER_LINK_CTL2);
sys/dev/pci/pci.c
6386
cfg->pcie_slot_ctl2 = RREG(PCIER_SLOT_CTL2);
sys/dev/pci/pci.c
6394
dinfo->cfg.pcix.pcix_command = pci_read_config(dev,
sys/dev/pci/pci.c
6395
dinfo->cfg.pcix.pcix_location + PCIXR_COMMAND, 2);
sys/dev/pci/pci.c
6411
dinfo->cfg.vendor = pci_read_config(dev, PCIR_VENDOR, 2);
sys/dev/pci/pci.c
6412
dinfo->cfg.device = pci_read_config(dev, PCIR_DEVICE, 2);
sys/dev/pci/pci.c
6413
dinfo->cfg.cmdreg = pci_read_config(dev, PCIR_COMMAND, 2);
sys/dev/pci/pci.c
6414
dinfo->cfg.intline = pci_read_config(dev, PCIR_INTLINE, 1);
sys/dev/pci/pci.c
6415
dinfo->cfg.intpin = pci_read_config(dev, PCIR_INTPIN, 1);
sys/dev/pci/pci.c
6416
dinfo->cfg.cachelnsz = pci_read_config(dev, PCIR_CACHELNSZ, 1);
sys/dev/pci/pci.c
6417
dinfo->cfg.lattimer = pci_read_config(dev, PCIR_LATTIMER, 1);
sys/dev/pci/pci.c
6418
dinfo->cfg.baseclass = pci_read_config(dev, PCIR_CLASS, 1);
sys/dev/pci/pci.c
6419
dinfo->cfg.subclass = pci_read_config(dev, PCIR_SUBCLASS, 1);
sys/dev/pci/pci.c
6420
dinfo->cfg.progif = pci_read_config(dev, PCIR_PROGIF, 1);
sys/dev/pci/pci.c
6421
dinfo->cfg.revid = pci_read_config(dev, PCIR_REVID, 1);
sys/dev/pci/pci.c
6422
switch (dinfo->cfg.hdrtype & PCIM_HDRTYPE) {
sys/dev/pci/pci.c
6424
dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_0, 2);
sys/dev/pci/pci.c
6425
dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_0, 2);
sys/dev/pci/pci.c
6426
dinfo->cfg.mingnt = pci_read_config(dev, PCIR_MINGNT, 1);
sys/dev/pci/pci.c
6427
dinfo->cfg.maxlat = pci_read_config(dev, PCIR_MAXLAT, 1);
sys/dev/pci/pci.c
6430
dinfo->cfg.bridge.br_seclat = pci_read_config(dev,
sys/dev/pci/pci.c
6432
dinfo->cfg.bridge.br_subbus = pci_read_config(dev,
sys/dev/pci/pci.c
6434
dinfo->cfg.bridge.br_secbus = pci_read_config(dev,
sys/dev/pci/pci.c
6436
dinfo->cfg.bridge.br_pribus = pci_read_config(dev,
sys/dev/pci/pci.c
6438
dinfo->cfg.bridge.br_control = pci_read_config(dev,
sys/dev/pci/pci.c
6442
dinfo->cfg.bridge.br_seclat = pci_read_config(dev,
sys/dev/pci/pci.c
6444
dinfo->cfg.bridge.br_subbus = pci_read_config(dev,
sys/dev/pci/pci.c
6446
dinfo->cfg.bridge.br_secbus = pci_read_config(dev,
sys/dev/pci/pci.c
6448
dinfo->cfg.bridge.br_pribus = pci_read_config(dev,
sys/dev/pci/pci.c
6450
dinfo->cfg.bridge.br_control = pci_read_config(dev,
sys/dev/pci/pci.c
6452
dinfo->cfg.subvendor = pci_read_config(dev, PCIR_SUBVEND_2, 2);
sys/dev/pci/pci.c
6453
dinfo->cfg.subdevice = pci_read_config(dev, PCIR_SUBDEV_2, 2);
sys/dev/pci/pci.c
6457
if (dinfo->cfg.pcie.pcie_location != 0)
sys/dev/pci/pci.c
6460
if (dinfo->cfg.pcix.pcix_location != 0)
sys/dev/pci/pci.c
6464
if (dinfo->cfg.iov != NULL)
sys/dev/pci/pci.c
6566
if (dinfo->cfg.pcie.pcie_location != 0 &&
sys/dev/pci/pci.c
6567
dinfo->cfg.pcie.pcie_type == PCIEM_TYPE_ROOT_PORT)
sys/dev/pci/pci.c
6590
cap = dinfo->cfg.pcie.pcie_location;
sys/dev/pci/pci.c
6625
cap = dinfo->cfg.pcie.pcie_location;
sys/dev/pci/pci.c
6634
if ((dinfo->cfg.pcie.pcie_flags & PCIEM_FLAGS_VERSION) < 2 ||
sys/dev/pci/pci.c
6710
if (dinfo->cfg.pcie.pcie_location != 0) {
sys/dev/pci/pci.c
6711
rs = pci_read_config(dev, dinfo->cfg.pcie.pcie_location +
sys/dev/pci/pci.c
6716
pci_write_config(dev, dinfo->cfg.pcie.pcie_location +
sys/dev/pci/pci.c
672
pci_fixancient(pcicfgregs *cfg)
sys/dev/pci/pci.c
674
if ((cfg->hdrtype & PCIM_HDRTYPE) != PCIM_HDRTYPE_NORMAL)
sys/dev/pci/pci.c
6747
cap = dinfo->cfg.pcie.pcie_location;
sys/dev/pci/pci.c
6769
pci_printf(&dinfo->cfg,
sys/dev/pci/pci.c
678
if (cfg->baseclass == PCIC_BRIDGE && cfg->subclass == PCIS_BRIDGE_PCI)
sys/dev/pci/pci.c
679
cfg->hdrtype = PCIM_HDRTYPE_BRIDGE;
sys/dev/pci/pci.c
6795
pci_printf(&dinfo->cfg, "Transactions pending after FLR!\n");
sys/dev/pci/pci.c
685
pci_hdrtypedata(device_t pcib, int b, int s, int f, pcicfgregs *cfg)
sys/dev/pci/pci.c
688
switch (cfg->hdrtype & PCIM_HDRTYPE) {
sys/dev/pci/pci.c
690
cfg->subvendor = REG(PCIR_SUBVEND_0, 2);
sys/dev/pci/pci.c
691
cfg->subdevice = REG(PCIR_SUBDEV_0, 2);
sys/dev/pci/pci.c
692
cfg->mingnt = REG(PCIR_MINGNT, 1);
sys/dev/pci/pci.c
6929
dev = dinfo->cfg.dev;
sys/dev/pci/pci.c
693
cfg->maxlat = REG(PCIR_MAXLAT, 1);
sys/dev/pci/pci.c
6930
printf("pci%d:%d:%d:%d", dinfo->cfg.domain, dinfo->cfg.bus,
sys/dev/pci/pci.c
6931
dinfo->cfg.slot, dinfo->cfg.func);
sys/dev/pci/pci.c
694
cfg->nummaps = PCI_MAXMAPS_0;
sys/dev/pci/pci.c
6947
dev = dinfo->cfg.dev;
sys/dev/pci/pci.c
6956
if (dinfo->cfg.pcie.pcie_location != 0) {
sys/dev/pci/pci.c
6958
dinfo->cfg.pcie.pcie_location +
sys/dev/pci/pci.c
6966
dinfo->cfg.pcie.pcie_location +
sys/dev/pci/pci.c
697
cfg->bridge.br_seclat = REG(PCIR_SECLAT_1, 1);
sys/dev/pci/pci.c
698
cfg->bridge.br_subbus = REG(PCIR_SUBBUS_1, 1);
sys/dev/pci/pci.c
699
cfg->bridge.br_secbus = REG(PCIR_SECBUS_1, 1);
sys/dev/pci/pci.c
700
cfg->bridge.br_pribus = REG(PCIR_PRIBUS_1, 1);
sys/dev/pci/pci.c
701
cfg->bridge.br_control = REG(PCIR_BRIDGECTL_1, 2);
sys/dev/pci/pci.c
7010
dev = dinfo->cfg.dev;
sys/dev/pci/pci.c
7011
r = pci_read_config(dev, dinfo->cfg.pcie.pcie_location +
sys/dev/pci/pci.c
7013
pci_write_config(dev, dinfo->cfg.pcie.pcie_location +
sys/dev/pci/pci.c
702
cfg->nummaps = PCI_MAXMAPS_1;
sys/dev/pci/pci.c
7033
dev = dinfo->cfg.dev;
sys/dev/pci/pci.c
7042
if (dinfo->cfg.pcie.pcie_location != 0)
sys/dev/pci/pci.c
705
cfg->bridge.br_seclat = REG(PCIR_SECLAT_2, 1);
sys/dev/pci/pci.c
706
cfg->bridge.br_subbus = REG(PCIR_SUBBUS_2, 1);
sys/dev/pci/pci.c
707
cfg->bridge.br_secbus = REG(PCIR_SECBUS_2, 1);
sys/dev/pci/pci.c
708
cfg->bridge.br_pribus = REG(PCIR_PRIBUS_2, 1);
sys/dev/pci/pci.c
709
cfg->bridge.br_control = REG(PCIR_BRIDGECTL_2, 2);
sys/dev/pci/pci.c
710
cfg->subvendor = REG(PCIR_SUBVEND_2, 2);
sys/dev/pci/pci.c
711
cfg->subdevice = REG(PCIR_SUBDEV_2, 2);
sys/dev/pci/pci.c
712
cfg->nummaps = PCI_MAXMAPS_2;
sys/dev/pci/pci.c
747
pcicfgregs *cfg;
sys/dev/pci/pci.c
751
cfg = &devlist_entry->cfg;
sys/dev/pci/pci.c
753
cfg->domain = d;
sys/dev/pci/pci.c
754
cfg->bus = b;
sys/dev/pci/pci.c
755
cfg->slot = s;
sys/dev/pci/pci.c
756
cfg->func = f;
sys/dev/pci/pci.c
757
cfg->vendor = vid;
sys/dev/pci/pci.c
758
cfg->device = did;
sys/dev/pci/pci.c
759
cfg->cmdreg = REG(PCIR_COMMAND, 2);
sys/dev/pci/pci.c
760
cfg->statreg = REG(PCIR_STATUS, 2);
sys/dev/pci/pci.c
761
cfg->baseclass = REG(PCIR_CLASS, 1);
sys/dev/pci/pci.c
762
cfg->subclass = REG(PCIR_SUBCLASS, 1);
sys/dev/pci/pci.c
763
cfg->progif = REG(PCIR_PROGIF, 1);
sys/dev/pci/pci.c
764
cfg->revid = REG(PCIR_REVID, 1);
sys/dev/pci/pci.c
765
cfg->hdrtype = REG(PCIR_HDRTYPE, 1);
sys/dev/pci/pci.c
766
cfg->cachelnsz = REG(PCIR_CACHELNSZ, 1);
sys/dev/pci/pci.c
767
cfg->lattimer = REG(PCIR_LATTIMER, 1);
sys/dev/pci/pci.c
768
cfg->intpin = REG(PCIR_INTPIN, 1);
sys/dev/pci/pci.c
769
cfg->intline = REG(PCIR_INTLINE, 1);
sys/dev/pci/pci.c
771
cfg->mfdev = (cfg->hdrtype & PCIM_MFDEV) != 0;
sys/dev/pci/pci.c
772
cfg->hdrtype &= ~PCIM_MFDEV;
sys/dev/pci/pci.c
773
STAILQ_INIT(&cfg->maps);
sys/dev/pci/pci.c
775
cfg->iov = NULL;
sys/dev/pci/pci.c
777
pci_fixancient(cfg);
sys/dev/pci/pci.c
778
pci_hdrtypedata(pcib, b, s, f, cfg);
sys/dev/pci/pci.c
781
pci_read_cap(pcib, cfg);
sys/dev/pci/pci.c
785
devlist_entry->conf.pc_sel.pc_domain = cfg->domain;
sys/dev/pci/pci.c
786
devlist_entry->conf.pc_sel.pc_bus = cfg->bus;
sys/dev/pci/pci.c
787
devlist_entry->conf.pc_sel.pc_dev = cfg->slot;
sys/dev/pci/pci.c
788
devlist_entry->conf.pc_sel.pc_func = cfg->func;
sys/dev/pci/pci.c
789
devlist_entry->conf.pc_hdr = cfg->hdrtype;
sys/dev/pci/pci.c
791
devlist_entry->conf.pc_subvendor = cfg->subvendor;
sys/dev/pci/pci.c
792
devlist_entry->conf.pc_subdevice = cfg->subdevice;
sys/dev/pci/pci.c
793
devlist_entry->conf.pc_vendor = cfg->vendor;
sys/dev/pci/pci.c
794
devlist_entry->conf.pc_device = cfg->device;
sys/dev/pci/pci.c
796
devlist_entry->conf.pc_class = cfg->baseclass;
sys/dev/pci/pci.c
797
devlist_entry->conf.pc_subclass = cfg->subclass;
sys/dev/pci/pci.c
798
devlist_entry->conf.pc_progif = cfg->progif;
sys/dev/pci/pci.c
799
devlist_entry->conf.pc_revid = cfg->revid;
sys/dev/pci/pci.c
801
devlist_entry->conf.pc_secbus = cfg->bridge.br_secbus;
sys/dev/pci/pci.c
802
devlist_entry->conf.pc_subbus = cfg->bridge.br_subbus;
sys/dev/pci/pci.c
812
pci_ea_fill_info(device_t pcib, pcicfgregs *cfg)
sys/dev/pci/pci.c
814
#define REG(n, w) PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, \
sys/dev/pci/pci.c
815
cfg->ea.ea_location + (n), w)
sys/dev/pci/pci.c
825
if (cfg->ea.ea_location == 0)
sys/dev/pci/pci.c
828
STAILQ_INIT(&cfg->ea.ea_entries);
sys/dev/pci/pci.c
838
if ((cfg->hdrtype & PCIM_HDRTYPE) == PCIM_HDRTYPE_BRIDGE)
sys/dev/pci/pci.c
843
eae->eae_cfg_offset = cfg->ea.ea_location + ptr;
sys/dev/pci/pci.c
87
#define PCIR_IS_BIOS(cfg, reg) \
sys/dev/pci/pci.c
874
STAILQ_INSERT_TAIL(&cfg->ea.ea_entries, eae, eae_link);
sys/dev/pci/pci.c
878
cfg->vendor, cfg->device, eae->eae_bei, eae->eae_flags,
sys/dev/pci/pci.c
88
(((cfg)->hdrtype == PCIM_HDRTYPE_NORMAL && reg == PCIR_BIOS) || \
sys/dev/pci/pci.c
886
pci_read_cap(device_t pcib, pcicfgregs *cfg)
sys/dev/pci/pci.c
888
#define REG(n, w) PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w)
sys/dev/pci/pci.c
889
#define WREG(n, v, w) PCIB_WRITE_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, v, w)
sys/dev/pci/pci.c
89
((cfg)->hdrtype == PCIM_HDRTYPE_BRIDGE && reg == PCIR_BIOS_1))
sys/dev/pci/pci.c
896
switch (cfg->hdrtype & PCIM_HDRTYPE) {
sys/dev/pci/pci.c
926
cfg->pp.pp_location = ptr;
sys/dev/pci/pci.c
927
cfg->pp.pp_cap = REG(ptr + PCIR_POWER_CAP, 2);
sys/dev/pci/pci.c
934
cfg->ht.ht_slave = ptr;
sys/dev/pci/pci.c
949
cfg->domain, cfg->bus,
sys/dev/pci/pci.c
950
cfg->slot, cfg->func,
sys/dev/pci/pci.c
955
cfg->ht.ht_msimap = ptr;
sys/dev/pci/pci.c
956
cfg->ht.ht_msictrl = val;
sys/dev/pci/pci.c
957
cfg->ht.ht_msiaddr = addr;
sys/dev/pci/pci.c
963
cfg->msi.msi_location = ptr;
sys/dev/pci/pci.c
964
cfg->msi.msi_ctrl = REG(ptr + PCIR_MSI_CTRL, 2);
sys/dev/pci/pci.c
967
cfg->msix.msix_location = ptr;
sys/dev/pci/pci.c
968
cfg->msix.msix_ctrl = REG(ptr + PCIR_MSIX_CTRL, 2);
sys/dev/pci/pci.c
970
cfg->msix.msix_table_bar = PCIR_BAR(val &
sys/dev/pci/pci.c
972
cfg->msix.msix_table_offset = val & ~PCIM_MSIX_BIR_MASK;
sys/dev/pci/pci.c
974
cfg->msix.msix_pba_bar = PCIR_BAR(val &
sys/dev/pci/pci.c
976
cfg->msix.msix_pba_offset = val & ~PCIM_MSIX_BIR_MASK;
sys/dev/pci/pci.c
979
cfg->vpd.vpd_reg = ptr;
sys/dev/pci/pci.c
983
if ((cfg->hdrtype & PCIM_HDRTYPE) ==
sys/dev/pci/pci.c
986
cfg->subvendor = val & 0xffff;
sys/dev/pci/pci.c
987
cfg->subdevice = val >> 16;
sys/dev/pci/pci.c
998
if ((cfg->hdrtype & PCIM_HDRTYPE) ==
sys/dev/pci/pci_iov.c
1043
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
1104
KASSERT(rman_is_region_manager(r, &dinfo->cfg.iov->rman),
sys/dev/pci/pci_iov.c
1106
&dinfo->cfg.iov->rman, r));
sys/dev/pci/pci_iov.c
1136
KASSERT(rman_is_region_manager(r, &dinfo->cfg.iov->rman),
sys/dev/pci/pci_iov.c
1138
&dinfo->cfg.iov->rman, r));
sys/dev/pci/pci_iov.c
1167
KASSERT(rman_is_region_manager(r, &dinfo->cfg.iov->rman),
sys/dev/pci/pci_iov.c
1169
&dinfo->cfg.iov->rman, r));
sys/dev/pci/pci_iov.c
1192
KASSERT(rman_is_region_manager(r, &dinfo->cfg.iov->rman),
sys/dev/pci/pci_iov.c
1194
&dinfo->cfg.iov->rman, r));
sys/dev/pci/pci_iov.c
1220
struct pcicfg_iov *iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
1230
&dinfo->cfg.iov->rman, r));
sys/dev/pci/pci_iov.c
1241
pres = pci_vf_find_parent_resource(dinfo->cfg.iov, r);
sys/dev/pci/pci_iov.c
1255
struct pcicfg_iov *iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
1262
&dinfo->cfg.iov->rman, r));
sys/dev/pci/pci_iov.c
143
iov = malloc(sizeof(*dinfo->cfg.iov), M_SRIOV, M_WAITOK | M_ZERO);
sys/dev/pci/pci_iov.c
146
if (dinfo->cfg.iov != NULL) {
sys/dev/pci/pci_iov.c
172
dinfo->cfg.iov = iov;
sys/dev/pci/pci_iov.c
196
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
214
dinfo->cfg.iov = NULL;
sys/dev/pci/pci_iov.c
347
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
348
dev = dinfo->cfg.dev;
sys/dev/pci/pci_iov.c
379
dinfo->cfg.vf.index * bar->bar_size;
sys/dev/pci/pci_iov.c
381
pci_add_bar(dinfo->cfg.dev, PCIR_BAR(i), bar_start,
sys/dev/pci/pci_iov.c
553
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
582
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
583
dev = dinfo->cfg.dev;
sys/dev/pci/pci_iov.c
634
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
635
dev = dinfo->cfg.dev;
sys/dev/pci/pci_iov.c
661
vfinfo->cfg.iov = iov;
sys/dev/pci/pci_iov.c
662
vfinfo->cfg.vf.index = i;
sys/dev/pci/pci_iov.c
693
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
694
dev = dinfo->cfg.dev;
sys/dev/pci/pci_iov.c
829
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
841
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
85
pci_read_config((d)->cfg.dev, (d)->cfg.iov->iov_pos + r, w)
sys/dev/pci/pci_iov.c
855
if (!(vfinfo->cfg.flags & PCICFG_VF))
sys/dev/pci/pci_iov.c
858
return (pf == vfinfo->cfg.iov);
sys/dev/pci/pci_iov.c
871
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
872
dev = dinfo->cfg.dev;
sys/dev/pci/pci_iov.c
88
pci_write_config((d)->cfg.dev, (d)->cfg.iov->iov_pos + r, v, w)
sys/dev/pci/pci_iov.c
948
iov = dinfo->cfg.iov;
sys/dev/pci/pci_iov.c
978
packed = nvlist_pack(dinfo->cfg.iov->iov_schema, &size);
sys/dev/pci/pci_pci.c
2752
if (pdinfo->cfg.pcie.pcie_location != 0 &&
sys/dev/pci/pci_pci.c
2753
(pdinfo->cfg.pcie.pcie_type == PCIEM_TYPE_DOWNSTREAM_PORT ||
sys/dev/pci/pci_pci.c
2754
pdinfo->cfg.pcie.pcie_type == PCIEM_TYPE_ROOT_PORT)) {
sys/dev/pci/pci_pci.c
2758
pdinfo->cfg.pcie.pcie_location);
sys/dev/pci/pci_user.c
1303
if (dinfo->cfg.dev)
sys/dev/pci/pci_user.c
1304
name = device_get_name(dinfo->cfg.dev);
sys/dev/pci/pci_user.c
1310
device_get_unit(dinfo->cfg.dev);
sys/dev/pci/pci_user.c
1316
if (dinfo->cfg.dev != NULL &&
sys/dev/pci/pci_user.c
1317
bus_get_domain(dinfo->cfg.dev, &domain) == 0)
sys/dev/pci/pci_user.c
1322
if (dinfo->cfg.dev != NULL) {
sys/dev/pci/pci_user.c
1331
pci_read_config(dinfo->cfg.dev,
sys/dev/pci/pci_user.c
1334
pci_read_config(dinfo->cfg.dev,
sys/dev/pci/pci_user.c
1339
pci_read_config(dinfo->cfg.dev,
sys/dev/pci/pci_user.c
1342
pci_read_config(dinfo->cfg.dev,
sys/dev/pci/pcivar.h
333
pcicfgregs cfg;
sys/dev/puc/puc.c
447
puc_bfe_probe(device_t dev, const struct puc_cfg *cfg)
sys/dev/puc/puc.c
455
sc->sc_cfg = cfg;
sys/dev/puc/puc.c
458
if (cfg->ports == PUC_PORT_1S || cfg->ports == PUC_PORT_1P)
sys/dev/puc/puc_cfg.c
111
if (cfg->d_ofs < 0)
sys/dev/puc/puc_cfg.c
113
*r = port * cfg->d_ofs;
sys/dev/puc/puc_cfg.c
118
if (cfg->rid < 0)
sys/dev/puc/puc_cfg.c
120
*r = cfg->rid;
sys/dev/puc/puc_cfg.c
123
if (cfg->d_rid < 0)
sys/dev/puc/puc_cfg.c
125
if (cfg->rid < 0) {
sys/dev/puc/puc_cfg.c
130
*r = cfg->rid;
sys/dev/puc/puc_cfg.c
131
*r += port * cfg->d_rid;
sys/dev/puc/puc_cfg.c
135
if (cfg->ports == PUC_PORT_NONSTANDARD)
sys/dev/puc/puc_cfg.c
139
if (cfg->ports == PUC_PORT_1P ||
sys/dev/puc/puc_cfg.c
140
cfg->ports == PUC_PORT_2P)
sys/dev/puc/puc_cfg.c
146
if (cfg->ports == PUC_PORT_1S1P ||
sys/dev/puc/puc_cfg.c
147
cfg->ports == PUC_PORT_1S2P ||
sys/dev/puc/puc_cfg.c
148
cfg->ports == PUC_PORT_2P)
sys/dev/puc/puc_cfg.c
154
if (cfg->ports == PUC_PORT_1S2P ||
sys/dev/puc/puc_cfg.c
155
cfg->ports == PUC_PORT_2S1P)
sys/dev/puc/puc_cfg.c
161
if (cfg->ports == PUC_PORT_4S1P)
sys/dev/puc/puc_cfg.c
42
const struct puc_cfg *cfg = sc->sc_cfg;
sys/dev/puc/puc_cfg.c
45
if (cfg->config_function != NULL) {
sys/dev/puc/puc_cfg.c
46
error = cfg->config_function(sc, cmd, port, r);
sys/dev/puc/puc_cfg.c
54
if (cfg->clock < 0)
sys/dev/puc/puc_cfg.c
56
*r = cfg->clock;
sys/dev/puc/puc_cfg.c
59
if (cfg->desc == NULL)
sys/dev/puc/puc_cfg.c
61
*r = (intptr_t)cfg->desc;
sys/dev/puc/puc_cfg.c
72
switch (cfg->ports) {
sys/dev/puc/pucdata.c
1733
const struct puc_cfg *cfg;
sys/dev/puc/pucdata.c
1750
cfg = sc->sc_cfg;
sys/dev/puc/pucdata.c
1751
switch (cfg->subvendor) {
sys/dev/puc/pucdata.c
1753
switch (cfg->device) {
sys/dev/puc/pucdata.c
1790
bar = puc_get_bar(sc, cfg->rid + i * cfg->d_rid);
sys/dev/puc/pucdata.c
1837
const struct puc_cfg *cfg = sc->sc_cfg;
sys/dev/puc/pucdata.c
1840
if (cfg->subdevice == 0x1282) /* Everest SP */
sys/dev/puc/pucdata.c
1842
else if (cfg->subdevice == 0x104b) /* Maestro SP2 */
sys/dev/puc/pucdata.c
1890
const struct puc_cfg *cfg = sc->sc_cfg;
sys/dev/puc/pucdata.c
1893
if (port == 3 && (cfg->device == 0x1045 ||
sys/dev/puc/pucdata.c
1894
cfg->device == 0x1144))
sys/dev/puc/pucdata.c
1907
const struct puc_cfg *cfg = sc->sc_cfg;
sys/dev/puc/pucdata.c
1917
bar = puc_get_bar(sc, cfg->rid);
sys/dev/puc/pucdata.c
1923
bus_write_1(bar->b_res, REG_SPR, 0x80 + -cfg->clock);
sys/dev/puc/pucdata.c
1927
if (v0 == 0 && v1 == 0x80 + -cfg->clock) {
sys/dev/puc/pucdata.c
1945
if (v0 < -cfg->clock)
sys/dev/puc/pucdata.c
1959
"%d selected\n", 1 << -cfg->clock);
sys/dev/puc/pucdata.c
1964
if (v0 == 0 && v1 == 0x80 + -cfg->clock) {
sys/dev/puc/pucdata.c
1979
*res = DEFAULT_RCLK << -cfg->clock;
sys/dev/puc/pucdata.c
1986
*res = (v0 == 0 && v1 == 0x80 + -cfg->clock) ?
sys/dev/puc/pucdata.c
2000
const struct puc_cfg *cfg = sc->sc_cfg;
sys/dev/puc/pucdata.c
2007
bar = puc_get_bar(sc, cfg->rid);
sys/dev/puc/pucdata.c
2073
const struct puc_cfg *cfg = sc->sc_cfg;
sys/dev/puc/pucdata.c
2077
if (cfg->ports == PUC_PORT_8S) {
sys/dev/puc/pucdata.c
2083
if (cfg->ports == PUC_PORT_8S) {
sys/dev/puc/pucdata.c
2087
if (cfg->ports == PUC_PORT_2S1P) {
sys/dev/puc/pucdata.c
2204
const struct puc_cfg *cfg = sc->sc_cfg;
sys/dev/puc/pucdata.c
2215
bar = puc_get_bar(sc, cfg->rid);
sys/dev/puc/pucdata.c
2250
bar = puc_get_bar(sc, cfg->rid);
sys/dev/qat/include/common/adf_accel_devices.h
384
const uint32_t **cfg);
sys/dev/qat/include/common/adf_accel_devices.h
671
struct adf_cfg_device_data *cfg;
sys/dev/qat/qat_common/adf_cfg.c
112
struct adf_cfg_device_data *dev_cfg_data = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg.c
124
accel_dev->cfg = NULL;
sys/dev/qat/qat_common/adf_cfg.c
160
struct list_head *restore_list = &accel_dev->cfg->sec_list;
sys/dev/qat/qat_common/adf_cfg.c
195
struct adf_cfg_device_data *dev_cfg_data = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg.c
27
accel_dev->cfg = dev_cfg_data;
sys/dev/qat/qat_common/adf_cfg.c
273
struct adf_cfg_device_data *cfg = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg.c
276
list_for_each(list, &cfg->sec_list)
sys/dev/qat/qat_common/adf_cfg.c
326
struct adf_cfg_device_data *cfg = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg.c
373
sx_xlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
375
sx_xunlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
416
struct list_head *head = &accel_dev->cfg->sec_list;
sys/dev/qat/qat_common/adf_cfg.c
435
struct adf_cfg_device_data *dev_cfg_data = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg.c
461
struct adf_cfg_device_data *cfg = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg.c
467
sx_xlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
469
sx_xunlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
487
struct adf_cfg_device_data *cfg = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg.c
497
sx_xlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
498
list_add_tail(&sec->list, &cfg->sec_list);
sys/dev/qat/qat_common/adf_cfg.c
499
sx_xunlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
507
struct adf_cfg_device_data *cfg = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg.c
517
sx_xlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
519
sx_xunlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
530
struct adf_cfg_device_data *cfg = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg.c
544
sx_xlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
546
sx_xunlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
585
struct adf_cfg_device_data *cfg = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg.c
588
sx_slock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
590
sx_sunlock(&cfg->lock);
sys/dev/qat/qat_common/adf_cfg.c
73
accel_dev->cfg = NULL;
sys/dev/qat/qat_common/adf_cfg.c
85
struct adf_cfg_device_data *dev_cfg_data = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg_device.c
1018
if (strcmp(ADF_CFG_SYM_ASYM, accel_dev->cfg->cfg_services) == 0) {
sys/dev/qat/qat_common/adf_cfg_device.c
1022
accel_dev->cfg->cfg_services,
sys/dev/qat/qat_common/adf_cfg_device.c
1176
struct adf_cfg_device_data *cfg = NULL;
sys/dev/qat/qat_common/adf_cfg_device.c
1189
cfg = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg_device.c
1190
cfg->dev = NULL;
sys/dev/qat/qat_common/adf_cfg_device.c
1200
cfg->dev = cfg_device;
sys/dev/qat/qat_common/adf_cfg_device.c
1203
list_for_each(list, &cfg->sec_list)
sys/dev/qat/qat_common/adf_cfg_device.c
1217
list_for_each(list, &cfg->sec_list)
sys/dev/qat/qat_common/adf_cfg_device.c
1231
list_for_each(list, &cfg->sec_list)
sys/dev/qat/qat_common/adf_cfg_device.c
1245
list_for_each(list, &cfg->sec_list)
sys/dev/qat/qat_common/adf_cfg_device.c
1270
list_for_each(list, &cfg->sec_list)
sys/dev/qat/qat_common/adf_cfg_device.c
1289
cfg->dev = NULL;
sys/dev/qat/qat_common/adf_cfg_device.c
339
struct adf_cfg_device *cfg_dev = accel_dev->cfg->dev;
sys/dev/qat/qat_common/adf_cfg_device.c
683
sx_xlock(&accel_dev->cfg->lock);
sys/dev/qat/qat_common/adf_cfg_device.c
684
if (accel_dev->cfg->dev) {
sys/dev/qat/qat_common/adf_cfg_device.c
685
adf_cfg_device_clear(accel_dev->cfg->dev, accel_dev);
sys/dev/qat/qat_common/adf_cfg_device.c
686
free(accel_dev->cfg->dev, M_QAT);
sys/dev/qat/qat_common/adf_cfg_device.c
687
accel_dev->cfg->dev = NULL;
sys/dev/qat/qat_common/adf_cfg_device.c
689
sx_xunlock(&accel_dev->cfg->lock);
sys/dev/qat/qat_common/adf_cfg_device.c
746
val = accel_dev->cfg->num_user_processes;
sys/dev/qat/qat_common/adf_cfg_device.c
973
strncpy(value, accel_dev->cfg->cfg_mode, ADF_CFG_MAX_VAL);
sys/dev/qat/qat_common/adf_cfg_device.c
986
strncpy(value, accel_dev->cfg->cfg_services, ADF_CFG_MAX_VAL);
sys/dev/qat/qat_common/adf_cfg_section.c
1110
if (!accel_dev || !accel_dev->cfg || !accel_dev->hw_device)
sys/dev/qat/qat_common/adf_cfg_section.c
1113
cfg_dev = accel_dev->cfg->dev;
sys/dev/qat/qat_common/adf_cfg_section.c
1152
accel_dev->cfg->dev = NULL;
sys/dev/qat/qat_common/adf_cfg_section.c
530
if (adf_cfg_get_ring_pairs(accel_dev->cfg->dev,
sys/dev/qat/qat_common/adf_cfg_section.c
665
accel_dev->cfg->dev, dc_inst, derived_sec, accel_dev))
sys/dev/qat/qat_common/adf_cfg_section.c
853
first_used_bundle = accel_dev->cfg->dev->max_kernel_bundle_nr + 1;
sys/dev/qat/qat_common/adf_cfg_sysctl.c
116
dev_cfg_data = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg_sysctl.c
170
dev_cfg_data = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg_sysctl.c
221
dev_cfg_data = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg_sysctl.c
265
dev_cfg_data = accel_dev->cfg;
sys/dev/qat/qat_common/adf_cfg_sysctl.c
86
cfg_dev = accel_dev->cfg->dev;
sys/dev/qat/qat_common/adf_cfg_sysctl.c
89
accel_dev->cfg->dev = NULL;
sys/dev/qat/qat_common/adf_freebsd_cfg_dev_dbg.c
48
struct adf_cfg_device_data *dev_cfg_data = accel_dev->cfg;
sys/dev/qat/qat_common/adf_freebsd_cfg_dev_dbg.c
74
struct adf_cfg_device_data *dev_cfg_data = accel_dev->cfg;
sys/dev/qat/qat_hw/qat_200xx/adf_drv.c
241
cfg_dev = accel_dev->cfg->dev;
sys/dev/qat/qat_hw/qat_200xx/adf_drv.c
244
accel_dev->cfg->dev = NULL;
sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c
304
cfg_dev = accel_dev->cfg->dev;
sys/dev/qat/qat_hw/qat_4xxx/adf_drv.c
307
accel_dev->cfg->dev = NULL;
sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c
218
cfg_dev = accel_dev->cfg->dev;
sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c
221
accel_dev->cfg->dev = NULL;
sys/dev/qat/qat_hw/qat_c3xxx/adf_drv.c
230
cfg_dev = accel_dev->cfg->dev;
sys/dev/qat/qat_hw/qat_c3xxx/adf_drv.c
233
accel_dev->cfg->dev = NULL;
sys/dev/qat/qat_hw/qat_c4xxx/adf_drv.c
229
cfg_dev = accel_dev->cfg->dev;
sys/dev/qat/qat_hw/qat_c4xxx/adf_drv.c
232
accel_dev->cfg->dev = NULL;
sys/dev/qat/qat_hw/qat_c62x/adf_drv.c
231
cfg_dev = accel_dev->cfg->dev;
sys/dev/qat/qat_hw/qat_c62x/adf_drv.c
234
accel_dev->cfg->dev = NULL;
sys/dev/qat/qat_hw/qat_dh895xcc/adf_drv.c
219
cfg_dev = accel_dev->cfg->dev;
sys/dev/qat/qat_hw/qat_dh895xcc/adf_drv.c
222
accel_dev->cfg->dev = NULL;
sys/dev/qcom_clk/qcom_clk_rcg2.c
161
uint32_t cfg, m = 0, n = 0, hid_div = 0;
sys/dev/qcom_clk/qcom_clk_rcg2.c
170
&cfg);
sys/dev/qcom_clk/qcom_clk_rcg2.c
181
mode = (cfg & QCOM_CLK_RCG2_CFG_MODE_MASK)
sys/dev/qcom_clk/qcom_clk_rcg2.c
188
hid_div = (cfg >> QCOM_CLK_RCG2_CFG_SRC_DIV_SHIFT) & mask;
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
117
struct qcom_tlmm_pinctrl_cfg *cfg)
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
158
phandle_t node, struct qcom_tlmm_pinctrl_cfg *cfg, char **pins,
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
168
rv = OF_getprop_alloc(node, "function", (void **)&cfg->function);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
170
cfg->function = NULL;
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
183
rv = OF_getencprop(node, prop_names[i].name, &cfg->params[i],
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
184
sizeof(cfg->params[i]));
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
191
cfg->params[i] = 0;
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
195
cfg->params[i] = 0;
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
198
cfg->params[i] = -1;
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
205
const struct qcom_tlmm_gpio_mux *gmux, struct qcom_tlmm_pinctrl_cfg *cfg)
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
211
__func__, pin_name, cfg->function);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
219
if (cfg->function != NULL) {
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
222
tmp = qcom_tlmm_pinctrl_gmux_function(gmux, cfg->function);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
228
cfg->function);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
256
if (cfg->params[i] == -1)
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
263
cfg->params[i]);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
352
gmux->id, cfg->params[i]);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
358
cfg->params[i], err);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
433
cfg->params[i]);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
447
char *pin_name, struct qcom_tlmm_pinctrl_cfg *cfg)
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
457
rv = qcom_tlmm_pinctrl_config_gmux(sc, pin_name, gmux, cfg);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
463
rv = qcom_tlmm_pinctrl_config_spin(sc, pin_name, spin, cfg);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
474
struct qcom_tlmm_pinctrl_cfg cfg;
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
482
rv = qcom_tlmm_pinctrl_read_node(sc, node, &cfg, &pins, &lpins);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
493
rv = qcom_tlmm_pinctrl_config_node(sc, pname, &cfg);
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
504
if (cfg.function != NULL)
sys/dev/qcom_tlmm/qcom_tlmm_pinmux.c
505
free(cfg.function, M_OFWPROP);
sys/dev/re/if_re.c
1226
uint8_t cfg;
sys/dev/re/if_re.c
1326
cfg = CSR_READ_1(sc, RL_CFG2);
sys/dev/re/if_re.c
1327
cfg |= RL_CFG2_MSI;
sys/dev/re/if_re.c
1328
CSR_WRITE_1(sc, RL_CFG2, cfg);
sys/dev/re/if_re.c
1363
cfg = CSR_READ_1(sc, RL_CFG2);
sys/dev/re/if_re.c
1364
if ((cfg & RL_CFG2_MSI) != 0) {
sys/dev/re/if_re.c
1366
cfg &= ~RL_CFG2_MSI;
sys/dev/re/if_re.c
1367
CSR_WRITE_1(sc, RL_CFG2, cfg);
sys/dev/re/if_re.c
1561
cfg = CSR_READ_1(sc, sc->rl_cfg1);
sys/dev/re/if_re.c
1562
cfg |= RL_CFG1_PME;
sys/dev/re/if_re.c
1563
CSR_WRITE_1(sc, sc->rl_cfg1, cfg);
sys/dev/re/if_re.c
1564
cfg = CSR_READ_1(sc, sc->rl_cfg5);
sys/dev/re/if_re.c
1565
cfg &= RL_CFG5_PME_STS;
sys/dev/re/if_re.c
1566
CSR_WRITE_1(sc, sc->rl_cfg5, cfg);
sys/dev/re/if_re.c
3095
uint16_t cfg;
sys/dev/re/if_re.c
3157
cfg = RL_CPLUSCMD_PCI_MRW;
sys/dev/re/if_re.c
3159
cfg |= RL_CPLUSCMD_RXCSUM_ENB;
sys/dev/re/if_re.c
3161
cfg |= RL_CPLUSCMD_VLANSTRIP;
sys/dev/re/if_re.c
3163
cfg |= RL_CPLUSCMD_MACSTAT_DIS;
sys/dev/re/if_re.c
3165
cfg |= 0x0001;
sys/dev/re/if_re.c
3167
cfg |= RL_CPLUSCMD_RXENB | RL_CPLUSCMD_TXENB;
sys/dev/re/if_re.c
3168
CSR_WRITE_2(sc, RL_CPLUS_CMD, cfg);
sys/dev/sound/pci/envy24.c
1003
ptr->cs = ptr->parent->cfg->cs;
sys/dev/sound/pci/envy24.c
1013
ptr->cclk = ptr->parent->cfg->cclk;
sys/dev/sound/pci/envy24.c
1014
ptr->cdti = ptr->parent->cfg->cdti;
sys/dev/sound/pci/envy24.c
1015
spicds_settype(ptr->info, ptr->parent->cfg->type);
sys/dev/sound/pci/envy24.c
1016
spicds_setcif(ptr->info, ptr->parent->cfg->cif);
sys/dev/sound/pci/envy24.c
1025
if (ptr->parent->cfg->subvendor == 0x153b && \
sys/dev/sound/pci/envy24.c
1026
ptr->parent->cfg->subdevice == 0x1138 && ptr->num == 100) {
sys/dev/sound/pci/envy24.c
1142
if (sc->cfg->subvendor==0x153b && sc->cfg->subdevice==0x1138 ) {
sys/dev/sound/pci/envy24.c
149
struct cfg_info *cfg;
sys/dev/sound/pci/envy24.c
1994
if (dev == 0 && sc->cfg->codec->setvolume == NULL)
sys/dev/sound/pci/envy24.c
2007
sc->cfg->codec->setvolume(sc->dac[i], PCMDIR_PLAY, left, right);
sys/dev/sound/pci/envy24.c
2292
sc->cfg->subvendor, sc->cfg->subdevice);
sys/dev/sound/pci/envy24.c
2294
switch (sc->cfg->scfg & PCIM_SCFG_XIN2) {
sys/dev/sound/pci/envy24.c
2308
if (sc->cfg->scfg & PCIM_SCFG_MPU)
sys/dev/sound/pci/envy24.c
2313
if (sc->cfg->scfg & PCIM_SCFG_AC97)
sys/dev/sound/pci/envy24.c
2322
if ((sc->cfg->acl & PCIM_ACL_MTC) == 0) {
sys/dev/sound/pci/envy24.c
2324
if (sc->cfg->acl & PCIM_ACL_OMODE)
sys/dev/sound/pci/envy24.c
2329
if (sc->cfg->acl & PCIM_ACL_IMODE)
sys/dev/sound/pci/envy24.c
2337
if (sc->cfg->i2s & PCIM_I2S_VOL)
sys/dev/sound/pci/envy24.c
2339
if (sc->cfg->i2s & PCIM_I2S_96KHZ)
sys/dev/sound/pci/envy24.c
2341
switch (sc->cfg->i2s & PCIM_I2S_RES) {
sys/dev/sound/pci/envy24.c
2355
printf("ID#0x%x)\n", sc->cfg->i2s & PCIM_I2S_ID);
sys/dev/sound/pci/envy24.c
2358
if (sc->cfg->spdif & PCIM_SPDIF_IN)
sys/dev/sound/pci/envy24.c
2362
if (sc->cfg->spdif & PCIM_SPDIF_OUT)
sys/dev/sound/pci/envy24.c
2366
if (sc->cfg->spdif & (PCIM_SPDIF_IN | PCIM_SPDIF_OUT))
sys/dev/sound/pci/envy24.c
2367
printf("ID# 0x%02x\n", (sc->cfg->spdif & PCIM_SPDIF_ID) >> 2);
sys/dev/sound/pci/envy24.c
2369
sc->cfg->gpiomask, sc->cfg->gpiodir, sc->cfg->gpiostate);
sys/dev/sound/pci/envy24.c
2398
sc->cfg = NULL;
sys/dev/sound/pci/envy24.c
2407
sc->cfg = &cfg_table[i];
sys/dev/sound/pci/envy24.c
2411
if (sc->cfg == NULL) {
sys/dev/sound/pci/envy24.c
2413
sc->cfg = envy24_rom2cfg(sc);
sys/dev/sound/pci/envy24.c
2415
sc->adcn = ((sc->cfg->scfg & PCIM_SCFG_ADC) >> 2) + 1;
sys/dev/sound/pci/envy24.c
2416
sc->dacn = (sc->cfg->scfg & PCIM_SCFG_DAC) + 1;
sys/dev/sound/pci/envy24.c
2423
pci_write_config(sc->dev, PCIR_SCFG, sc->cfg->scfg, 1);
sys/dev/sound/pci/envy24.c
2424
pci_write_config(sc->dev, PCIR_ACL, sc->cfg->acl, 1);
sys/dev/sound/pci/envy24.c
2425
pci_write_config(sc->dev, PCIR_I2S, sc->cfg->i2s, 1);
sys/dev/sound/pci/envy24.c
2426
pci_write_config(sc->dev, PCIR_SPDIF, sc->cfg->spdif, 1);
sys/dev/sound/pci/envy24.c
2427
envy24_gpiosetmask(sc, sc->cfg->gpiomask);
sys/dev/sound/pci/envy24.c
2428
envy24_gpiosetdir(sc, sc->cfg->gpiodir);
sys/dev/sound/pci/envy24.c
2429
envy24_gpiowr(sc, sc->cfg->gpiostate);
sys/dev/sound/pci/envy24.c
2431
sc->adc[i] = sc->cfg->codec->create(sc->dev, sc, PCMDIR_REC, i);
sys/dev/sound/pci/envy24.c
2432
sc->cfg->codec->init(sc->adc[i]);
sys/dev/sound/pci/envy24.c
2435
sc->dac[i] = sc->cfg->codec->create(sc->dev, sc, PCMDIR_PLAY, i);
sys/dev/sound/pci/envy24.c
2436
sc->cfg->codec->init(sc->dac[i]);
sys/dev/sound/pci/envy24.c
2614
if (sc->cfg->codec->destroy != NULL) {
sys/dev/sound/pci/envy24.c
2616
sc->cfg->codec->destroy(sc->adc[i]);
sys/dev/sound/pci/envy24.c
2618
sc->cfg->codec->destroy(sc->dac[i]);
sys/dev/sound/pci/envy24.c
2620
envy24_cfgfree(sc->cfg);
sys/dev/sound/pci/envy24.c
2652
if (sc->cfg->codec->destroy != NULL) {
sys/dev/sound/pci/envy24.c
2654
sc->cfg->codec->destroy(sc->adc[i]);
sys/dev/sound/pci/envy24.c
2656
sc->cfg->codec->destroy(sc->dac[i]);
sys/dev/sound/pci/envy24.c
2658
envy24_cfgfree(sc->cfg);
sys/dev/sound/pci/envy24.c
626
envy24_cfgfree(struct cfg_info *cfg) {
sys/dev/sound/pci/envy24.c
627
if (cfg == NULL)
sys/dev/sound/pci/envy24.c
629
if (cfg->free)
sys/dev/sound/pci/envy24.c
630
free(cfg, M_ENVY24);
sys/dev/sound/pci/envy24ht.c
1069
if ((((sc->cfg->scfg & ENVY24HT_CCSM_SCFG_XIN2) == 0x00) && (code == ENVY24HT_MT_RATE_192000)) || \
sys/dev/sound/pci/envy24ht.c
148
struct cfg_info *cfg;
sys/dev/sound/pci/envy24ht.c
1908
if (dev == 0 && sc->cfg->codec->setvolume == NULL)
sys/dev/sound/pci/envy24ht.c
1921
sc->cfg->codec->setvolume(sc->dac[i], PCMDIR_PLAY, left, right);
sys/dev/sound/pci/envy24ht.c
2190
sc->cfg->subvendor, sc->cfg->subdevice);
sys/dev/sound/pci/envy24ht.c
2192
switch (sc->cfg->scfg & ENVY24HT_CCSM_SCFG_XIN2) {
sys/dev/sound/pci/envy24ht.c
2206
if (sc->cfg->scfg & ENVY24HT_CCSM_SCFG_MPU)
sys/dev/sound/pci/envy24ht.c
2227
if ((sc->cfg->acl & ENVY24HT_CCSM_ACL_MTC) == 0) {
sys/dev/sound/pci/envy24ht.c
2229
if (sc->cfg->acl & ENVY24HT_CCSM_ACL_OMODE)
sys/dev/sound/pci/envy24ht.c
2237
if (sc->cfg->i2s & ENVY24HT_CCSM_I2S_VOL)
sys/dev/sound/pci/envy24ht.c
2239
if (sc->cfg->i2s & ENVY24HT_CCSM_I2S_192KHZ)
sys/dev/sound/pci/envy24ht.c
2242
if (sc->cfg->i2s & ENVY24HT_CCSM_I2S_96KHZ)
sys/dev/sound/pci/envy24ht.c
2246
switch (sc->cfg->i2s & ENVY24HT_CCSM_I2S_RES) {
sys/dev/sound/pci/envy24ht.c
2260
printf("ID#0x%x)\n", sc->cfg->i2s & ENVY24HT_CCSM_I2S_ID);
sys/dev/sound/pci/envy24ht.c
2263
if (sc->cfg->spdif & ENVY24HT_CCSM_SPDIF_IN)
sys/dev/sound/pci/envy24ht.c
2267
if (sc->cfg->spdif & ENVY24HT_CCSM_SPDIF_OUT)
sys/dev/sound/pci/envy24ht.c
2271
if (sc->cfg->spdif & (ENVY24HT_CCSM_SPDIF_IN | ENVY24HT_CCSM_SPDIF_OUT))
sys/dev/sound/pci/envy24ht.c
2272
printf("ID# 0x%02x\n", (sc->cfg->spdif & ENVY24HT_CCSM_SPDIF_ID) >> 2);
sys/dev/sound/pci/envy24ht.c
2274
sc->cfg->gpiomask, sc->cfg->gpiodir, sc->cfg->gpiostate);
sys/dev/sound/pci/envy24ht.c
2305
sc->cfg = NULL;
sys/dev/sound/pci/envy24ht.c
2314
sc->cfg = &cfg_table[i];
sys/dev/sound/pci/envy24ht.c
2318
if (sc->cfg == NULL) {
sys/dev/sound/pci/envy24ht.c
2320
sc->cfg = envy24ht_rom2cfg(sc);
sys/dev/sound/pci/envy24ht.c
2322
sc->adcn = ((sc->cfg->scfg & ENVY24HT_CCSM_SCFG_ADC) >> 2) + 1; /* need to be fixed */
sys/dev/sound/pci/envy24ht.c
2323
sc->dacn = (sc->cfg->scfg & ENVY24HT_CCSM_SCFG_DAC) + 1;
sys/dev/sound/pci/envy24ht.c
2330
envy24ht_wrcs(sc, ENVY24HT_CCS_SCFG, sc->cfg->scfg, 1);
sys/dev/sound/pci/envy24ht.c
2331
envy24ht_wrcs(sc, ENVY24HT_CCS_ACL, sc->cfg->acl, 1);
sys/dev/sound/pci/envy24ht.c
2332
envy24ht_wrcs(sc, ENVY24HT_CCS_I2S, sc->cfg->i2s, 1);
sys/dev/sound/pci/envy24ht.c
2333
envy24ht_wrcs(sc, ENVY24HT_CCS_SPDIF, sc->cfg->spdif, 1);
sys/dev/sound/pci/envy24ht.c
2334
envy24ht_gpiosetmask(sc, sc->cfg->gpiomask);
sys/dev/sound/pci/envy24ht.c
2335
envy24ht_gpiosetdir(sc, sc->cfg->gpiodir);
sys/dev/sound/pci/envy24ht.c
2336
envy24ht_gpiowr(sc, sc->cfg->gpiostate);
sys/dev/sound/pci/envy24ht.c
2338
if ((sc->cfg->subvendor == 0x3031) && (sc->cfg->subdevice == 0x4553)) {
sys/dev/sound/pci/envy24ht.c
2345
sc->adc[i] = sc->cfg->codec->create(sc->dev, sc, PCMDIR_REC, i);
sys/dev/sound/pci/envy24ht.c
2346
sc->cfg->codec->init(sc->adc[i]);
sys/dev/sound/pci/envy24ht.c
2349
sc->dac[i] = sc->cfg->codec->create(sc->dev, sc, PCMDIR_PLAY, i);
sys/dev/sound/pci/envy24ht.c
2350
sc->cfg->codec->init(sc->dac[i]);
sys/dev/sound/pci/envy24ht.c
2514
if (sc->cfg->codec->destroy != NULL) {
sys/dev/sound/pci/envy24ht.c
2516
sc->cfg->codec->destroy(sc->adc[i]);
sys/dev/sound/pci/envy24ht.c
2518
sc->cfg->codec->destroy(sc->dac[i]);
sys/dev/sound/pci/envy24ht.c
2520
envy24ht_cfgfree(sc->cfg);
sys/dev/sound/pci/envy24ht.c
2548
if (sc->cfg->codec->destroy != NULL) {
sys/dev/sound/pci/envy24ht.c
2550
sc->cfg->codec->destroy(sc->adc[i]);
sys/dev/sound/pci/envy24ht.c
2552
sc->cfg->codec->destroy(sc->dac[i]);
sys/dev/sound/pci/envy24ht.c
2554
envy24ht_cfgfree(sc->cfg);
sys/dev/sound/pci/envy24ht.c
707
envy24ht_cfgfree(struct cfg_info *cfg) {
sys/dev/sound/pci/envy24ht.c
708
if (cfg == NULL)
sys/dev/sound/pci/envy24ht.c
710
if (cfg->free)
sys/dev/sound/pci/envy24ht.c
711
free(cfg, M_ENVY24HT);
sys/dev/sound/pci/envy24ht.c
829
if (sc->cfg->subvendor == 0x153b && sc->cfg->subdevice == 0x1150)
sys/dev/sound/pci/envy24ht.c
843
if (sc->cfg->subdevice != 0x1150)
sys/dev/sound/pci/envy24ht.c
860
if (sc->cfg->subdevice != 0x1150)
sys/dev/sound/pci/envy24ht.c
876
if (sc->cfg->subvendor == 0x153b && sc->cfg->subdevice == 0x1150)
sys/dev/sound/pci/envy24ht.c
976
ptr->cs = ptr->parent->cfg->cs;
sys/dev/sound/pci/envy24ht.c
977
ptr->cclk = ptr->parent->cfg->cclk;
sys/dev/sound/pci/envy24ht.c
978
ptr->cdti = ptr->parent->cfg->cdti;
sys/dev/sound/pci/envy24ht.c
979
spicds_settype(ptr->info, ptr->parent->cfg->type);
sys/dev/sound/pci/envy24ht.c
980
spicds_setcif(ptr->info, ptr->parent->cfg->cif);
sys/dev/sound/pci/envy24ht.c
981
if (ptr->parent->cfg->type == SPICDS_TYPE_AK4524 || \
sys/dev/sound/pci/envy24ht.c
982
ptr->parent->cfg->type == SPICDS_TYPE_AK4528) {
sys/dev/ste/if_ste.c
255
uint16_t cfg;
sys/dev/ste/if_ste.c
281
cfg = CSR_READ_2(sc, STE_MACCTL0);
sys/dev/ste/if_ste.c
282
cfg &= ~(STE_MACCTL0_FLOWCTL_ENABLE | STE_MACCTL0_FULLDUPLEX);
sys/dev/ste/if_ste.c
294
cfg |= STE_MACCTL0_FULLDUPLEX;
sys/dev/ste/if_ste.c
296
CSR_WRITE_2(sc, STE_MACCTL0, cfg);
sys/dev/thunderbolt/hcm.c
119
struct tb_cfg_router *cfg;
sys/dev/thunderbolt/hcm.c
143
cfg = (struct tb_cfg_router *)buf;
sys/dev/thunderbolt/hcm.c
147
cap.next_cap = GET_ROUTER_CS_NEXT_CAP(cfg);
sys/dev/thunderbolt/router.c
278
struct tb_cfg_router *cfg;
sys/dev/thunderbolt/router.c
292
cfg = (struct tb_cfg_router *)buf;
sys/dev/thunderbolt/router.c
293
up = GET_ROUTER_CS_UPSTREAM_ADAP(cfg);
sys/dev/thunderbolt/router.c
294
sc->max_adap = GET_ROUTER_CS_MAX_ADAP(cfg);
sys/dev/thunderbolt/router.c
295
sc->depth = GET_ROUTER_CS_DEPTH(cfg);
sys/dev/thunderbolt/router.c
296
sc->uuid[0] = cfg->uuid_lo;
sys/dev/thunderbolt/router.c
297
sc->uuid[1] = cfg->uuid_hi;
sys/dev/thunderbolt/router.c
842
struct tb_cfg_router *cfg;
sys/dev/thunderbolt/router.c
856
cfg = (struct tb_cfg_router *)buf;
sys/dev/thunderbolt/router.c
859
rcap.next_cap = GET_ROUTER_CS_NEXT_CAP(cfg);
sys/dev/thunderbolt/router.c
888
struct tb_cfg_adapter *cfg;
sys/dev/thunderbolt/router.c
902
cfg = (struct tb_cfg_adapter *)buf;
sys/dev/thunderbolt/router.c
905
rcap.next_cap = GET_ADP_CS_NEXT_CAP(cfg);
sys/dev/usb/controller/musb_otg.c
3041
const struct musb_otg_ep_cfg *cfg;
sys/dev/usb/controller/musb_otg.c
3186
cfg = &sc->sc_ep_cfg[i];
sys/dev/usb/controller/musb_otg.c
3187
if (temp <= cfg->ep_end) {
sys/dev/usb/controller/musb_otg.c
3188
frx = cfg->ep_fifosz_shift;
sys/dev/usb/controller/musb_otg.c
3191
cfg->ep_fifosz_reg);
sys/dev/usb/controller/musb_otg.c
3203
cfg = &sc->sc_ep_cfg[i];
sys/dev/usb/controller/musb_otg.c
3204
if (temp <= cfg->ep_end) {
sys/dev/usb/controller/musb_otg.c
3205
ftx = cfg->ep_fifosz_shift;
sys/dev/usb/controller/musb_otg.c
3208
cfg->ep_fifosz_reg);
sys/dev/usb/serial/ucycom.c
438
ucycom_cfg_write(struct ucycom_softc *sc, uint32_t baud, uint8_t cfg)
sys/dev/usb/serial/ucycom.c
448
sc->sc_cfg = cfg;
sys/dev/usb/serial/ucycom.c
461
sc->sc_temp_cfg[4] = cfg;
sys/dev/usb/serial/ucycom.c
503
uint8_t cfg;
sys/dev/usb/serial/ucycom.c
508
cfg = sc->sc_cfg;
sys/dev/usb/serial/ucycom.c
510
cfg = 0;
sys/dev/usb/serial/ucycom.c
514
++cfg;
sys/dev/usb/serial/ucycom.c
516
++cfg;
sys/dev/usb/serial/ucycom.c
518
++cfg;
sys/dev/usb/serial/ucycom.c
524
cfg |= UCYCOM_CFG_STOPB;
sys/dev/usb/serial/ucycom.c
526
cfg |= UCYCOM_CFG_PAREN;
sys/dev/usb/serial/ucycom.c
528
cfg |= UCYCOM_CFG_PARODD;
sys/dev/usb/serial/ucycom.c
531
ucycom_cfg_write(sc, t->c_ospeed, cfg);
sys/dev/usb/serial/uftdi.c
1451
struct uftdi_param_config *cfg)
sys/dev/usb/serial/uftdi.c
1464
cfg->baud_lobits = i;
sys/dev/usb/serial/uftdi.c
1465
cfg->baud_hibits = 0;
sys/dev/usb/serial/uftdi.c
1474
struct uftdi_param_config *cfg)
sys/dev/usb/serial/uftdi.c
1564
cfg->baud_lobits = (uint16_t)divisor;
sys/dev/usb/serial/uftdi.c
1565
cfg->baud_hibits = (uint16_t)(divisor >> 16);
sys/dev/usb/serial/uftdi.c
1572
cfg->baud_hibits <<= 8;
sys/dev/usb/serial/uftdi.c
1580
struct uftdi_param_config *cfg)
sys/dev/usb/serial/uftdi.c
1585
memset(cfg, 0, sizeof(*cfg));
sys/dev/usb/serial/uftdi.c
1588
err = uftdi_sio_encode_baudrate(sc, t->c_ospeed, cfg);
sys/dev/usb/serial/uftdi.c
1590
err = uftdi_encode_baudrate(sc, t->c_ospeed, cfg);
sys/dev/usb/serial/uftdi.c
1595
cfg->lcr = FTDI_SIO_SET_DATA_STOP_BITS_2;
sys/dev/usb/serial/uftdi.c
1597
cfg->lcr = FTDI_SIO_SET_DATA_STOP_BITS_1;
sys/dev/usb/serial/uftdi.c
1601
cfg->lcr |= FTDI_SIO_SET_DATA_PARITY_ODD;
sys/dev/usb/serial/uftdi.c
1603
cfg->lcr |= FTDI_SIO_SET_DATA_PARITY_EVEN;
sys/dev/usb/serial/uftdi.c
1606
cfg->lcr |= FTDI_SIO_SET_DATA_PARITY_NONE;
sys/dev/usb/serial/uftdi.c
1611
cfg->lcr |= FTDI_SIO_SET_DATA_BITS(5);
sys/dev/usb/serial/uftdi.c
1615
cfg->lcr |= FTDI_SIO_SET_DATA_BITS(6);
sys/dev/usb/serial/uftdi.c
1619
cfg->lcr |= FTDI_SIO_SET_DATA_BITS(7);
sys/dev/usb/serial/uftdi.c
1623
cfg->lcr |= FTDI_SIO_SET_DATA_BITS(8);
sys/dev/usb/serial/uftdi.c
1628
cfg->v_flow = FTDI_SIO_RTS_CTS_HS;
sys/dev/usb/serial/uftdi.c
1630
cfg->v_flow = FTDI_SIO_XON_XOFF_HS;
sys/dev/usb/serial/uftdi.c
1631
cfg->v_start = t->c_cc[VSTART];
sys/dev/usb/serial/uftdi.c
1632
cfg->v_stop = t->c_cc[VSTOP];
sys/dev/usb/serial/uftdi.c
1634
cfg->v_flow = FTDI_SIO_DISABLE_FLOW_CTRL;
sys/dev/usb/serial/uftdi.c
1643
struct uftdi_param_config cfg;
sys/dev/usb/serial/uftdi.c
1647
return (uftdi_set_parm_soft(ucom, t, &cfg));
sys/dev/usb/serial/uftdi.c
1655
struct uftdi_param_config cfg;
sys/dev/usb/serial/uftdi.c
1660
if (uftdi_set_parm_soft(ucom, t, &cfg)) {
sys/dev/usb/serial/uftdi.c
1664
sc->sc_last_lcr = cfg.lcr;
sys/dev/usb/serial/uftdi.c
1668
USETW(req.wValue, cfg.baud_lobits);
sys/dev/usb/serial/uftdi.c
1669
USETW(req.wIndex, cfg.baud_hibits | wIndex);
sys/dev/usb/serial/uftdi.c
1676
USETW(req.wValue, cfg.lcr);
sys/dev/usb/serial/uftdi.c
1684
USETW2(req.wValue, cfg.v_stop, cfg.v_start);
sys/dev/usb/serial/uftdi.c
1685
USETW2(req.wIndex, cfg.v_flow, wIndex);
sys/dev/vge/if_vge.c
515
uint8_t cfg;
sys/dev/vge/if_vge.c
520
cfg = CSR_READ_1(sc, VGE_RXCFG);
sys/dev/vge/if_vge.c
522
cfg |= VGE_VTAG_OPT2;
sys/dev/vge/if_vge.c
524
cfg &= ~VGE_VTAG_OPT2;
sys/dev/vge/if_vge.c
525
CSR_WRITE_1(sc, VGE_RXCFG, cfg);
sys/dev/vmware/pvscsi/pvscsi.c
233
char cfg[64];
sys/dev/vmware/pvscsi/pvscsi.c
235
snprintf(cfg, sizeof(cfg), "hw.pvscsi.%d.%s", device_get_unit(sc->dev),
sys/dev/vmware/pvscsi/pvscsi.c
237
TUNABLE_INT_FETCH(cfg, &value);
sys/dev/vnic/nic.h
188
uint64_t cfg;
sys/dev/vnic/nic.h
393
uint64_t cfg;
sys/dev/vnic/nic.h
401
uint64_t cfg;
sys/dev/vnic/nic.h
410
uint64_t cfg;
sys/dev/vnic/nic_main.c
1036
rid = dinfo->cfg.msix.msix_table_bar;
sys/dev/vnic/nic_main.c
689
nic_config_cpi(struct nicpf *nic, struct cpi_cfg_msg *cfg)
sys/dev/vnic/nic_main.c
696
vnic = cfg->vf_id;
sys/dev/vnic/nic_main.c
708
((uint64_t)cfg->cpi_alg << 62) | (cpi_base << 48));
sys/dev/vnic/nic_main.c
710
if (cfg->cpi_alg == CPI_ALG_NONE)
sys/dev/vnic/nic_main.c
712
else if (cfg->cpi_alg == CPI_ALG_VLAN) /* 3 bits of PCP */
sys/dev/vnic/nic_main.c
714
else if (cfg->cpi_alg == CPI_ALG_VLAN16) /* 3 bits PCP + DEI */
sys/dev/vnic/nic_main.c
716
else if (cfg->cpi_alg == CPI_ALG_DIFF) /* 6bits DSCP */
sys/dev/vnic/nic_main.c
720
qset = cfg->vf_id;
sys/dev/vnic/nic_main.c
722
for (; rssi < (rssi_base + cfg->rq_cnt); rssi++) {
sys/dev/vnic/nic_main.c
732
if (cfg->cpi_alg != CPI_ALG_DIFF)
sys/dev/vnic/nic_main.c
750
if ((rssi + 1) >= cfg->rq_cnt)
sys/dev/vnic/nic_main.c
753
if (cfg->cpi_alg == CPI_ALG_VLAN)
sys/dev/vnic/nic_main.c
755
else if (cfg->cpi_alg == CPI_ALG_VLAN16)
sys/dev/vnic/nic_main.c
757
else if (cfg->cpi_alg == CPI_ALG_DIFF)
sys/dev/vnic/nic_main.c
760
nic->cpi_base[cfg->vf_id] = cpi_base;
sys/dev/vnic/nic_main.c
761
nic->rssi_base[cfg->vf_id] = rssi_base;
sys/dev/vnic/nic_main.c
783
nic_config_rss(struct nicpf *nic, struct rss_cfg_msg *cfg)
sys/dev/vnic/nic_main.c
790
rssi_base = nic->rssi_base[cfg->vf_id] + cfg->tbl_offset;
sys/dev/vnic/nic_main.c
793
qset = cfg->vf_id;
sys/dev/vnic/nic_main.c
795
for (; rssi < (rssi_base + cfg->tbl_len); rssi++) {
sys/dev/vnic/nic_main.c
797
(qset << 3) | (cfg->ind_tbl[idx] & 0x7));
sys/dev/vnic/nic_main.c
801
cpi_base = nic->cpi_base[cfg->vf_id];
sys/dev/vnic/nic_main.c
808
cpi_cfg |= (cfg->hash_bits << 20);
sys/dev/vnic/nic_main.c
890
uint64_t cfg;
sys/dev/vnic/nic_main.c
919
cfg = mbx.qs.cfg;
sys/dev/vnic/nic_main.c
920
nic_reg_write(nic, reg_addr, cfg);
sys/dev/vnic/nic_main.c
926
nic_reg_write(nic, reg_addr, mbx.rq.cfg);
sys/dev/vnic/nic_main.c
932
nic_reg_write(nic, reg_addr, mbx.rq.cfg);
sys/dev/vnic/nic_main.c
941
nic_reg_write(nic, reg_addr, mbx.rq.cfg);
sys/dev/vnic/nic_main.c
947
nic_reg_write(nic, reg_addr, mbx.sq.cfg);
sys/dev/vnic/nicvf_main.c
1080
rss->cfg = RSS_IP_HASH_ENA | RSS_TCP_HASH_ENA | RSS_UDP_HASH_ENA;
sys/dev/vnic/nicvf_main.c
1081
nicvf_reg_write(nic, NIC_VNIC_RSS_CFG, rss->cfg);
sys/dev/vnic/nicvf_main.c
1198
rid = dinfo->cfg.msix.msix_table_bar;
sys/dev/vnic/nicvf_queues.c
1341
mbx.rq.cfg = ((uint64_t)rq->caching << 26) | (rq->cq_qs << 19) |
sys/dev/vnic/nicvf_queues.c
1348
mbx.rq.cfg = (1UL << 63) | (1UL << 62) | (qs->vnic_id << 0);
sys/dev/vnic/nicvf_queues.c
1356
mbx.rq.cfg = (1UL << 62) | (RQ_CQ_DROP << 8);
sys/dev/vnic/nicvf_queues.c
1433
mbx.sq.cfg = (sq->cq_qs << 3) | sq->cq_idx;
sys/dev/vnic/nicvf_queues.c
1511
mbx.qs.cfg = 0;
sys/dev/vnic/nicvf_queues.c
1512
qs_cfg = (struct qs_cfg *)&mbx.qs.cfg;
sys/dev/vnic/thunder_bgx.c
532
uint64_t cfg;
sys/dev/vnic/thunder_bgx.c
540
cfg = bgx_reg_read(bgx, lmac_idx, BGX_GMP_PCS_MRX_CTL);
sys/dev/vnic/thunder_bgx.c
542
cfg |= PCS_MRX_CTL_LOOPBACK1;
sys/dev/vnic/thunder_bgx.c
544
cfg &= ~PCS_MRX_CTL_LOOPBACK1;
sys/dev/vnic/thunder_bgx.c
545
bgx_reg_write(bgx, lmac_idx, BGX_GMP_PCS_MRX_CTL, cfg);
sys/dev/vnic/thunder_bgx.c
547
cfg = bgx_reg_read(bgx, lmac_idx, BGX_SPUX_CONTROL1);
sys/dev/vnic/thunder_bgx.c
549
cfg |= SPU_CTL_LOOPBACK;
sys/dev/vnic/thunder_bgx.c
551
cfg &= ~SPU_CTL_LOOPBACK;
sys/dev/vnic/thunder_bgx.c
552
bgx_reg_write(bgx, lmac_idx, BGX_SPUX_CONTROL1, cfg);
sys/dev/vnic/thunder_bgx.c
559
uint64_t cfg;
sys/dev/vnic/thunder_bgx.c
566
cfg = bgx_reg_read(bgx, lmacid, BGX_GMP_GMI_TXX_APPEND);
sys/dev/vnic/thunder_bgx.c
567
if (cfg & 1)
sys/dev/vnic/thunder_bgx.c
582
cfg = bgx_reg_read(bgx, lmacid, BGX_GMP_PCS_MRX_CTL);
sys/dev/vnic/thunder_bgx.c
583
cfg &= ~PCS_MRX_CTL_PWR_DN;
sys/dev/vnic/thunder_bgx.c
584
cfg |= (PCS_MRX_CTL_RST_AN | PCS_MRX_CTL_AN_EN);
sys/dev/vnic/thunder_bgx.c
585
bgx_reg_write(bgx, lmacid, BGX_GMP_PCS_MRX_CTL, cfg);
sys/dev/vnic/thunder_bgx.c
599
uint64_t cfg;
sys/dev/vnic/thunder_bgx.c
610
cfg = bgx_reg_read(bgx, lmacid, BGX_CMRX_CFG);
sys/dev/vnic/thunder_bgx.c
611
cfg &= ~CMR_EN;
sys/dev/vnic/thunder_bgx.c
612
bgx_reg_write(bgx, lmacid, BGX_CMRX_CFG, cfg);
sys/dev/vnic/thunder_bgx.c
625
cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_INT);
sys/dev/vnic/thunder_bgx.c
626
bgx_reg_write(bgx, lmacid, BGX_SMUX_RX_INT, cfg);
sys/dev/vnic/thunder_bgx.c
627
cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_TX_INT);
sys/dev/vnic/thunder_bgx.c
628
bgx_reg_write(bgx, lmacid, BGX_SMUX_TX_INT, cfg);
sys/dev/vnic/thunder_bgx.c
629
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT);
sys/dev/vnic/thunder_bgx.c
630
bgx_reg_write(bgx, lmacid, BGX_SPUX_INT, cfg);
sys/dev/vnic/thunder_bgx.c
645
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_FEC_CONTROL);
sys/dev/vnic/thunder_bgx.c
646
cfg &= ~SPU_FEC_CTL_FEC_EN;
sys/dev/vnic/thunder_bgx.c
647
bgx_reg_write(bgx, lmacid, BGX_SPUX_FEC_CONTROL, cfg);
sys/dev/vnic/thunder_bgx.c
650
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_AN_CONTROL);
sys/dev/vnic/thunder_bgx.c
651
cfg = cfg & ~(SPU_AN_CTL_AN_EN | SPU_AN_CTL_XNP_EN);
sys/dev/vnic/thunder_bgx.c
652
bgx_reg_write(bgx, lmacid, BGX_SPUX_AN_CONTROL, cfg);
sys/dev/vnic/thunder_bgx.c
654
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_AN_ADV);
sys/dev/vnic/thunder_bgx.c
656
cfg |= (1 << 23);
sys/dev/vnic/thunder_bgx.c
658
cfg |= (1 << 24);
sys/dev/vnic/thunder_bgx.c
660
cfg &= ~((1 << 23) | (1 << 24));
sys/dev/vnic/thunder_bgx.c
661
cfg = cfg & (~((1UL << 25) | (1UL << 22) | (1UL << 12)));
sys/dev/vnic/thunder_bgx.c
662
bgx_reg_write(bgx, lmacid, BGX_SPUX_AN_ADV, cfg);
sys/dev/vnic/thunder_bgx.c
664
cfg = bgx_reg_read(bgx, 0, BGX_SPU_DBG_CONTROL);
sys/dev/vnic/thunder_bgx.c
665
cfg &= ~SPU_DBG_CTL_AN_ARB_LINK_CHK_EN;
sys/dev/vnic/thunder_bgx.c
666
bgx_reg_write(bgx, 0, BGX_SPU_DBG_CONTROL, cfg);
sys/dev/vnic/thunder_bgx.c
671
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_CONTROL1);
sys/dev/vnic/thunder_bgx.c
672
cfg &= ~SPU_CTL_LOW_POWER;
sys/dev/vnic/thunder_bgx.c
673
bgx_reg_write(bgx, lmacid, BGX_SPUX_CONTROL1, cfg);
sys/dev/vnic/thunder_bgx.c
675
cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_TX_CTL);
sys/dev/vnic/thunder_bgx.c
676
cfg &= ~SMU_TX_CTL_UNI_EN;
sys/dev/vnic/thunder_bgx.c
677
cfg |= SMU_TX_CTL_DIC_EN;
sys/dev/vnic/thunder_bgx.c
678
bgx_reg_write(bgx, lmacid, BGX_SMUX_TX_CTL, cfg);
sys/dev/vnic/thunder_bgx.c
694
uint64_t cfg;
sys/dev/vnic/thunder_bgx.c
698
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT);
sys/dev/vnic/thunder_bgx.c
699
if ((cfg & (1UL << 13)) == 0) {
sys/dev/vnic/thunder_bgx.c
700
cfg = (1UL << 13) | (1UL << 14);
sys/dev/vnic/thunder_bgx.c
701
bgx_reg_write(bgx, lmacid, BGX_SPUX_INT, cfg);
sys/dev/vnic/thunder_bgx.c
702
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_BR_PMD_CRTL);
sys/dev/vnic/thunder_bgx.c
703
cfg |= (1UL << 0);
sys/dev/vnic/thunder_bgx.c
704
bgx_reg_write(bgx, lmacid, BGX_SPUX_BR_PMD_CRTL, cfg);
sys/dev/vnic/thunder_bgx.c
738
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT);
sys/dev/vnic/thunder_bgx.c
739
if ((cfg & (1UL << 13)) == 0) {
sys/dev/vnic/thunder_bgx.c
740
cfg = (1UL << 13) | (1UL << 14);
sys/dev/vnic/thunder_bgx.c
741
bgx_reg_write(bgx, lmacid, BGX_SPUX_INT, cfg);
sys/dev/vnic/thunder_bgx.c
742
cfg = bgx_reg_read(bgx, lmacid,
sys/dev/vnic/thunder_bgx.c
744
cfg |= (1UL << 0);
sys/dev/vnic/thunder_bgx.c
746
BGX_SPUX_BR_PMD_CRTL, cfg);
sys/dev/vnic/thunder_bgx.c
788
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_MISC_CONTROL);
sys/dev/vnic/thunder_bgx.c
789
cfg &= ~SPU_MISC_CTL_RX_DIS;
sys/dev/vnic/thunder_bgx.c
790
bgx_reg_write(bgx, lmacid, BGX_SPUX_MISC_CONTROL, cfg);
sys/dev/vnic/thunder_bgx.c
834
uint64_t cfg;
sys/dev/vnic/thunder_bgx.c
850
cfg = bgx_reg_read(bgx, lmacid, BGX_GMP_GMI_TXX_APPEND);
sys/dev/vnic/thunder_bgx.c
851
cfg |= ((1UL << 2) | (1UL << 1)); /* FCS and PAD */
sys/dev/vnic/thunder_bgx.c
852
bgx_reg_modify(bgx, lmacid, BGX_GMP_GMI_TXX_APPEND, cfg);
sys/dev/vnic/thunder_bgx.c
855
cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_TX_APPEND);
sys/dev/vnic/thunder_bgx.c
856
cfg |= ((1UL << 2) | (1UL << 1)); /* FCS and PAD */
sys/dev/vnic/thunder_bgx.c
857
bgx_reg_modify(bgx, lmacid, BGX_SMUX_TX_APPEND, cfg);
sys/dev/xen/pcifront/pcifront.c
642
pcicfgregs *cfg = &dinfo->cfg;
sys/dev/xen/pcifront/pcifront.c
644
DPRINTF("route intr (pin=%d, line=%d)\n", pin, cfg->intline);
sys/dev/xen/pcifront/pcifront.c
646
return cfg->intline;
sys/dev/xl/if_xl.c
3257
u_int16_t cfg;
sys/dev/xl/if_xl.c
3266
cfg = 0;
sys/dev/xl/if_xl.c
3268
cfg |= XL_BM_PME_MAGIC;
sys/dev/xl/if_xl.c
3269
CSR_WRITE_2(sc, XL_W7_BM_PME, cfg);
sys/isa/isa_common.c
418
struct isa_config *cfg;
sys/isa/isa_common.c
422
cfg = malloc(sizeof(struct isa_config), M_TEMP, M_NOWAIT|M_ZERO);
sys/isa/isa_common.c
423
if (cfg == NULL)
sys/isa/isa_common.c
427
if (!isa_find_memory(child, &ice->ice_config, cfg))
sys/isa/isa_common.c
430
if (!isa_find_port(child, &ice->ice_config, cfg))
sys/isa/isa_common.c
433
if (!isa_find_irq(child, &ice->ice_config, cfg))
sys/isa/isa_common.c
436
if (!isa_find_drq(child, &ice->ice_config, cfg))
sys/isa/isa_common.c
446
cfg, 1);
sys/isa/isa_common.c
447
free(cfg, M_TEMP);
sys/isa/isa_common.c
459
bzero(cfg, sizeof (*cfg));
sys/isa/isa_common.c
461
idev->id_config_cb(idev->id_config_arg, cfg, 0);
sys/isa/isa_common.c
464
free(cfg, M_TEMP);
sys/isa/isa_common.c
497
struct isa_config *cfg;
sys/isa/isa_common.c
516
cfg = malloc(sizeof(*cfg), M_TEMP, M_NOWAIT|M_ZERO);
sys/isa/isa_common.c
517
if (cfg == NULL) {
sys/isa/isa_common.c
525
bzero(cfg, sizeof(*cfg));
sys/isa/isa_common.c
527
idev->id_config_cb(idev->id_config_arg, cfg, 0);
sys/isa/isa_common.c
530
free(cfg, M_TEMP);
sys/net/if_vxlan.c
1935
struct ifvxlancfg *cfg;
sys/net/if_vxlan.c
1937
cfg = arg;
sys/net/if_vxlan.c
1938
bzero(cfg, sizeof(*cfg));
sys/net/if_vxlan.c
1941
cfg->vxlc_vni = sc->vxl_vni;
sys/net/if_vxlan.c
1942
memcpy(&cfg->vxlc_local_sa, &sc->vxl_src_addr,
sys/net/if_vxlan.c
1944
memcpy(&cfg->vxlc_remote_sa, &sc->vxl_dst_addr,
sys/net/if_vxlan.c
1946
cfg->vxlc_mc_ifindex = sc->vxl_mc_ifindex;
sys/net/if_vxlan.c
1947
cfg->vxlc_ftable_cnt = sc->vxl_ftable_cnt;
sys/net/if_vxlan.c
1948
cfg->vxlc_ftable_max = sc->vxl_ftable_max;
sys/net/if_vxlan.c
1949
cfg->vxlc_ftable_timeout = sc->vxl_ftable_timeout;
sys/net/if_vxlan.c
1950
cfg->vxlc_port_min = sc->vxl_min_port;
sys/net/if_vxlan.c
1951
cfg->vxlc_port_max = sc->vxl_max_port;
sys/net/if_vxlan.c
1952
cfg->vxlc_learn = (sc->vxl_flags & VXLAN_FLAG_LEARN) != 0;
sys/net/if_vxlan.c
1953
cfg->vxlc_ttl = sc->vxl_ttl;
sys/net/if_vxlan.c
1957
if (VXLAN_SOCKADDR_IS_IPV6(&cfg->vxlc_local_sa))
sys/net/if_vxlan.c
1958
sa6_recoverscope(&cfg->vxlc_local_sa.in6);
sys/net/if_vxlan.c
1959
if (VXLAN_SOCKADDR_IS_IPV6(&cfg->vxlc_remote_sa))
sys/net/if_vxlan.c
1960
sa6_recoverscope(&cfg->vxlc_remote_sa.in6);
sys/net/if_vxlan.c
2307
struct ifvxlancfg cfg;
sys/netgraph/ng_async.c
185
sc->cfg.accm = ~0;
sys/netgraph/ng_async.c
186
sc->cfg.amru = NG_ASYNC_DEFAULT_MRU;
sys/netgraph/ng_async.c
187
sc->cfg.smru = NG_ASYNC_DEFAULT_MRU;
sys/netgraph/ng_async.c
188
sc->abuf = malloc(ASYNC_BUF_SIZE(sc->cfg.smru),
sys/netgraph/ng_async.c
190
sc->sbuf = malloc(SYNC_BUF_SIZE(sc->cfg.amru),
sys/netgraph/ng_async.c
275
struct ng_async_cfg *const cfg =
sys/netgraph/ng_async.c
279
if (msg->header.arglen != sizeof(*cfg))
sys/netgraph/ng_async.c
281
if (cfg->amru < NG_ASYNC_MIN_MRU
sys/netgraph/ng_async.c
282
|| cfg->amru > NG_ASYNC_MAX_MRU
sys/netgraph/ng_async.c
283
|| cfg->smru < NG_ASYNC_MIN_MRU
sys/netgraph/ng_async.c
284
|| cfg->smru > NG_ASYNC_MAX_MRU)
sys/netgraph/ng_async.c
286
cfg->enabled = !!cfg->enabled; /* normalize */
sys/netgraph/ng_async.c
287
if (cfg->smru > sc->cfg.smru) { /* reallocate buffer */
sys/netgraph/ng_async.c
288
buf = malloc(ASYNC_BUF_SIZE(cfg->smru),
sys/netgraph/ng_async.c
295
if (cfg->amru > sc->cfg.amru) { /* reallocate buffer */
sys/netgraph/ng_async.c
296
buf = malloc(SYNC_BUF_SIZE(cfg->amru),
sys/netgraph/ng_async.c
305
if (!cfg->enabled) {
sys/netgraph/ng_async.c
309
sc->cfg = *cfg;
sys/netgraph/ng_async.c
313
NG_MKRESPONSE(resp, msg, sizeof(sc->cfg), M_NOWAIT);
sys/netgraph/ng_async.c
316
*((struct ng_async_cfg *) resp->data) = sc->cfg;
sys/netgraph/ng_async.c
410
if (!sc->cfg.enabled) {
sys/netgraph/ng_async.c
419
accm = sc->cfg.accm;
sys/netgraph/ng_async.c
435
if (m->m_pkthdr.len > sc->cfg.smru) {
sys/netgraph/ng_async.c
495
if (!sc->cfg.enabled) {
sys/netgraph/ng_async.c
532
if (sc->slen - skip > sc->cfg.amru) {
sys/netgraph/ng_async.c
572
if (sc->slen >= SYNC_BUF_SIZE(sc->cfg.amru)) {
sys/netgraph/ng_async.c
83
struct ng_async_cfg cfg; /* Configuration */
sys/netgraph/ng_deflate.c
226
struct ng_deflate_config *const cfg
sys/netgraph/ng_deflate.c
230
if (msg->header.arglen != sizeof(*cfg))
sys/netgraph/ng_deflate.c
232
if (cfg->enable) {
sys/netgraph/ng_deflate.c
233
if (cfg->windowBits < 8 || cfg->windowBits > 15)
sys/netgraph/ng_deflate.c
236
cfg->windowBits = 0;
sys/netgraph/ng_deflate.c
239
if (priv->cfg.enable) {
sys/netgraph/ng_deflate.c
244
priv->cfg.enable = 0;
sys/netgraph/ng_deflate.c
248
priv->cfg = *cfg;
sys/netgraph/ng_deflate.c
250
if (priv->cfg.enable) {
sys/netgraph/ng_deflate.c
256
-cfg->windowBits, 8,
sys/netgraph/ng_deflate.c
261
priv->cfg.enable = 0;
sys/netgraph/ng_deflate.c
266
-cfg->windowBits)) != Z_OK) {
sys/netgraph/ng_deflate.c
270
priv->cfg.enable = 0;
sys/netgraph/ng_deflate.c
328
if (!priv->cfg.enable) {
sys/netgraph/ng_deflate.c
373
if (priv->cfg.enable) {
sys/netgraph/ng_deflate.c
395
if (priv->cfg.enable) {
sys/netgraph/ng_deflate.c
400
priv->cfg.enable = 0;
sys/netgraph/ng_deflate.c
63
struct ng_deflate_config cfg; /* configuration */
sys/netgraph/ng_deflate.c
710
if (priv->cfg.enable) {
sys/netgraph/ng_mppc.c
141
struct ng_mppc_config cfg; /* configuration */
sys/netgraph/ng_mppc.c
273
struct ng_mppc_config *const cfg
sys/netgraph/ng_mppc.c
281
if (msg->header.arglen != sizeof(*cfg))
sys/netgraph/ng_mppc.c
283
if (cfg->enable) {
sys/netgraph/ng_mppc.c
284
if ((cfg->bits & ~MPPC_VALID_BITS) != 0)
sys/netgraph/ng_mppc.c
287
if ((cfg->bits & MPPC_BIT) != 0)
sys/netgraph/ng_mppc.c
291
if ((cfg->bits & MPPE_BITS) != 0)
sys/netgraph/ng_mppc.c
295
cfg->bits = 0;
sys/netgraph/ng_mppc.c
302
d->cfg = *cfg;
sys/netgraph/ng_mppc.c
310
if ((cfg->bits & MPPC_BIT) != 0) {
sys/netgraph/ng_mppc.c
328
if ((cfg->bits & MPPE_BITS) != 0) {
sys/netgraph/ng_mppc.c
329
const int keylen = KEYLEN(cfg->bits);
sys/netgraph/ng_mppc.c
331
bcopy(cfg->startkey, d->key, keylen);
sys/netgraph/ng_mppc.c
332
ng_mppc_getkey(cfg->startkey, d->key, keylen);
sys/netgraph/ng_mppc.c
333
if ((cfg->bits & MPPE_40) != 0)
sys/netgraph/ng_mppc.c
335
else if ((cfg->bits & MPPE_56) != 0)
sys/netgraph/ng_mppc.c
380
if (!priv->xmit.cfg.enable) {
sys/netgraph/ng_mppc.c
395
if (!priv->recv.cfg.enable) {
sys/netgraph/ng_mppc.c
492
if (d->flushed || ((d->cfg.bits & MPPE_STATELESS) != 0)) {
sys/netgraph/ng_mppc.c
499
if ((d->cfg.bits & MPPC_BIT) != 0) {
sys/netgraph/ng_mppc.c
537
if ((d->cfg.bits & MPPE_STATELESS) == 0)
sys/netgraph/ng_mppc.c
581
if ((d->cfg.bits & MPPE_BITS) != 0) {
sys/netgraph/ng_mppc.c
588
if ((d->cfg.bits & MPPE_STATELESS) != 0
sys/netgraph/ng_mppc.c
590
ng_mppc_updatekey(d->cfg.bits,
sys/netgraph/ng_mppc.c
591
d->cfg.startkey, d->key, &d->rc4);
sys/netgraph/ng_mppc.c
595
rc4_init(&d->rc4, d->key, KEYLEN(d->cfg.bits));
sys/netgraph/ng_mppc.c
657
if ((d->cfg.bits & MPPE_BITS) != 0) {
sys/netgraph/ng_mppc.c
661
rekey = ((d->cfg.bits & MPPE_STATELESS) != 0) ?
sys/netgraph/ng_mppc.c
670
priv->recv.cfg.enable = 0;
sys/netgraph/ng_mppc.c
684
if ((d->cfg.bits & MPPE_STATELESS) != 0
sys/netgraph/ng_mppc.c
687
ng_mppc_updatekey(d->cfg.bits,
sys/netgraph/ng_mppc.c
688
d->cfg.startkey, d->key, &d->rc4);
sys/netgraph/ng_mppc.c
694
if ((d->cfg.bits & MPPE_STATELESS) == 0)
sys/netgraph/ng_mppc.c
695
rc4_init(&d->rc4, d->key, KEYLEN(d->cfg.bits));
sys/netgraph/ng_mppc.c
713
if ((d->cfg.bits & MPPE_BITS) == 0) {
sys/netgraph/ng_mppc.c
721
if ((d->cfg.bits & MPPE_STATELESS) != 0
sys/netgraph/ng_mppc.c
723
ng_mppc_updatekey(d->cfg.bits,
sys/netgraph/ng_mppc.c
724
d->cfg.startkey, d->key, &d->rc4);
sys/netgraph/ng_mppc.c
737
if ((d->cfg.bits & MPPE_BITS) != 0) {
sys/netgraph/ng_mppc.c
749
&& (d->cfg.bits & MPPC_BIT) == 0) {
sys/netgraph/ng_mppc.c
851
if ((d->cfg.bits & MPPE_STATELESS) == 0)
sys/netgraph/ng_mppc.c
852
rc4_init(&d->rc4, d->key, KEYLEN(d->cfg.bits));
sys/netgraph/ng_pipe.c
110
if (hinfo->cfg.wfq && hinfo->cfg.bandwidth) { \
sys/netgraph/ng_pipe.c
113
8000000 / hinfo->cfg.bandwidth; \
sys/netgraph/ng_pipe.c
286
hinfo->cfg.qin_size_limit = 50;
sys/netgraph/ng_pipe.c
287
hinfo->cfg.fifo = 1;
sys/netgraph/ng_pipe.c
288
hinfo->cfg.droptail = 1;
sys/netgraph/ng_pipe.c
303
struct ng_pipe_cfg *cfg;
sys/netgraph/ng_pipe.c
347
NG_MKRESPONSE(resp, msg, sizeof(*cfg), M_NOWAIT);
sys/netgraph/ng_pipe.c
352
cfg = (struct ng_pipe_cfg *) resp->data;
sys/netgraph/ng_pipe.c
353
bcopy(&priv->upper.cfg, &cfg->downstream,
sys/netgraph/ng_pipe.c
354
sizeof(cfg->downstream));
sys/netgraph/ng_pipe.c
355
bcopy(&priv->lower.cfg, &cfg->upstream,
sys/netgraph/ng_pipe.c
356
sizeof(cfg->upstream));
sys/netgraph/ng_pipe.c
357
cfg->delay = priv->delay;
sys/netgraph/ng_pipe.c
358
cfg->overhead = priv->overhead;
sys/netgraph/ng_pipe.c
359
cfg->header_offset = priv->header_offset;
sys/netgraph/ng_pipe.c
360
if (cfg->upstream.bandwidth ==
sys/netgraph/ng_pipe.c
361
cfg->downstream.bandwidth) {
sys/netgraph/ng_pipe.c
362
cfg->bandwidth = cfg->upstream.bandwidth;
sys/netgraph/ng_pipe.c
363
cfg->upstream.bandwidth = 0;
sys/netgraph/ng_pipe.c
364
cfg->downstream.bandwidth = 0;
sys/netgraph/ng_pipe.c
366
cfg->bandwidth = 0;
sys/netgraph/ng_pipe.c
369
cfg = (struct ng_pipe_cfg *) msg->data;
sys/netgraph/ng_pipe.c
370
if (msg->header.arglen != sizeof(*cfg)) {
sys/netgraph/ng_pipe.c
375
if (cfg->delay == -1)
sys/netgraph/ng_pipe.c
377
else if (cfg->delay > 0 && cfg->delay < 10000000)
sys/netgraph/ng_pipe.c
378
priv->delay = cfg->delay;
sys/netgraph/ng_pipe.c
380
if (cfg->bandwidth == -1) {
sys/netgraph/ng_pipe.c
381
priv->upper.cfg.bandwidth = 0;
sys/netgraph/ng_pipe.c
382
priv->lower.cfg.bandwidth = 0;
sys/netgraph/ng_pipe.c
384
} else if (cfg->bandwidth >= 100 &&
sys/netgraph/ng_pipe.c
385
cfg->bandwidth <= 1000000000) {
sys/netgraph/ng_pipe.c
386
priv->upper.cfg.bandwidth = cfg->bandwidth;
sys/netgraph/ng_pipe.c
387
priv->lower.cfg.bandwidth = cfg->bandwidth;
sys/netgraph/ng_pipe.c
388
if (cfg->bandwidth >= 10000000)
sys/netgraph/ng_pipe.c
394
if (cfg->overhead == -1)
sys/netgraph/ng_pipe.c
396
else if (cfg->overhead > 0 &&
sys/netgraph/ng_pipe.c
397
cfg->overhead < MAX_OHSIZE)
sys/netgraph/ng_pipe.c
398
priv->overhead = cfg->overhead;
sys/netgraph/ng_pipe.c
400
if (cfg->header_offset == -1)
sys/netgraph/ng_pipe.c
402
else if (cfg->header_offset > 0 &&
sys/netgraph/ng_pipe.c
403
cfg->header_offset < 64)
sys/netgraph/ng_pipe.c
404
priv->header_offset = cfg->header_offset;
sys/netgraph/ng_pipe.c
406
prev_down = priv->upper.cfg.ber == 1 ||
sys/netgraph/ng_pipe.c
407
priv->lower.cfg.ber == 1;
sys/netgraph/ng_pipe.c
408
parse_cfg(&priv->upper.cfg, &cfg->downstream,
sys/netgraph/ng_pipe.c
410
parse_cfg(&priv->lower.cfg, &cfg->upstream,
sys/netgraph/ng_pipe.c
412
now_down = priv->upper.cfg.ber == 1 ||
sys/netgraph/ng_pipe.c
413
priv->lower.cfg.ber == 1;
sys/netgraph/ng_pipe.c
653
if (hinfo->cfg.fifo)
sys/netgraph/ng_pipe.c
672
ngp_f->rr_deficit = hinfo->cfg.drr; /* DRR quantum */
sys/netgraph/ng_pipe.c
684
if (hinfo->run.qin_frames > hinfo->cfg.qin_size_limit) {
sys/netgraph/ng_pipe.c
696
if (hinfo->cfg.drophead)
sys/netgraph/ng_pipe.c
764
if (hinfo->cfg.drr) {
sys/netgraph/ng_pipe.c
768
ngp_f->rr_deficit += hinfo->cfg.drr;
sys/netgraph/ng_pipe.c
783
if (hinfo->cfg.duplicate &&
sys/netgraph/ng_pipe.c
784
prng32_bounded(100) <= hinfo->cfg.duplicate) {
sys/netgraph/ng_pipe.c
806
if (hinfo->cfg.bandwidth) {
sys/netgraph/ng_pipe.c
809
8000000 / hinfo->cfg.bandwidth;
sys/netgraph/ng_pipe.c
821
if (hinfo->cfg.wfq) {
sys/netgraph/ng_pipe.c
833
if (hinfo->cfg.ber) {
sys/netgraph/ng_pipe.c
847
if (hinfo->cfg.qout_size_limit &&
sys/netgraph/ng_pipe.c
848
hinfo->run.qout_frames>=hinfo->cfg.qout_size_limit) {
sys/netgraph/ng_pipe.c
90
struct ng_pipe_hookcfg cfg;
sys/netgraph/ng_pred1.c
242
struct ng_pred1_config *const cfg =
sys/netgraph/ng_pred1.c
246
if (msg->header.arglen != sizeof(*cfg))
sys/netgraph/ng_pred1.c
250
priv->cfg = *cfg;
sys/netgraph/ng_pred1.c
304
if (!priv->cfg.enable) {
sys/netgraph/ng_pred1.c
71
struct ng_pred1_config cfg; /* configuration */
sys/netinet/ip_encap.c
233
encap_attach(struct encaptab_head *head, const struct encap_config *cfg,
sys/netinet/ip_encap.c
238
if (cfg == NULL || cfg->input == NULL ||
sys/netinet/ip_encap.c
239
(cfg->check == NULL && cfg->lookup == NULL) ||
sys/netinet/ip_encap.c
240
(cfg->lookup != NULL && cfg->exact_match != ENCAP_DRV_LOOKUP) ||
sys/netinet/ip_encap.c
241
(cfg->exact_match == ENCAP_DRV_LOOKUP && cfg->lookup == NULL))
sys/netinet/ip_encap.c
248
ep->proto = cfg->proto;
sys/netinet/ip_encap.c
249
ep->min_length = cfg->min_length;
sys/netinet/ip_encap.c
250
ep->exact_match = cfg->exact_match;
sys/netinet/ip_encap.c
252
ep->lookup = cfg->exact_match == ENCAP_DRV_LOOKUP ? cfg->lookup: NULL;
sys/netinet/ip_encap.c
253
ep->check = cfg->exact_match != ENCAP_DRV_LOOKUP ? cfg->check: NULL;
sys/netinet/ip_encap.c
254
ep->input = cfg->input;
sys/netinet/ip_encap.c
352
ip_encap_attach(const struct encap_config *cfg, void *arg, int mflags)
sys/netinet/ip_encap.c
355
return (encap_attach(&ipv4_encaptab, cfg, arg, mflags));
sys/netinet/ip_encap.c
391
ip6_encap_attach(const struct encap_config *cfg, void *arg, int mflags)
sys/netinet/ip_encap.c
394
return (encap_attach(&ipv6_encaptab, cfg, arg, mflags));
sys/netpfil/ipfw/dn_sched_fq_codel.c
300
param = &schk->cfg;
sys/netpfil/ipfw/dn_sched_fq_codel.c
328
if (mainq->ni.length > schk->cfg.limit) { D("over limit");
sys/netpfil/ipfw/dn_sched_fq_codel.c
330
for (maxidx = 0; maxidx < schk->cfg.flows_cnt; maxidx++)
sys/netpfil/ipfw/dn_sched_fq_codel.c
333
if (maxidx < schk->cfg.flows_cnt) {
sys/netpfil/ipfw/dn_sched_fq_codel.c
335
for (i = maxidx + 1; i < schk->cfg.flows_cnt; i++)
sys/netpfil/ipfw/dn_sched_fq_codel.c
364
param = &schk->cfg;
sys/netpfil/ipfw/dn_sched_fq_codel.c
456
si->flows = mallocarray(schk->cfg.flows_cnt,
sys/netpfil/ipfw/dn_sched_fq_codel.c
471
for (i = 0; i < schk->cfg.flows_cnt; i++) {
sys/netpfil/ipfw/dn_sched_fq_codel.c
508
ep = (struct dn_extra_parms *) _schk->cfg;
sys/netpfil/ipfw/dn_sched_fq_codel.c
516
fqc_cfg = &schk->cfg;
sys/netpfil/ipfw/dn_sched_fq_codel.c
573
fqc_cfg = &schk->cfg;
sys/netpfil/ipfw/dn_sched_fq_codel.h
70
struct dn_sch_fq_codel_parms cfg;
sys/netpfil/ipfw/dn_sched_fq_codel_helper.h
108
cprms = &schk->cfg.ccfg;
sys/netpfil/ipfw/dn_sched_fq_codel_helper.h
81
if (sojourn_time < schk->cfg.ccfg.target || q->stats.len_bytes <= q->cst.maxpkt_size) {
sys/netpfil/ipfw/dn_sched_fq_codel_helper.h
88
q->cst.first_above_time = now + schk->cfg.ccfg.interval;
sys/netpfil/ipfw/dn_sched_fq_pie.c
1040
si->si_extra->flows = mallocarray(schk->cfg.flows_cnt,
sys/netpfil/ipfw/dn_sched_fq_pie.c
1059
for (i = 0; i < schk->cfg.flows_cnt; i++) {
sys/netpfil/ipfw/dn_sched_fq_pie.c
1060
flows[i].pst.parms = &schk->cfg.pcfg;
sys/netpfil/ipfw/dn_sched_fq_pie.c
1086
for (i = 0; i < schk->cfg.flows_cnt; i++) {
sys/netpfil/ipfw/dn_sched_fq_pie.c
1105
ep = (struct dn_extra_parms *) _schk->cfg;
sys/netpfil/ipfw/dn_sched_fq_pie.c
1114
fqp_cfg = &schk->cfg;
sys/netpfil/ipfw/dn_sched_fq_pie.c
117
struct dn_sch_fq_pie_parms cfg;
sys/netpfil/ipfw/dn_sched_fq_pie.c
1191
fqp_cfg = &schk->cfg;
sys/netpfil/ipfw/dn_sched_fq_pie.c
555
pst->one_third_q_size = (fqpie_schk->cfg.limit /
sys/netpfil/ipfw/dn_sched_fq_pie.c
556
fqpie_schk->cfg.flows_cnt) / 3;
sys/netpfil/ipfw/dn_sched_fq_pie.c
877
param = &schk->cfg;
sys/netpfil/ipfw/dn_sched_fq_pie.c
904
if (mainq->ni.length > schk->cfg.limit) {
sys/netpfil/ipfw/dn_sched_fq_pie.c
906
for (maxidx = 0; maxidx < schk->cfg.flows_cnt; maxidx++)
sys/netpfil/ipfw/dn_sched_fq_pie.c
909
if (maxidx < schk->cfg.flows_cnt) {
sys/netpfil/ipfw/dn_sched_fq_pie.c
911
for (i = maxidx + 1; i < schk->cfg.flows_cnt; i++)
sys/netpfil/ipfw/dn_sched_fq_pie.c
939
param = &schk->cfg;
sys/netpfil/ipfw/ip_dn_private.h
281
struct dn_id *cfg; /* extra config arguments */
sys/netpfil/ipfw/ip_dummynet.c
1864
s->cfg = arg;
sys/netpfil/ipfw/ip_fw_nat.c
929
struct cfg_nat_legacy *cfg;
sys/netpfil/ipfw/ip_fw_nat.c
950
cfg = (struct cfg_nat_legacy *)buf;
sys/netpfil/ipfw/ip_fw_nat.c
951
if (cfg->id < 0) {
sys/netpfil/ipfw/ip_fw_nat.c
957
snprintf(ucfg->name, sizeof(ucfg->name), "%d", cfg->id);
sys/netpfil/ipfw/ip_fw_nat.c
958
strlcpy(ucfg->if_name, cfg->if_name, sizeof(ucfg->if_name));
sys/netpfil/ipfw/ip_fw_nat.c
959
ucfg->ip = cfg->ip;
sys/netpfil/ipfw/ip_fw_nat.c
960
ucfg->mode = cfg->mode;
sys/netpfil/ipfw/ip_fw_nat.c
961
ucfg->redir_cnt = cfg->redir_cnt;
sys/netpfil/ipfw/ip_fw_nat.c
963
if (len < sizeof(*cfg) + cfg->redir_cnt * sizeof(*rdir)) {
sys/netpfil/ipfw/ip_fw_nat.c
969
rdir = (struct cfg_redir_legacy *)(cfg + 1);
sys/netpfil/ipfw/ip_fw_nat.c
970
for (i = 0; i < cfg->redir_cnt; i++) {
sys/netpfil/ipfw/ip_fw_table_algo.c
1202
chash_parse_opts(struct chash_cfg *cfg, char *data)
sys/netpfil/ipfw/ip_fw_table_algo.c
1207
mask4 = cfg->mask4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1208
mask6 = cfg->mask6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1240
cfg->mask4 = mask4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1241
cfg->mask6 = mask6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1250
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1252
cfg = (struct chash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
1254
if (cfg->mask4 != 32 || cfg->mask6 != 128)
sys/netpfil/ipfw/ip_fw_table_algo.c
1256
cfg->mask4, cfg->mask6);
sys/netpfil/ipfw/ip_fw_table_algo.c
1284
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1286
cfg = malloc(sizeof(struct chash_cfg), M_IPFW, M_WAITOK | M_ZERO);
sys/netpfil/ipfw/ip_fw_table_algo.c
1288
cfg->mask4 = 32;
sys/netpfil/ipfw/ip_fw_table_algo.c
1289
cfg->mask6 = 128;
sys/netpfil/ipfw/ip_fw_table_algo.c
1291
if ((error = chash_parse_opts(cfg, data)) != 0) {
sys/netpfil/ipfw/ip_fw_table_algo.c
1292
free(cfg, M_IPFW);
sys/netpfil/ipfw/ip_fw_table_algo.c
1296
cfg->size4 = 128;
sys/netpfil/ipfw/ip_fw_table_algo.c
1297
cfg->size6 = 128;
sys/netpfil/ipfw/ip_fw_table_algo.c
1299
cfg->head4 = malloc(sizeof(struct chashbhead) * cfg->size4, M_IPFW,
sys/netpfil/ipfw/ip_fw_table_algo.c
1301
cfg->head6 = malloc(sizeof(struct chashbhead) * cfg->size6, M_IPFW,
sys/netpfil/ipfw/ip_fw_table_algo.c
1303
for (i = 0; i < cfg->size4; i++)
sys/netpfil/ipfw/ip_fw_table_algo.c
1304
SLIST_INIT(&cfg->head4[i]);
sys/netpfil/ipfw/ip_fw_table_algo.c
1305
for (i = 0; i < cfg->size6; i++)
sys/netpfil/ipfw/ip_fw_table_algo.c
1306
SLIST_INIT(&cfg->head6[i]);
sys/netpfil/ipfw/ip_fw_table_algo.c
1308
*ta_state = cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1309
ti->state = cfg->head4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1310
ti->xstate = cfg->head6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1313
hsize = ta_log2(cfg->size4) << 8 | ta_log2(cfg->size6);
sys/netpfil/ipfw/ip_fw_table_algo.c
1314
if (cfg->mask6 == 64) {
sys/netpfil/ipfw/ip_fw_table_algo.c
1315
ti->data = (32 - cfg->mask4) << 24 | (128 - cfg->mask6) << 16|
sys/netpfil/ipfw/ip_fw_table_algo.c
1318
} else if ((cfg->mask6 % 8) == 0) {
sys/netpfil/ipfw/ip_fw_table_algo.c
1319
ti->data = (32 - cfg->mask4) << 24 |
sys/netpfil/ipfw/ip_fw_table_algo.c
1320
cfg->mask6 << 13 | hsize;
sys/netpfil/ipfw/ip_fw_table_algo.c
1324
ti->data = (32 - cfg->mask4) << 24 |
sys/netpfil/ipfw/ip_fw_table_algo.c
1325
cfg->mask6 << 16 | hsize;
sys/netpfil/ipfw/ip_fw_table_algo.c
1335
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1339
cfg = (struct chash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
1341
for (i = 0; i < cfg->size4; i++)
sys/netpfil/ipfw/ip_fw_table_algo.c
1342
SLIST_FOREACH_SAFE(ent, &cfg->head4[i], next, ent_next)
sys/netpfil/ipfw/ip_fw_table_algo.c
1345
for (i = 0; i < cfg->size6; i++)
sys/netpfil/ipfw/ip_fw_table_algo.c
1346
SLIST_FOREACH_SAFE(ent, &cfg->head6[i], next, ent_next)
sys/netpfil/ipfw/ip_fw_table_algo.c
1349
free(cfg->head4, M_IPFW);
sys/netpfil/ipfw/ip_fw_table_algo.c
1350
free(cfg->head6, M_IPFW);
sys/netpfil/ipfw/ip_fw_table_algo.c
1352
free(cfg, M_IPFW);
sys/netpfil/ipfw/ip_fw_table_algo.c
1358
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1360
cfg = (struct chash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
1364
tinfo->size4 = cfg->size4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1365
tinfo->count4 = cfg->items4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1368
tinfo->size6 = cfg->size6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1369
tinfo->count6 = cfg->items6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1377
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1380
cfg = (struct chash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
1384
tent->k.addr.s_addr = htonl(ent->a.a4 << (32 - cfg->mask4));
sys/netpfil/ipfw/ip_fw_table_algo.c
1385
tent->masklen = cfg->mask4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1391
tent->masklen = cfg->mask6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1465
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1472
cfg = (struct chash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
1479
tei.masklen = cfg->mask4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1485
head = cfg->head4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1486
hash = hash_ent(&ent, AF_INET, cfg->mask4, cfg->size4);
sys/netpfil/ipfw/ip_fw_table_algo.c
1497
tei.masklen = cfg->mask6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1503
head = cfg->head6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1504
hash = hash_ent(&ent, AF_INET6, cfg->mask6, cfg->size6);
sys/netpfil/ipfw/ip_fw_table_algo.c
1521
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1525
cfg = (struct chash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
1527
for (i = 0; i < cfg->size4; i++)
sys/netpfil/ipfw/ip_fw_table_algo.c
1528
SLIST_FOREACH_SAFE(ent, &cfg->head4[i], next, ent_next)
sys/netpfil/ipfw/ip_fw_table_algo.c
1531
for (i = 0; i < cfg->size6; i++)
sys/netpfil/ipfw/ip_fw_table_algo.c
1532
SLIST_FOREACH_SAFE(ent, &cfg->head6[i], next, ent_next)
sys/netpfil/ipfw/ip_fw_table_algo.c
1562
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1569
cfg = (struct chash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
1580
if (tei->masklen != cfg->mask4)
sys/netpfil/ipfw/ip_fw_table_algo.c
1582
head = cfg->head4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1583
hash = hash_ent(ent, AF_INET, cfg->mask4, cfg->size4);
sys/netpfil/ipfw/ip_fw_table_algo.c
1593
if (tei->masklen != cfg->mask6)
sys/netpfil/ipfw/ip_fw_table_algo.c
1595
head = cfg->head6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1596
hash = hash_ent(ent, AF_INET6, cfg->mask6, cfg->size6);
sys/netpfil/ipfw/ip_fw_table_algo.c
1625
cfg->items4++;
sys/netpfil/ipfw/ip_fw_table_algo.c
1627
cfg->items6++;
sys/netpfil/ipfw/ip_fw_table_algo.c
1648
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1654
cfg = (struct chash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
1659
if (tei->masklen != cfg->mask4)
sys/netpfil/ipfw/ip_fw_table_algo.c
1661
head = cfg->head4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1662
hash = hash_ent(ent, AF_INET, cfg->mask4, cfg->size4);
sys/netpfil/ipfw/ip_fw_table_algo.c
1669
cfg->items4--;
sys/netpfil/ipfw/ip_fw_table_algo.c
1676
if (tei->masklen != cfg->mask6)
sys/netpfil/ipfw/ip_fw_table_algo.c
1678
head = cfg->head6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1679
hash = hash_ent(ent, AF_INET6, cfg->mask6, cfg->size6);
sys/netpfil/ipfw/ip_fw_table_algo.c
1685
cfg->items6--;
sys/netpfil/ipfw/ip_fw_table_algo.c
1716
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1725
cfg = (struct chash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
1728
if (cfg->items4 > cfg->size4 && cfg->size4 < 65536)
sys/netpfil/ipfw/ip_fw_table_algo.c
1729
data |= (cfg->size4 * 2) << 16;
sys/netpfil/ipfw/ip_fw_table_algo.c
1730
if (cfg->items6 > cfg->size6 && cfg->size6 < 65536)
sys/netpfil/ipfw/ip_fw_table_algo.c
1731
data |= cfg->size6 * 2;
sys/netpfil/ipfw/ip_fw_table_algo.c
1795
struct chash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
1803
cfg = (struct chash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
1806
if (mi->size > 0 && cfg->size4 < mi->size) {
sys/netpfil/ipfw/ip_fw_table_algo.c
1809
old_size = cfg->size4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1811
mlen = cfg->mask4;
sys/netpfil/ipfw/ip_fw_table_algo.c
1822
cfg->head4 = new_head;
sys/netpfil/ipfw/ip_fw_table_algo.c
1823
cfg->size4 = mi->size;
sys/netpfil/ipfw/ip_fw_table_algo.c
1827
if (mi->size6 > 0 && cfg->size6 < mi->size6) {
sys/netpfil/ipfw/ip_fw_table_algo.c
1830
old_size = cfg->size6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1832
mlen = cfg->mask6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1843
cfg->head6 = new_head;
sys/netpfil/ipfw/ip_fw_table_algo.c
1844
cfg->size6 = mi->size6;
sys/netpfil/ipfw/ip_fw_table_algo.c
1850
ti->data |= ta_log2(cfg->size4) << 8 | ta_log2(cfg->size6);
sys/netpfil/ipfw/ip_fw_table_algo.c
2180
struct iftable_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2182
cfg = (struct iftable_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
2185
tinfo->size4 = cfg->size;
sys/netpfil/ipfw/ip_fw_table_algo.c
2186
tinfo->count4 = cfg->used;
sys/netpfil/ipfw/ip_fw_table_algo.c
2424
struct iftable_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2427
cfg = (struct iftable_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
2429
size = cfg->size;
sys/netpfil/ipfw/ip_fw_table_algo.c
2430
while (size < cfg->count + count)
sys/netpfil/ipfw/ip_fw_table_algo.c
2433
if (size != cfg->size) {
sys/netpfil/ipfw/ip_fw_table_algo.c
2723
struct numarray_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2725
cfg = malloc(sizeof(*cfg), M_IPFW, M_WAITOK | M_ZERO);
sys/netpfil/ipfw/ip_fw_table_algo.c
2727
cfg->size = 16;
sys/netpfil/ipfw/ip_fw_table_algo.c
2728
cfg->main_ptr = malloc(sizeof(struct numarray) * cfg->size, M_IPFW,
sys/netpfil/ipfw/ip_fw_table_algo.c
2731
*ta_state = cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2732
ti->state = cfg->main_ptr;
sys/netpfil/ipfw/ip_fw_table_algo.c
2744
struct numarray_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2746
cfg = (struct numarray_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
2748
if (cfg->main_ptr != NULL)
sys/netpfil/ipfw/ip_fw_table_algo.c
2749
free(cfg->main_ptr, M_IPFW);
sys/netpfil/ipfw/ip_fw_table_algo.c
2751
free(cfg, M_IPFW);
sys/netpfil/ipfw/ip_fw_table_algo.c
2760
struct numarray_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2762
cfg = (struct numarray_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
2765
tinfo->size4 = cfg->size;
sys/netpfil/ipfw/ip_fw_table_algo.c
2766
tinfo->count4 = cfg->used;
sys/netpfil/ipfw/ip_fw_table_algo.c
2790
struct numarray_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2797
cfg = (struct numarray_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
2821
res = badd(&tb->na.number, &tb->na, cfg->main_ptr, cfg->used,
sys/netpfil/ipfw/ip_fw_table_algo.c
2825
cfg->used++;
sys/netpfil/ipfw/ip_fw_table_algo.c
2826
ti->data = cfg->used;
sys/netpfil/ipfw/ip_fw_table_algo.c
2840
struct numarray_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2846
cfg = (struct numarray_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
2854
res = bdel(&tb->na.number, cfg->main_ptr, cfg->used,
sys/netpfil/ipfw/ip_fw_table_algo.c
2858
cfg->used--;
sys/netpfil/ipfw/ip_fw_table_algo.c
2859
ti->data = cfg->used;
sys/netpfil/ipfw/ip_fw_table_algo.c
2881
struct numarray_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2884
cfg = (struct numarray_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
2886
size = cfg->size;
sys/netpfil/ipfw/ip_fw_table_algo.c
2887
while (size < cfg->used + count)
sys/netpfil/ipfw/ip_fw_table_algo.c
2890
if (size != cfg->size) {
sys/netpfil/ipfw/ip_fw_table_algo.c
2924
struct numarray_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2927
cfg = (struct numarray_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
2930
if (cfg->size >= mi->size) {
sys/netpfil/ipfw/ip_fw_table_algo.c
2935
memcpy(mi->main_ptr, cfg->main_ptr, cfg->used * sizeof(struct numarray));
sys/netpfil/ipfw/ip_fw_table_algo.c
2948
struct numarray_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
2952
cfg = (struct numarray_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
2954
old_ptr = cfg->main_ptr;
sys/netpfil/ipfw/ip_fw_table_algo.c
2955
cfg->main_ptr = mi->main_ptr;
sys/netpfil/ipfw/ip_fw_table_algo.c
2956
cfg->size = mi->size;
sys/netpfil/ipfw/ip_fw_table_algo.c
2957
ti->state = cfg->main_ptr;
sys/netpfil/ipfw/ip_fw_table_algo.c
3009
struct numarray_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3013
cfg = (struct numarray_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
3014
array = cfg->main_ptr;
sys/netpfil/ipfw/ip_fw_table_algo.c
3016
for (i = 0; i < cfg->used; i++)
sys/netpfil/ipfw/ip_fw_table_algo.c
3262
struct fhash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3267
cfg = malloc(sizeof(struct fhash_cfg), M_IPFW, M_WAITOK | M_ZERO);
sys/netpfil/ipfw/ip_fw_table_algo.c
3269
cfg->size = 512;
sys/netpfil/ipfw/ip_fw_table_algo.c
3271
cfg->head = malloc(sizeof(struct fhashbhead) * cfg->size, M_IPFW,
sys/netpfil/ipfw/ip_fw_table_algo.c
3273
for (i = 0; i < cfg->size; i++)
sys/netpfil/ipfw/ip_fw_table_algo.c
3274
SLIST_INIT(&cfg->head[i]);
sys/netpfil/ipfw/ip_fw_table_algo.c
3277
fe4 = &cfg->fe4;
sys/netpfil/ipfw/ip_fw_table_algo.c
3278
fe6 = &cfg->fe6;
sys/netpfil/ipfw/ip_fw_table_algo.c
3303
*ta_state = cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3304
ti->state = cfg->head;
sys/netpfil/ipfw/ip_fw_table_algo.c
3305
ti->xstate = &cfg->fe4;
sys/netpfil/ipfw/ip_fw_table_algo.c
3306
ti->data = cfg->size;
sys/netpfil/ipfw/ip_fw_table_algo.c
3315
struct fhash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3319
cfg = (struct fhash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
3321
for (i = 0; i < cfg->size; i++)
sys/netpfil/ipfw/ip_fw_table_algo.c
3322
SLIST_FOREACH_SAFE(ent, &cfg->head[i], next, ent_next)
sys/netpfil/ipfw/ip_fw_table_algo.c
3325
free(cfg->head, M_IPFW);
sys/netpfil/ipfw/ip_fw_table_algo.c
3326
free(cfg, M_IPFW);
sys/netpfil/ipfw/ip_fw_table_algo.c
3335
struct fhash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3337
cfg = (struct fhash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
3341
tinfo->size4 = cfg->size;
sys/netpfil/ipfw/ip_fw_table_algo.c
3342
tinfo->count4 = cfg->items;
sys/netpfil/ipfw/ip_fw_table_algo.c
3427
struct fhash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3436
cfg = (struct fhash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
3449
head = cfg->head;
sys/netpfil/ipfw/ip_fw_table_algo.c
3450
hash = hash_flow_ent(ent, cfg->size);
sys/netpfil/ipfw/ip_fw_table_algo.c
3472
struct fhash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3476
cfg = (struct fhash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
3478
for (i = 0; i < cfg->size; i++)
sys/netpfil/ipfw/ip_fw_table_algo.c
3479
SLIST_FOREACH_SAFE(ent, &cfg->head[i], next, ent_next)
sys/netpfil/ipfw/ip_fw_table_algo.c
3517
struct fhash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3525
cfg = (struct fhash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
3533
head = cfg->head;
sys/netpfil/ipfw/ip_fw_table_algo.c
3534
hash = hash_flow_ent(ent, cfg->size);
sys/netpfil/ipfw/ip_fw_table_algo.c
3569
cfg->items++;
sys/netpfil/ipfw/ip_fw_table_algo.c
3590
struct fhash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3597
cfg = (struct fhash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
3601
head = cfg->head;
sys/netpfil/ipfw/ip_fw_table_algo.c
3602
hash = hash_flow_ent(ent, cfg->size);
sys/netpfil/ipfw/ip_fw_table_algo.c
3617
cfg->items--;
sys/netpfil/ipfw/ip_fw_table_algo.c
3645
struct fhash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3647
cfg = (struct fhash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
3649
if (cfg->items > cfg->size && cfg->size < 65536) {
sys/netpfil/ipfw/ip_fw_table_algo.c
3650
*pflags = cfg->size * 2;
sys/netpfil/ipfw/ip_fw_table_algo.c
3701
struct fhash_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
3709
cfg = (struct fhash_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
3711
old_size = cfg->size;
sys/netpfil/ipfw/ip_fw_table_algo.c
3724
cfg->head = new_head;
sys/netpfil/ipfw/ip_fw_table_algo.c
3725
cfg->size = mi->size;
sys/netpfil/ipfw/ip_fw_table_algo.c
4057
struct mac_radix_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
4062
cfg = malloc(sizeof(struct mac_radix_cfg), M_IPFW, M_WAITOK | M_ZERO);
sys/netpfil/ipfw/ip_fw_table_algo.c
4064
*ta_state = cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
4073
struct mac_radix_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
4076
cfg = (struct mac_radix_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
4082
free(cfg, M_IPFW);
sys/netpfil/ipfw/ip_fw_table_algo.c
4156
struct mac_radix_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
4162
cfg = (struct mac_radix_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
4197
cfg->count++;
sys/netpfil/ipfw/ip_fw_table_algo.c
4238
struct mac_radix_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
4243
cfg = (struct mac_radix_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
4256
cfg->count--;
sys/netpfil/ipfw/ip_fw_table_algo.c
4275
struct mac_radix_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
4277
cfg = (struct mac_radix_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
4281
tinfo->count4 = cfg->count;
sys/netpfil/ipfw/ip_fw_table_algo.c
452
struct addr_radix_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
461
cfg = malloc(sizeof(struct addr_radix_cfg), M_IPFW, M_WAITOK | M_ZERO);
sys/netpfil/ipfw/ip_fw_table_algo.c
463
*ta_state = cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
485
struct addr_radix_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
488
cfg = (struct addr_radix_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
498
free(cfg, M_IPFW);
sys/netpfil/ipfw/ip_fw_table_algo.c
507
struct addr_radix_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
509
cfg = (struct addr_radix_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
513
tinfo->count4 = cfg->count4;
sys/netpfil/ipfw/ip_fw_table_algo.c
516
tinfo->count6 = cfg->count6;
sys/netpfil/ipfw/ip_fw_table_algo.c
719
struct addr_radix_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
725
cfg = (struct addr_radix_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
769
cfg->count4++;
sys/netpfil/ipfw/ip_fw_table_algo.c
771
cfg->count6++;
sys/netpfil/ipfw/ip_fw_table_algo.c
820
struct addr_radix_cfg *cfg;
sys/netpfil/ipfw/ip_fw_table_algo.c
825
cfg = (struct addr_radix_cfg *)ta_state;
sys/netpfil/ipfw/ip_fw_table_algo.c
847
cfg->count4--;
sys/netpfil/ipfw/ip_fw_table_algo.c
849
cfg->count6--;
sys/netpfil/ipfw/ip_fw_table_algo.c
968
static int chash_parse_opts(struct chash_cfg *cfg, char *data);
sys/netpfil/ipfw/nat64/nat64_translate.c
1054
nat64_check_private_ip4(cfg, ip.ip_src.s_addr) != 0 ||
sys/netpfil/ipfw/nat64/nat64_translate.c
1055
nat64_check_private_ip4(cfg, ip.ip_dst.s_addr) != 0) {
sys/netpfil/ipfw/nat64/nat64_translate.c
1090
NAT64STAT_INC(&cfg->stats, nomem);
sys/netpfil/ipfw/nat64/nat64_translate.c
1105
MPASS(cfg->flags & NAT64_PLATPFX);
sys/netpfil/ipfw/nat64/nat64_translate.c
1106
nat64_embed_ip4(&eip6->ip6_dst, cfg->plat_plen, ip.ip_dst.s_addr);
sys/netpfil/ipfw/nat64/nat64_translate.c
1176
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1224
struct in6_addr *daddr, uint16_t lport, struct nat64_config *cfg,
sys/netpfil/ipfw/nat64/nat64_translate.c
1241
ICMP_TIMXCEED_INTRANS, 0, &cfg->stats, logdata);
sys/netpfil/ipfw/nat64/nat64_translate.c
1259
ICMP_PARAMPROB_LENGTH, 0, &cfg->stats, logdata);
sys/netpfil/ipfw/nat64/nat64_translate.c
1265
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1272
NAT64STAT_INC(&cfg->stats, noroute6);
sys/netpfil/ipfw/nat64/nat64_translate.c
1274
&cfg->stats, logdata);
sys/netpfil/ipfw/nat64/nat64_translate.c
1280
FRAGSZ(nh->nh_mtu) + sizeof(struct ip), &cfg->stats, logdata);
sys/netpfil/ipfw/nat64/nat64_translate.c
1318
m = nat64_icmp_translate(m, &ip6, lport, hlen, cfg);
sys/netpfil/ipfw/nat64/nat64_translate.c
1325
nat64_fragment6(&cfg->stats, &ip6, &mq, m, nh->nh_mtu, ip_id, ip_off);
sys/netpfil/ipfw/nat64/nat64_translate.c
1328
&cfg->stats, logdata) != 0)
sys/netpfil/ipfw/nat64/nat64_translate.c
1330
NAT64STAT_INC(&cfg->stats, opcnt46);
sys/netpfil/ipfw/nat64/nat64_translate.c
1338
struct nat64_config *cfg, void *logdata)
sys/netpfil/ipfw/nat64/nat64_translate.c
1358
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1388
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1400
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1445
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1456
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1463
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1469
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1496
NAT64STAT_INC(&cfg->stats, nomem);
sys/netpfil/ipfw/nat64/nat64_translate.c
1535
ip.ip_src.s_addr = nat64_extract_ip4(&ip6i->ip6_src, cfg->plat_plen);
sys/netpfil/ipfw/nat64/nat64_translate.c
1544
nat64_icmp_reflect(m, type, code, (uint16_t)mtu, &cfg->stats,
sys/netpfil/ipfw/nat64/nat64_translate.c
1553
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1559
struct nat64_config *cfg, void *logdata)
sys/netpfil/ipfw/nat64/nat64_translate.c
1586
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1590
ip.ip_dst.s_addr = nat64_extract_ip4(&ip6->ip6_dst, cfg->plat_plen);
sys/netpfil/ipfw/nat64/nat64_translate.c
1592
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1598
ICMP6_TIME_EXCEED_TRANSIT, 0, &cfg->stats, logdata);
sys/netpfil/ipfw/nat64/nat64_translate.c
1607
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1616
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1625
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1633
offsetof(struct ip6_hdr, ip6_plen), &cfg->stats,
sys/netpfil/ipfw/nat64/nat64_translate.c
1642
NAT64STAT_INC(&cfg->stats, dropped);
sys/netpfil/ipfw/nat64/nat64_translate.c
1652
cfg, logdata));
sys/netpfil/ipfw/nat64/nat64_translate.c
1657
NAT64STAT_INC(&cfg->stats, noroute4);
sys/netpfil/ipfw/nat64/nat64_translate.c
1659
ICMP6_DST_UNREACH_NOROUTE, 0, &cfg->stats, logdata);
sys/netpfil/ipfw/nat64/nat64_translate.c
1664
&cfg->stats, logdata);
sys/netpfil/ipfw/nat64/nat64_translate.c
1718
&cfg->stats, logdata) == 0)
sys/netpfil/ipfw/nat64/nat64_translate.c
1719
NAT64STAT_INC(&cfg->stats, opcnt64);
sys/netpfil/ipfw/nat64/nat64_translate.c
315
nat64_check_private_ip4(const struct nat64_config *cfg, in_addr_t ia)
sys/netpfil/ipfw/nat64/nat64_translate.c
318
if (cfg->flags & NAT64_ALLOW_PRIVATE)
sys/netpfil/ipfw/nat64/nat64_translate.c
322
if (cfg->flags & NAT64_WKPFX) {
sys/netpfil/ipfw/nat64/nat64_translate.c
899
int offset, struct nat64_config *cfg)
sys/netpfil/ipfw/nat64/nat64_translate.c
914
NAT64STAT_INC(&cfg->stats, nomem);
sys/netpfil/ipfw/nat64/nat64_translate.h
137
int nat64_check_private_ip4(const struct nat64_config *cfg, in_addr_t ia);
sys/netpfil/ipfw/nat64/nat64_translate.h
142
struct in6_addr *daddr, uint16_t lport, struct nat64_config *cfg,
sys/netpfil/ipfw/nat64/nat64_translate.h
145
struct nat64_config *cfg, void *logdata);
sys/netpfil/ipfw/nat64/nat64_translate.h
147
uint16_t aport, struct nat64_config *cfg, void *logdata);
sys/netpfil/ipfw/nat64/nat64clat.c
100
memcpy(&daddr, &cfg->base.plat_prefix, sizeof(daddr));
sys/netpfil/ipfw/nat64/nat64clat.c
101
nat64_embed_ip4(&daddr, cfg->base.plat_plen, ip->ip_dst.s_addr);
sys/netpfil/ipfw/nat64/nat64clat.c
102
if (cfg->base.flags & NAT64_LOG) {
sys/netpfil/ipfw/nat64/nat64clat.c
104
nat64clat_log(logdata, m, AF_INET, cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64clat.c
107
return (nat64_do_handle_ip4(m, &saddr, &daddr, 0, &cfg->base,
sys/netpfil/ipfw/nat64/nat64clat.c
112
nat64clat_handle_ip6(struct ip_fw_chain *chain, struct nat64clat_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64clat.c
126
if (memcmp(&ip6->ip6_dst, &cfg->base.clat_prefix,
sys/netpfil/ipfw/nat64/nat64clat.c
127
cfg->base.clat_plen / 8) != 0)
sys/netpfil/ipfw/nat64/nat64clat.c
130
if (memcmp(&ip6->ip6_src, &cfg->base.plat_prefix,
sys/netpfil/ipfw/nat64/nat64clat.c
131
cfg->base.plat_plen / 8) != 0)
sys/netpfil/ipfw/nat64/nat64clat.c
134
if (cfg->base.flags & NAT64_LOG) {
sys/netpfil/ipfw/nat64/nat64clat.c
136
nat64clat_log(logdata, m, AF_INET6, cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64clat.c
140
aaddr = nat64_extract_ip4(&ip6->ip6_src, cfg->base.plat_plen);
sys/netpfil/ipfw/nat64/nat64clat.c
141
return (nat64_do_handle_ip6(m, aaddr, 0, &cfg->base, logdata));
sys/netpfil/ipfw/nat64/nat64clat.c
145
nat64clat_handle_icmp6(struct ip_fw_chain *chain, struct nat64clat_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64clat.c
156
stats = &cfg->base.stats;
sys/netpfil/ipfw/nat64/nat64clat.c
189
daddr = nat64_extract_ip4(&ip6i->ip6_dst, cfg->base.clat_plen);
sys/netpfil/ipfw/nat64/nat64clat.c
194
if (cfg->base.flags & NAT64_LOG) {
sys/netpfil/ipfw/nat64/nat64clat.c
196
nat64clat_log(logdata, m, AF_INET6, cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64clat.c
199
return (nat64_handle_icmp6(m, 0, daddr, 0, &cfg->base, logdata));
sys/netpfil/ipfw/nat64/nat64clat.c
207
struct nat64clat_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64clat.c
217
(cfg = NAT64_LOOKUP(chain, icmd)) == NULL)
sys/netpfil/ipfw/nat64/nat64clat.c
222
ret = nat64clat_handle_ip4(chain, cfg, args->m);
sys/netpfil/ipfw/nat64/nat64clat.c
225
ret = nat64clat_handle_ip6(chain, cfg, args->m);
sys/netpfil/ipfw/nat64/nat64clat.c
240
ret = nat64clat_handle_icmp6(chain, cfg, args->m);
sys/netpfil/ipfw/nat64/nat64clat.c
84
nat64clat_handle_ip4(struct ip_fw_chain *chain, struct nat64clat_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64clat.c
95
nat64_check_private_ip4(&cfg->base, ip->ip_dst.s_addr) != 0)
sys/netpfil/ipfw/nat64/nat64clat.c
98
memcpy(&saddr, &cfg->base.clat_prefix, sizeof(saddr));
sys/netpfil/ipfw/nat64/nat64clat.c
99
nat64_embed_ip4(&saddr, cfg->base.clat_plen, ip->ip_src.s_addr);
sys/netpfil/ipfw/nat64/nat64clat_control.c
100
uc->flags = cfg->base.flags & NAT64CLAT_FLAGSMASK;
sys/netpfil/ipfw/nat64/nat64clat_control.c
101
uc->set = cfg->no.set;
sys/netpfil/ipfw/nat64/nat64clat_control.c
102
strlcpy(uc->name, cfg->no.name, sizeof(uc->name));
sys/netpfil/ipfw/nat64/nat64clat_control.c
125
struct nat64clat_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64clat_control.c
127
cfg = (struct nat64clat_cfg *)ipfw_objhash_lookup_name_type(ni, set,
sys/netpfil/ipfw/nat64/nat64clat_control.c
130
return (cfg);
sys/netpfil/ipfw/nat64/nat64clat_control.c
147
struct nat64clat_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64clat_control.c
172
cfg = nat64clat_alloc_config(uc->name, uc->set);
sys/netpfil/ipfw/nat64/nat64clat_control.c
173
cfg->base.plat_prefix = uc->plat_prefix;
sys/netpfil/ipfw/nat64/nat64clat_control.c
174
cfg->base.plat_plen = uc->plat_plen;
sys/netpfil/ipfw/nat64/nat64clat_control.c
175
cfg->base.clat_prefix = uc->clat_prefix;
sys/netpfil/ipfw/nat64/nat64clat_control.c
176
cfg->base.clat_plen = uc->clat_plen;
sys/netpfil/ipfw/nat64/nat64clat_control.c
177
cfg->base.flags = (uc->flags & NAT64CLAT_FLAGSMASK) |
sys/netpfil/ipfw/nat64/nat64clat_control.c
179
if (IN6_IS_ADDR_WKPFX(&cfg->base.plat_prefix))
sys/netpfil/ipfw/nat64/nat64clat_control.c
180
cfg->base.flags |= NAT64_WKPFX;
sys/netpfil/ipfw/nat64/nat64clat_control.c
186
nat64clat_free_config(cfg);
sys/netpfil/ipfw/nat64/nat64clat_control.c
190
if (ipfw_objhash_alloc_idx(ni, &cfg->no.kidx) != 0) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
192
nat64clat_free_config(cfg);
sys/netpfil/ipfw/nat64/nat64clat_control.c
195
ipfw_objhash_add(CHAIN_TO_SRV(ch), &cfg->no);
sys/netpfil/ipfw/nat64/nat64clat_control.c
197
SRV_OBJECT(ch, cfg->no.kidx) = cfg;
sys/netpfil/ipfw/nat64/nat64clat_control.c
217
struct nat64clat_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64clat_control.c
235
cfg = nat64clat_find(ni, oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nat64/nat64clat_control.c
236
if (cfg == NULL) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
240
nat64clat_export_config(ch, cfg, uc);
sys/netpfil/ipfw/nat64/nat64clat_control.c
246
cfg = nat64clat_find(ni, oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nat64/nat64clat_control.c
247
if (cfg == NULL) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
257
if (uc->plat_plen != cfg->base.plat_plen ||
sys/netpfil/ipfw/nat64/nat64clat_control.c
258
!IN6_ARE_ADDR_EQUAL(&uc->plat_prefix, &cfg->base.plat_prefix)) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
266
if (uc->clat_plen != cfg->base.clat_plen ||
sys/netpfil/ipfw/nat64/nat64clat_control.c
267
!IN6_ARE_ADDR_EQUAL(&uc->clat_prefix, &cfg->base.clat_prefix)) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
278
cfg->base.plat_prefix = uc->plat_prefix;
sys/netpfil/ipfw/nat64/nat64clat_control.c
279
cfg->base.plat_plen = uc->plat_plen;
sys/netpfil/ipfw/nat64/nat64clat_control.c
282
cfg->base.clat_prefix = uc->clat_prefix;
sys/netpfil/ipfw/nat64/nat64clat_control.c
283
cfg->base.clat_plen = uc->clat_plen;
sys/netpfil/ipfw/nat64/nat64clat_control.c
288
cfg->base.flags &= ~NAT64CLAT_FLAGSMASK;
sys/netpfil/ipfw/nat64/nat64clat_control.c
289
cfg->base.flags |= uc->flags & NAT64CLAT_FLAGSMASK;
sys/netpfil/ipfw/nat64/nat64clat_control.c
296
nat64clat_detach_config(struct ip_fw_chain *ch, struct nat64clat_cfg *cfg)
sys/netpfil/ipfw/nat64/nat64clat_control.c
301
ipfw_objhash_del(CHAIN_TO_SRV(ch), &cfg->no);
sys/netpfil/ipfw/nat64/nat64clat_control.c
302
ipfw_objhash_free_idx(CHAIN_TO_SRV(ch), cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64clat_control.c
317
struct nat64clat_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64clat_control.c
327
cfg = nat64clat_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nat64/nat64clat_control.c
328
if (cfg == NULL) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
332
if (cfg->no.refcnt > 0) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
337
ipfw_reset_eaction_instance(ch, V_nat64clat_eid, cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64clat_control.c
338
SRV_OBJECT(ch, cfg->no.kidx) = NULL;
sys/netpfil/ipfw/nat64/nat64clat_control.c
339
nat64clat_detach_config(ch, cfg);
sys/netpfil/ipfw/nat64/nat64clat_control.c
342
nat64clat_free_config(cfg);
sys/netpfil/ipfw/nat64/nat64clat_control.c
390
export_stats(struct ip_fw_chain *ch, struct nat64clat_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64clat_control.c
394
__COPY_STAT_FIELD(cfg, stats, opcnt64);
sys/netpfil/ipfw/nat64/nat64clat_control.c
395
__COPY_STAT_FIELD(cfg, stats, opcnt46);
sys/netpfil/ipfw/nat64/nat64clat_control.c
396
__COPY_STAT_FIELD(cfg, stats, ofrags);
sys/netpfil/ipfw/nat64/nat64clat_control.c
397
__COPY_STAT_FIELD(cfg, stats, ifrags);
sys/netpfil/ipfw/nat64/nat64clat_control.c
398
__COPY_STAT_FIELD(cfg, stats, oerrors);
sys/netpfil/ipfw/nat64/nat64clat_control.c
399
__COPY_STAT_FIELD(cfg, stats, noroute4);
sys/netpfil/ipfw/nat64/nat64clat_control.c
400
__COPY_STAT_FIELD(cfg, stats, noroute6);
sys/netpfil/ipfw/nat64/nat64clat_control.c
401
__COPY_STAT_FIELD(cfg, stats, noproto);
sys/netpfil/ipfw/nat64/nat64clat_control.c
402
__COPY_STAT_FIELD(cfg, stats, nomem);
sys/netpfil/ipfw/nat64/nat64clat_control.c
403
__COPY_STAT_FIELD(cfg, stats, dropped);
sys/netpfil/ipfw/nat64/nat64clat_control.c
419
struct nat64clat_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64clat_control.c
435
cfg = nat64clat_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nat64/nat64clat_control.c
436
if (cfg == NULL) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
440
export_stats(ch, cfg, &stats);
sys/netpfil/ipfw/nat64/nat64clat_control.c
465
struct nat64clat_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64clat_control.c
476
cfg = nat64clat_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nat64/nat64clat_control.c
477
if (cfg == NULL) {
sys/netpfil/ipfw/nat64/nat64clat_control.c
481
COUNTER_ARRAY_ZERO(cfg->base.stats.cnt, NAT64STATS);
sys/netpfil/ipfw/nat64/nat64clat_control.c
509
struct nat64clat_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64clat_control.c
513
cfg = (struct nat64clat_cfg *)SRV_OBJECT(ch, no->kidx);
sys/netpfil/ipfw/nat64/nat64clat_control.c
515
nat64clat_detach_config(ch, cfg);
sys/netpfil/ipfw/nat64/nat64clat_control.c
516
nat64clat_free_config(cfg);
sys/netpfil/ipfw/nat64/nat64clat_control.c
66
static void nat64clat_free_config(struct nat64clat_cfg *cfg);
sys/netpfil/ipfw/nat64/nat64clat_control.c
73
struct nat64clat_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64clat_control.c
75
cfg = malloc(sizeof(struct nat64clat_cfg), M_IPFW, M_WAITOK | M_ZERO);
sys/netpfil/ipfw/nat64/nat64clat_control.c
76
COUNTER_ARRAY_ALLOC(cfg->base.stats.cnt, NAT64STATS, M_WAITOK);
sys/netpfil/ipfw/nat64/nat64clat_control.c
77
cfg->no.name = cfg->name;
sys/netpfil/ipfw/nat64/nat64clat_control.c
78
cfg->no.etlv = IPFW_TLV_NAT64CLAT_NAME;
sys/netpfil/ipfw/nat64/nat64clat_control.c
79
cfg->no.set = set;
sys/netpfil/ipfw/nat64/nat64clat_control.c
80
strlcpy(cfg->name, name, sizeof(cfg->name));
sys/netpfil/ipfw/nat64/nat64clat_control.c
81
return (cfg);
sys/netpfil/ipfw/nat64/nat64clat_control.c
85
nat64clat_free_config(struct nat64clat_cfg *cfg)
sys/netpfil/ipfw/nat64/nat64clat_control.c
88
COUNTER_ARRAY_FREE(cfg->base.stats.cnt, NAT64STATS);
sys/netpfil/ipfw/nat64/nat64clat_control.c
89
free(cfg, M_IPFW);
sys/netpfil/ipfw/nat64/nat64clat_control.c
93
nat64clat_export_config(struct ip_fw_chain *ch, struct nat64clat_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64clat_control.c
96
uc->plat_prefix = cfg->base.plat_prefix;
sys/netpfil/ipfw/nat64/nat64clat_control.c
97
uc->plat_plen = cfg->base.plat_plen;
sys/netpfil/ipfw/nat64/nat64clat_control.c
98
uc->clat_prefix = cfg->base.clat_prefix;
sys/netpfil/ipfw/nat64/nat64clat_control.c
99
uc->clat_plen = cfg->base.clat_plen;
sys/netpfil/ipfw/nat64/nat64lsn.c
1000
struct nat64lsn_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64lsn.c
1002
cfg = (struct nat64lsn_cfg *) data;
sys/netpfil/ipfw/nat64/nat64lsn.c
1003
CURVNET_SET(cfg->vp);
sys/netpfil/ipfw/nat64/nat64lsn.c
1004
if (cfg->hosts_count > 0) {
sys/netpfil/ipfw/nat64/nat64lsn.c
1010
nat64lsn_expire_hosts(cfg, &ji->hosts);
sys/netpfil/ipfw/nat64/nat64lsn.c
1011
nat64lsn_expire_portgroups(cfg, &ji->portgroups);
sys/netpfil/ipfw/nat64/nat64lsn.c
1012
ji->pgchunk = nat64lsn_expire_pgchunk(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1016
NAT64STAT_INC(&cfg->base.stats, jnomem);
sys/netpfil/ipfw/nat64/nat64lsn.c
1018
callout_schedule(&cfg->periodic, hz * PERIODIC_DELAY);
sys/netpfil/ipfw/nat64/nat64lsn.c
1026
nat64lsn_alloc_host(struct nat64lsn_cfg *cfg, struct nat64lsn_job_item *ji)
sys/netpfil/ipfw/nat64/nat64lsn.c
1037
CK_SLIST_FOREACH(host, &HOSTS(cfg, ji->src6_hval), entries) {
sys/netpfil/ipfw/nat64/nat64lsn.c
1075
link->alias = nat64lsn_get_alias(cfg, &ji->f_id);
sys/netpfil/ipfw/nat64/nat64lsn.c
1083
CFG_LOCK(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1084
CK_SLIST_INSERT_HEAD(&HOSTS(cfg, ji->src6_hval), host, entries);
sys/netpfil/ipfw/nat64/nat64lsn.c
1085
cfg->hosts_count++;
sys/netpfil/ipfw/nat64/nat64lsn.c
1086
CFG_UNLOCK(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1091
ji->state_hval = hval = STATE_HVAL(cfg, data);
sys/netpfil/ipfw/nat64/nat64lsn.c
1092
state = nat64lsn_get_state6to4(cfg, host, &ji->f_id, hval,
sys/netpfil/ipfw/nat64/nat64lsn.c
1100
if (nat64lsn_alloc_pg(cfg, ji) != PG_ERROR(0))
sys/netpfil/ipfw/nat64/nat64lsn.c
1126
nat64lsn_alloc_proto_pg(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
1151
pg->chunks_count = cfg->states_chunks;
sys/netpfil/ipfw/nat64/nat64lsn.c
1201
NAT64STAT_INC(&cfg->base.stats, spgcreated);
sys/netpfil/ipfw/nat64/nat64lsn.c
1214
nat64lsn_alloc_pg(struct nat64lsn_cfg *cfg, struct nat64lsn_job_item *ji)
sys/netpfil/ipfw/nat64/nat64lsn.c
1220
link = nat64lsn_get_aliaslink(cfg, ji->host, &ji->f_id);
sys/netpfil/ipfw/nat64/nat64lsn.c
1234
ret = nat64lsn_alloc_proto_pg(cfg, alias,
sys/netpfil/ipfw/nat64/nat64lsn.c
1239
ret = nat64lsn_alloc_proto_pg(cfg, alias,
sys/netpfil/ipfw/nat64/nat64lsn.c
1244
ret = nat64lsn_alloc_proto_pg(cfg, alias,
sys/netpfil/ipfw/nat64/nat64lsn.c
1261
ji->state = nat64lsn_get_state6to4(cfg, ji->host, &ji->f_id,
sys/netpfil/ipfw/nat64/nat64lsn.c
1277
struct nat64lsn_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64lsn.c
1281
cfg = (struct nat64lsn_cfg *)data;
sys/netpfil/ipfw/nat64/nat64lsn.c
1282
if (cfg->jlen == 0)
sys/netpfil/ipfw/nat64/nat64lsn.c
1285
CURVNET_SET(cfg->vp);
sys/netpfil/ipfw/nat64/nat64lsn.c
1290
STAILQ_SWAP(&jhead, &cfg->jhead, nat64lsn_job_item);
sys/netpfil/ipfw/nat64/nat64lsn.c
1291
jcount = cfg->jlen;
sys/netpfil/ipfw/nat64/nat64lsn.c
1292
cfg->jlen = 0;
sys/netpfil/ipfw/nat64/nat64lsn.c
1297
NAT64STAT_INC(&cfg->base.stats, jcalls);
sys/netpfil/ipfw/nat64/nat64lsn.c
130
static int nat64lsn_alloc_host(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
1313
if (nat64lsn_alloc_host(cfg, ji) != HOST_ERROR(0))
sys/netpfil/ipfw/nat64/nat64lsn.c
1314
NAT64STAT_INC(&cfg->base.stats, jhostfails);
sys/netpfil/ipfw/nat64/nat64lsn.c
1317
if (nat64lsn_alloc_pg(cfg, ji) != PG_ERROR(0))
sys/netpfil/ipfw/nat64/nat64lsn.c
1318
NAT64STAT_INC(&cfg->base.stats, jportfails);
sys/netpfil/ipfw/nat64/nat64lsn.c
132
static int nat64lsn_alloc_pg(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
1326
nat64lsn_translate6_internal(cfg, &ji->m,
sys/netpfil/ipfw/nat64/nat64lsn.c
1328
NAT64STAT_INC(&cfg->base.stats, jreinjected);
sys/netpfil/ipfw/nat64/nat64lsn.c
1348
nat64lsn_create_job(struct nat64lsn_cfg *cfg, int jtype)
sys/netpfil/ipfw/nat64/nat64lsn.c
135
struct nat64lsn_cfg *cfg, int jtype);
sys/netpfil/ipfw/nat64/nat64lsn.c
1357
if (cfg->jlen >= cfg->jmaxlen)
sys/netpfil/ipfw/nat64/nat64lsn.c
1358
NAT64STAT_INC(&cfg->base.stats, jmaxlen);
sys/netpfil/ipfw/nat64/nat64lsn.c
136
static void nat64lsn_enqueue_job(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
1362
NAT64STAT_INC(&cfg->base.stats, jnomem);
sys/netpfil/ipfw/nat64/nat64lsn.c
1365
NAT64STAT_INC(&cfg->base.stats, dropped);
sys/netpfil/ipfw/nat64/nat64lsn.c
1375
nat64lsn_enqueue_job(struct nat64lsn_cfg *cfg, struct nat64lsn_job_item *ji)
sys/netpfil/ipfw/nat64/nat64lsn.c
1379
STAILQ_INSERT_TAIL(&cfg->jhead, ji, entries);
sys/netpfil/ipfw/nat64/nat64lsn.c
1380
NAT64STAT_INC(&cfg->base.stats, jrequests);
sys/netpfil/ipfw/nat64/nat64lsn.c
1381
cfg->jlen++;
sys/netpfil/ipfw/nat64/nat64lsn.c
1383
if (callout_pending(&cfg->jcallout) == 0)
sys/netpfil/ipfw/nat64/nat64lsn.c
1384
callout_reset(&cfg->jcallout, 1, nat64lsn_do_request, cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
142
static int nat64lsn_translate4(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
144
static int nat64lsn_translate6(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
146
static int nat64lsn_translate6_internal(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
1560
nat64lsn_request_host(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
1566
ji = nat64lsn_create_job(cfg, JTYPE_NEWHOST);
sys/netpfil/ipfw/nat64/nat64lsn.c
1575
nat64lsn_enqueue_job(cfg, ji);
sys/netpfil/ipfw/nat64/nat64lsn.c
1576
NAT64STAT_INC(&cfg->base.stats, jhostsreq);
sys/netpfil/ipfw/nat64/nat64lsn.c
1583
nat64lsn_request_pg(struct nat64lsn_cfg *cfg, struct nat64lsn_host *host,
sys/netpfil/ipfw/nat64/nat64lsn.c
1589
ji = nat64lsn_create_job(cfg, JTYPE_NEWPORTGROUP);
sys/netpfil/ipfw/nat64/nat64lsn.c
1599
nat64lsn_enqueue_job(cfg, ji);
sys/netpfil/ipfw/nat64/nat64lsn.c
1600
NAT64STAT_INC(&cfg->base.stats, jportreq);
sys/netpfil/ipfw/nat64/nat64lsn.c
1607
nat64lsn_translate6_internal(struct nat64lsn_cfg *cfg, struct mbuf **mp,
sys/netpfil/ipfw/nat64/nat64lsn.c
1621
if (cfg->base.flags & NAT64_LOG) {
sys/netpfil/ipfw/nat64/nat64lsn.c
1628
htons(state->aport), &cfg->base, logdata);
sys/netpfil/ipfw/nat64/nat64lsn.c
1630
return (cfg->nomatch_verdict);
sys/netpfil/ipfw/nat64/nat64lsn.c
1637
nat64lsn_translate6(struct nat64lsn_cfg *cfg, struct ipfw_flow_id *f_id,
sys/netpfil/ipfw/nat64/nat64lsn.c
1660
NAT64STAT_INC(&cfg->base.stats, dropped);
sys/netpfil/ipfw/nat64/nat64lsn.c
1676
NAT64STAT_INC(&cfg->base.stats, noproto);
sys/netpfil/ipfw/nat64/nat64lsn.c
1677
return (cfg->nomatch_verdict);
sys/netpfil/ipfw/nat64/nat64lsn.c
1681
addr = nat64_extract_ip4(&f_id->dst_ip6, cfg->base.plat_plen);
sys/netpfil/ipfw/nat64/nat64lsn.c
1682
if (addr == 0 || nat64_check_private_ip4(&cfg->base, addr) != 0) {
sys/netpfil/ipfw/nat64/nat64lsn.c
1685
NAT64STAT_INC(&cfg->base.stats, dropped);
sys/netpfil/ipfw/nat64/nat64lsn.c
1692
hval = HOST_HVAL(cfg, &f_id->src_ip6);
sys/netpfil/ipfw/nat64/nat64lsn.c
1693
CK_SLIST_FOREACH(host, &HOSTS(cfg, hval), entries) {
sys/netpfil/ipfw/nat64/nat64lsn.c
1700
return (nat64lsn_request_host(cfg, f_id, mp,
sys/netpfil/ipfw/nat64/nat64lsn.c
1707
hval = STATE_HVAL(cfg, data);
sys/netpfil/ipfw/nat64/nat64lsn.c
1708
state = nat64lsn_get_state6to4(cfg, host, f_id, hval, addr,
sys/netpfil/ipfw/nat64/nat64lsn.c
1711
return (nat64lsn_request_pg(cfg, host, f_id, mp, hval, addr,
sys/netpfil/ipfw/nat64/nat64lsn.c
1713
return (nat64lsn_translate6_internal(cfg, mp, state, flags));
sys/netpfil/ipfw/nat64/nat64lsn.c
1741
ret = nat64lsn_translate4(i->cfg, &args->f_id, &args->m);
sys/netpfil/ipfw/nat64/nat64lsn.c
1747
if ((i->cfg->base.flags & NAT64LSN_ANYPREFIX) == 0 &&
sys/netpfil/ipfw/nat64/nat64lsn.c
1748
memcmp(&args->f_id.dst_ip6, &i->cfg->base.plat_prefix,
sys/netpfil/ipfw/nat64/nat64lsn.c
1749
i->cfg->base.plat_plen / 8) != 0) {
sys/netpfil/ipfw/nat64/nat64lsn.c
1750
ret = i->cfg->nomatch_verdict;
sys/netpfil/ipfw/nat64/nat64lsn.c
1753
ret = nat64lsn_translate6(i->cfg, &args->f_id, &args->m);
sys/netpfil/ipfw/nat64/nat64lsn.c
1756
ret = i->cfg->nomatch_verdict;
sys/netpfil/ipfw/nat64/nat64lsn.c
1818
nat64lsn_start_instance(struct nat64lsn_cfg *cfg)
sys/netpfil/ipfw/nat64/nat64lsn.c
1821
CALLOUT_LOCK(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1822
callout_reset(&cfg->periodic, hz * PERIODIC_DELAY,
sys/netpfil/ipfw/nat64/nat64lsn.c
1823
nat64lsn_periodic, cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1824
CALLOUT_UNLOCK(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1830
struct nat64lsn_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64lsn.c
1834
cfg = malloc(sizeof(struct nat64lsn_cfg), M_NAT64LSN,
sys/netpfil/ipfw/nat64/nat64lsn.c
1837
CFG_LOCK_INIT(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1838
CALLOUT_LOCK_INIT(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1839
STAILQ_INIT(&cfg->jhead);
sys/netpfil/ipfw/nat64/nat64lsn.c
1840
cfg->vp = curvnet;
sys/netpfil/ipfw/nat64/nat64lsn.c
1841
COUNTER_ARRAY_ALLOC(cfg->base.stats.cnt, NAT64STATS, M_WAITOK);
sys/netpfil/ipfw/nat64/nat64lsn.c
1843
cfg->hash_seed = arc4random();
sys/netpfil/ipfw/nat64/nat64lsn.c
1844
cfg->hosts_hashsize = NAT64LSN_HOSTS_HSIZE;
sys/netpfil/ipfw/nat64/nat64lsn.c
1845
cfg->hosts_hash = malloc(sizeof(struct nat64lsn_hosts_slist) *
sys/netpfil/ipfw/nat64/nat64lsn.c
1846
cfg->hosts_hashsize, M_NAT64LSN, M_WAITOK | M_ZERO);
sys/netpfil/ipfw/nat64/nat64lsn.c
1847
for (i = 0; i < cfg->hosts_hashsize; i++)
sys/netpfil/ipfw/nat64/nat64lsn.c
1848
CK_SLIST_INIT(&cfg->hosts_hash[i]);
sys/netpfil/ipfw/nat64/nat64lsn.c
1851
cfg->prefix4 = prefix;
sys/netpfil/ipfw/nat64/nat64lsn.c
1852
cfg->pmask4 = prefix | (naddr - 1);
sys/netpfil/ipfw/nat64/nat64lsn.c
1853
cfg->plen4 = plen;
sys/netpfil/ipfw/nat64/nat64lsn.c
1854
cfg->aliases = malloc(sizeof(struct nat64lsn_alias) * naddr,
sys/netpfil/ipfw/nat64/nat64lsn.c
1857
alias = &cfg->aliases[i];
sys/netpfil/ipfw/nat64/nat64lsn.c
1863
callout_init_mtx(&cfg->periodic, &cfg->periodic_lock, 0);
sys/netpfil/ipfw/nat64/nat64lsn.c
1864
callout_init(&cfg->jcallout, CALLOUT_MPSAFE);
sys/netpfil/ipfw/nat64/nat64lsn.c
1866
return (cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1886
nat64lsn_destroy_alias(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
1931
nat64lsn_destroy_config(struct nat64lsn_cfg *cfg)
sys/netpfil/ipfw/nat64/nat64lsn.c
1936
CALLOUT_LOCK(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1937
callout_drain(&cfg->periodic);
sys/netpfil/ipfw/nat64/nat64lsn.c
1938
CALLOUT_UNLOCK(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1939
callout_drain(&cfg->jcallout);
sys/netpfil/ipfw/nat64/nat64lsn.c
1941
for (i = 0; i < cfg->hosts_hashsize; i++) {
sys/netpfil/ipfw/nat64/nat64lsn.c
1942
while (!CK_SLIST_EMPTY(&cfg->hosts_hash[i])) {
sys/netpfil/ipfw/nat64/nat64lsn.c
1943
host = CK_SLIST_FIRST(&cfg->hosts_hash[i]);
sys/netpfil/ipfw/nat64/nat64lsn.c
1944
CK_SLIST_REMOVE_HEAD(&cfg->hosts_hash[i], entries);
sys/netpfil/ipfw/nat64/nat64lsn.c
1949
for (i = 0; i < (1 << (32 - cfg->plen4)); i++)
sys/netpfil/ipfw/nat64/nat64lsn.c
1950
nat64lsn_destroy_alias(cfg, &cfg->aliases[i]);
sys/netpfil/ipfw/nat64/nat64lsn.c
1952
CALLOUT_LOCK_DESTROY(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1953
CFG_LOCK_DESTROY(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
1954
COUNTER_ARRAY_FREE(cfg->base.stats.cnt, NAT64STATS);
sys/netpfil/ipfw/nat64/nat64lsn.c
1955
free(cfg->hosts_hash, M_NAT64LSN);
sys/netpfil/ipfw/nat64/nat64lsn.c
1956
free(cfg->aliases, M_NAT64LSN);
sys/netpfil/ipfw/nat64/nat64lsn.c
1957
free(cfg, M_NAT64LSN);
sys/netpfil/ipfw/nat64/nat64lsn.c
203
nat64lsn_get_aliaslink(struct nat64lsn_cfg *cfg __unused,
sys/netpfil/ipfw/nat64/nat64lsn.c
216
nat64lsn_get_alias(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
227
return (&ALIAS_BYHASH(cfg, idx++));
sys/netpfil/ipfw/nat64/nat64lsn.c
318
nat64lsn_get_state6to4(struct nat64lsn_cfg *cfg, struct nat64lsn_host *host,
sys/netpfil/ipfw/nat64/nat64lsn.c
336
link = nat64lsn_get_aliaslink(cfg, host, f_id);
sys/netpfil/ipfw/nat64/nat64lsn.c
399
NAT64STAT_INC(&cfg->base.stats, screated);
sys/netpfil/ipfw/nat64/nat64lsn.c
483
nat64lsn_get_state4to6(struct nat64lsn_cfg *cfg, struct nat64lsn_alias *alias,
sys/netpfil/ipfw/nat64/nat64lsn.c
554
nat64lsn_reassemble4(struct nat64lsn_cfg *cfg, struct mbuf *m,
sys/netpfil/ipfw/nat64/nat64lsn.c
578
NAT64STAT_INC(&cfg->base.stats, noproto);
sys/netpfil/ipfw/nat64/nat64lsn.c
584
NAT64STAT_INC(&cfg->base.stats, nomem);
sys/netpfil/ipfw/nat64/nat64lsn.c
601
nat64lsn_translate4(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
616
if (addr < cfg->prefix4 || addr > cfg->pmask4) {
sys/netpfil/ipfw/nat64/nat64lsn.c
617
NAT64STAT_INC(&cfg->base.stats, nomatch4);
sys/netpfil/ipfw/nat64/nat64lsn.c
618
return (cfg->nomatch_verdict);
sys/netpfil/ipfw/nat64/nat64lsn.c
624
*mp = nat64lsn_reassemble4(cfg, *mp, &port);
sys/netpfil/ipfw/nat64/nat64lsn.c
635
NAT64STAT_INC(&cfg->base.stats, nomem);
sys/netpfil/ipfw/nat64/nat64lsn.c
638
NAT64STAT_INC(&cfg->base.stats, noproto);
sys/netpfil/ipfw/nat64/nat64lsn.c
639
return (cfg->nomatch_verdict);
sys/netpfil/ipfw/nat64/nat64lsn.c
641
if (addr < cfg->prefix4 || addr > cfg->pmask4) {
sys/netpfil/ipfw/nat64/nat64lsn.c
642
NAT64STAT_INC(&cfg->base.stats, nomatch4);
sys/netpfil/ipfw/nat64/nat64lsn.c
643
return (cfg->nomatch_verdict);
sys/netpfil/ipfw/nat64/nat64lsn.c
650
NAT64STAT_INC(&cfg->base.stats, noproto);
sys/netpfil/ipfw/nat64/nat64lsn.c
651
return (cfg->nomatch_verdict);
sys/netpfil/ipfw/nat64/nat64lsn.c
654
alias = &ALIAS_BYHASH(cfg, addr);
sys/netpfil/ipfw/nat64/nat64lsn.c
658
state = nat64lsn_get_state4to6(cfg, alias, f_id->src_ip,
sys/netpfil/ipfw/nat64/nat64lsn.c
661
NAT64STAT_INC(&cfg->base.stats, nomatch4);
sys/netpfil/ipfw/nat64/nat64lsn.c
662
return (cfg->nomatch_verdict);
sys/netpfil/ipfw/nat64/nat64lsn.c
681
if (cfg->base.flags & NAT64_LOG) {
sys/netpfil/ipfw/nat64/nat64lsn.c
692
nat64_embed_ip4(&src6, cfg->base.plat_plen, htonl(f_id->src_ip));
sys/netpfil/ipfw/nat64/nat64lsn.c
694
&cfg->base, logdata);
sys/netpfil/ipfw/nat64/nat64lsn.c
696
return (cfg->nomatch_verdict);
sys/netpfil/ipfw/nat64/nat64lsn.c
707
nat64lsn_check_state(struct nat64lsn_cfg *cfg, struct nat64lsn_state *state)
sys/netpfil/ipfw/nat64/nat64lsn.c
723
ttl = cfg->st_close_ttl;
sys/netpfil/ipfw/nat64/nat64lsn.c
725
ttl = cfg->st_estab_ttl;
sys/netpfil/ipfw/nat64/nat64lsn.c
727
ttl = cfg->st_syn_ttl;
sys/netpfil/ipfw/nat64/nat64lsn.c
729
ttl = cfg->st_syn_ttl;
sys/netpfil/ipfw/nat64/nat64lsn.c
734
if (age > cfg->st_udp_ttl)
sys/netpfil/ipfw/nat64/nat64lsn.c
738
if (age > cfg->st_icmp_ttl)
sys/netpfil/ipfw/nat64/nat64lsn.c
772
nat64lsn_maintain_pg(struct nat64lsn_cfg *cfg, struct nat64lsn_pg *pg)
sys/netpfil/ipfw/nat64/nat64lsn.c
786
if (nat64lsn_check_state(cfg, state) == 0) {
sys/netpfil/ipfw/nat64/nat64lsn.c
803
NAT64STAT_INC(&cfg->base.stats, sdeleted);
sys/netpfil/ipfw/nat64/nat64lsn.c
827
if (GET_AGE(pg->timestamp) < cfg->pg_delete_delay)
sys/netpfil/ipfw/nat64/nat64lsn.c
834
nat64lsn_expire_portgroups(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
842
for (i = 0; i < 1 << (32 - cfg->plen4); i++) {
sys/netpfil/ipfw/nat64/nat64lsn.c
843
alias = &cfg->aliases[i];
sys/netpfil/ipfw/nat64/nat64lsn.c
845
if (nat64lsn_maintain_pg(cfg, pg) == 0)
sys/netpfil/ipfw/nat64/nat64lsn.c
881
NAT64STAT_INC(&cfg->base.stats, spgdeleted);
sys/netpfil/ipfw/nat64/nat64lsn.c
897
nat64lsn_expire_hosts(struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn.c
903
for (i = 0; i < cfg->hosts_hashsize; i++) {
sys/netpfil/ipfw/nat64/nat64lsn.c
904
CK_SLIST_FOREACH_SAFE(host, &cfg->hosts_hash[i],
sys/netpfil/ipfw/nat64/nat64lsn.c
910
cfg->host_delete_delay) {
sys/netpfil/ipfw/nat64/nat64lsn.c
918
CFG_LOCK(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
919
CK_SLIST_REMOVE(&cfg->hosts_hash[i], host,
sys/netpfil/ipfw/nat64/nat64lsn.c
921
cfg->hosts_count--;
sys/netpfil/ipfw/nat64/nat64lsn.c
922
CFG_UNLOCK(cfg);
sys/netpfil/ipfw/nat64/nat64lsn.c
927
GET_AGE(host->timestamp) < cfg->host_delete_delay)
sys/netpfil/ipfw/nat64/nat64lsn.c
937
nat64lsn_expire_pgchunk(struct nat64lsn_cfg *cfg)
sys/netpfil/ipfw/nat64/nat64lsn.c
945
for (i = 0; i < 1 << (32 - cfg->plen4); i++) {
sys/netpfil/ipfw/nat64/nat64lsn.c
946
alias = &cfg->aliases[i];
sys/netpfil/ipfw/nat64/nat64lsn.c
947
if (GET_AGE(alias->timestamp) < cfg->pgchunk_delete_delay)
sys/netpfil/ipfw/nat64/nat64lsn.c
968
nat64lsn_maintain_hosts(struct nat64lsn_cfg *cfg)
sys/netpfil/ipfw/nat64/nat64lsn.c
974
for (i = 0; i < cfg->hosts_hashsize; i++) {
sys/netpfil/ipfw/nat64/nat64lsn.c
975
CK_SLIST_FOREACH(h, &cfg->hosts_hash[i], entries) {
sys/netpfil/ipfw/nat64/nat64lsn.h
247
struct nat64lsn_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64lsn.h
268
void nat64lsn_destroy_config(struct nat64lsn_cfg *cfg);
sys/netpfil/ipfw/nat64/nat64lsn.h
269
void nat64lsn_start_instance(struct nat64lsn_cfg *cfg);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
117
struct nat64lsn_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
169
cfg = nat64lsn_init_config(ch, addr4, uc->plen4);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
170
cfg->base.plat_prefix = uc->prefix6;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
171
cfg->base.plat_plen = uc->plen6;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
172
cfg->base.flags = (uc->flags & NAT64LSN_FLAGSMASK) | NAT64_PLATPFX;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
173
if (IN6_IS_ADDR_WKPFX(&cfg->base.plat_prefix))
sys/netpfil/ipfw/nat64/nat64lsn_control.c
174
cfg->base.flags |= NAT64_WKPFX;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
175
else if (IN6_IS_ADDR_UNSPECIFIED(&cfg->base.plat_prefix))
sys/netpfil/ipfw/nat64/nat64lsn_control.c
176
cfg->base.flags |= NAT64LSN_ANYPREFIX;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
178
cfg->states_chunks = uc->states_chunks;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
179
cfg->jmaxlen = uc->jmaxlen;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
180
cfg->host_delete_delay = uc->nh_delete_delay;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
181
cfg->pg_delete_delay = uc->pg_delete_delay;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
182
cfg->st_syn_ttl = uc->st_syn_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
183
cfg->st_close_ttl = uc->st_close_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
184
cfg->st_estab_ttl = uc->st_estab_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
185
cfg->st_udp_ttl = uc->st_udp_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
186
cfg->st_icmp_ttl = uc->st_icmp_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
187
cfg->nomatch_verdict = IP_FW_DENY;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
193
nat64lsn_destroy_config(cfg);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
200
nat64lsn_destroy_config(cfg);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
207
i->cfg = cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
209
nat64lsn_start_instance(cfg);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
261
nat64lsn_destroy_config(i->cfg);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
269
export_stats(struct ip_fw_chain *ch, struct nat64lsn_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64lsn_control.c
275
__COPY_STAT_FIELD(cfg, stats, opcnt64);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
276
__COPY_STAT_FIELD(cfg, stats, opcnt46);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
277
__COPY_STAT_FIELD(cfg, stats, ofrags);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
278
__COPY_STAT_FIELD(cfg, stats, ifrags);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
279
__COPY_STAT_FIELD(cfg, stats, oerrors);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
280
__COPY_STAT_FIELD(cfg, stats, noroute4);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
281
__COPY_STAT_FIELD(cfg, stats, noroute6);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
282
__COPY_STAT_FIELD(cfg, stats, nomatch4);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
283
__COPY_STAT_FIELD(cfg, stats, noproto);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
284
__COPY_STAT_FIELD(cfg, stats, nomem);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
285
__COPY_STAT_FIELD(cfg, stats, dropped);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
287
__COPY_STAT_FIELD(cfg, stats, jcalls);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
288
__COPY_STAT_FIELD(cfg, stats, jrequests);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
289
__COPY_STAT_FIELD(cfg, stats, jhostsreq);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
290
__COPY_STAT_FIELD(cfg, stats, jportreq);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
291
__COPY_STAT_FIELD(cfg, stats, jhostfails);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
292
__COPY_STAT_FIELD(cfg, stats, jportfails);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
293
__COPY_STAT_FIELD(cfg, stats, jmaxlen);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
294
__COPY_STAT_FIELD(cfg, stats, jnomem);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
295
__COPY_STAT_FIELD(cfg, stats, jreinjected);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
296
__COPY_STAT_FIELD(cfg, stats, screated);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
297
__COPY_STAT_FIELD(cfg, stats, sdeleted);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
298
__COPY_STAT_FIELD(cfg, stats, spgcreated);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
299
__COPY_STAT_FIELD(cfg, stats, spgdeleted);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
301
stats->hostcount = cfg->hosts_count;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
302
for (i = 0; i < (1 << (32 - cfg->plen4)); i++) {
sys/netpfil/ipfw/nat64/nat64lsn_control.c
303
alias = &cfg->aliases[i];
sys/netpfil/ipfw/nat64/nat64lsn_control.c
315
struct nat64lsn_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
319
cfg = i->cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
321
uc->flags = cfg->base.flags & NAT64LSN_FLAGSMASK;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
322
uc->states_chunks = cfg->states_chunks;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
323
uc->jmaxlen = cfg->jmaxlen;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
324
uc->nh_delete_delay = cfg->host_delete_delay;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
325
uc->pg_delete_delay = cfg->pg_delete_delay;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
326
uc->st_syn_ttl = cfg->st_syn_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
327
uc->st_close_ttl = cfg->st_close_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
328
uc->st_estab_ttl = cfg->st_estab_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
329
uc->st_udp_ttl = cfg->st_udp_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
330
uc->st_icmp_ttl = cfg->st_icmp_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
331
uc->prefix4.s_addr = htonl(cfg->prefix4);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
332
uc->prefix6 = cfg->base.plat_prefix;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
333
uc->plen4 = cfg->plen4;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
334
uc->plen6 = cfg->base.plat_plen;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
413
struct nat64lsn_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
454
cfg = i->cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
455
cfg->states_chunks = uc->states_chunks;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
456
cfg->jmaxlen = uc->jmaxlen;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
457
cfg->host_delete_delay = uc->nh_delete_delay;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
458
cfg->pg_delete_delay = uc->pg_delete_delay;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
459
cfg->st_syn_ttl = uc->st_syn_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
460
cfg->st_close_ttl = uc->st_close_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
461
cfg->st_estab_ttl = uc->st_estab_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
462
cfg->st_udp_ttl = uc->st_udp_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
463
cfg->st_icmp_ttl = uc->st_icmp_ttl;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
464
cfg->base.flags &= ~NAT64LSN_FLAGSMASK;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
465
cfg->base.flags |= uc->flags & NAT64LSN_FLAGSMASK;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
507
export_stats(ch, i->cfg, &stats);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
548
COUNTER_ARRAY_ZERO(i->cfg->base.stats.cnt, NAT64STATS);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
564
nat64lsn_export_states(struct nat64lsn_cfg *cfg, union nat64lsn_pgidx *idx,
sys/netpfil/ipfw/nat64/nat64lsn_control.c
611
nat64lsn_next_pgidx(struct nat64lsn_cfg *cfg, struct nat64lsn_pg *pg,
sys/netpfil/ipfw/nat64/nat64lsn_control.c
641
if (idx->addr < cfg->pmask4) {
sys/netpfil/ipfw/nat64/nat64lsn_control.c
650
nat64lsn_get_pg_byidx(struct nat64lsn_cfg *cfg, union nat64lsn_pgidx *idx)
sys/netpfil/ipfw/nat64/nat64lsn_control.c
655
alias = &cfg->aliases[idx->addr & ((1 << (32 - cfg->plen4)) - 1)];
sys/netpfil/ipfw/nat64/nat64lsn_control.c
693
struct nat64lsn_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
725
cfg = i->cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
727
idx.addr = cfg->prefix4;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
731
if (idx.addr < cfg->prefix4 || idx.addr > cfg->pmask4 ||
sys/netpfil/ipfw/nat64/nat64lsn_control.c
753
CALLOUT_LOCK(cfg);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
756
pg = nat64lsn_get_pg_byidx(cfg, &idx);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
759
ret = nat64lsn_export_states(cfg, &idx, pg,
sys/netpfil/ipfw/nat64/nat64lsn_control.c
774
switch (nat64lsn_next_pgidx(cfg, pg, &idx)) {
sys/netpfil/ipfw/nat64/nat64lsn_control.c
800
CALLOUT_UNLOCK(cfg);
sys/netpfil/ipfw/nat64/nat64lsn_control.c
836
struct nat64lsn_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
838
cfg = i0->cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
839
i0->cfg = i1->cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
840
i1->cfg = cfg;
sys/netpfil/ipfw/nat64/nat64lsn_control.c
870
if ((i0->cfg->base.flags & NAT64LSN_ALLOW_SWAPCONF) &&
sys/netpfil/ipfw/nat64/nat64lsn_control.c
873
if (nat64lsn_cmp_configs(i0->cfg, i1->cfg) == 0) {
sys/netpfil/ipfw/nat64/nat64lsn_control.c
911
nat64lsn_destroy_config(i->cfg);
sys/netpfil/ipfw/nat64/nat64stl.c
101
saddr = cfg->base.plat_prefix;
sys/netpfil/ipfw/nat64/nat64stl.c
102
nat64_embed_ip4(&saddr, cfg->base.plat_plen, ip->ip_src.s_addr);
sys/netpfil/ipfw/nat64/nat64stl.c
103
if (cfg->base.flags & NAT64_LOG) {
sys/netpfil/ipfw/nat64/nat64stl.c
105
nat64stl_log(logdata, m, AF_INET, cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64stl.c
108
return (nat64_do_handle_ip4(m, &saddr, &daddr, 0, &cfg->base,
sys/netpfil/ipfw/nat64/nat64stl.c
113
nat64stl_handle_ip6(struct ip_fw_chain *chain, struct nat64stl_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64stl.c
121
if (nat64_check_private_ip4(&cfg->base, aaddr) != 0) {
sys/netpfil/ipfw/nat64/nat64stl.c
122
NAT64STAT_INC(&cfg->base.stats, dropped);
sys/netpfil/ipfw/nat64/nat64stl.c
132
if (memcmp(&ip6->ip6_dst, &cfg->base.plat_prefix,
sys/netpfil/ipfw/nat64/nat64stl.c
133
cfg->base.plat_plen / 8) != 0)
sys/netpfil/ipfw/nat64/nat64stl.c
136
if (cfg->base.flags & NAT64_LOG) {
sys/netpfil/ipfw/nat64/nat64stl.c
138
nat64stl_log(logdata, m, AF_INET6, cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64stl.c
141
return (nat64_do_handle_ip6(m, aaddr, 0, &cfg->base, logdata));
sys/netpfil/ipfw/nat64/nat64stl.c
145
nat64stl_handle_icmp6(struct ip_fw_chain *chain, struct nat64stl_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64stl.c
156
stats = &cfg->base.stats;
sys/netpfil/ipfw/nat64/nat64stl.c
189
if (ipfw_lookup_table(chain, cfg->map64,
sys/netpfil/ipfw/nat64/nat64stl.c
194
if (cfg->base.flags & NAT64_LOG) {
sys/netpfil/ipfw/nat64/nat64stl.c
196
nat64stl_log(logdata, m, AF_INET6, cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64stl.c
200
htonl(TARG_VAL(chain, tablearg, nh4)), 0, &cfg->base, logdata));
sys/netpfil/ipfw/nat64/nat64stl.c
207
struct nat64stl_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64stl.c
220
(cfg = NAT64_LOOKUP(chain, icmd)) == NULL)
sys/netpfil/ipfw/nat64/nat64stl.c
226
ret = ipfw_lookup_table(chain, cfg->map46, sizeof(in_addr_t),
sys/netpfil/ipfw/nat64/nat64stl.c
230
ret = ipfw_lookup_table(chain, cfg->map64,
sys/netpfil/ipfw/nat64/nat64stl.c
245
ret = nat64stl_handle_icmp6(chain, cfg, args->m);
sys/netpfil/ipfw/nat64/nat64stl.c
248
ret = nat64stl_handle_ip4(chain, cfg, args->m,
sys/netpfil/ipfw/nat64/nat64stl.c
251
ret = nat64stl_handle_ip6(chain, cfg, args->m,
sys/netpfil/ipfw/nat64/nat64stl.c
83
nat64stl_handle_ip4(struct ip_fw_chain *chain, struct nat64stl_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64stl.c
93
nat64_check_private_ip4(&cfg->base, ip->ip_src.s_addr) != 0 ||
sys/netpfil/ipfw/nat64/nat64stl.c
94
nat64_check_private_ip4(&cfg->base, ip->ip_dst.s_addr) != 0)
sys/netpfil/ipfw/nat64/nat64stl_control.c
100
uc->prefix6 = cfg->base.plat_prefix;
sys/netpfil/ipfw/nat64/nat64stl_control.c
101
uc->plen6 = cfg->base.plat_plen;
sys/netpfil/ipfw/nat64/nat64stl_control.c
102
uc->flags = cfg->base.flags & NAT64STL_FLAGSMASK;
sys/netpfil/ipfw/nat64/nat64stl_control.c
103
uc->set = cfg->no.set;
sys/netpfil/ipfw/nat64/nat64stl_control.c
104
strlcpy(uc->name, cfg->no.name, sizeof(uc->name));
sys/netpfil/ipfw/nat64/nat64stl_control.c
106
no = ipfw_objhash_lookup_table_kidx(ch, cfg->map64);
sys/netpfil/ipfw/nat64/nat64stl_control.c
108
no = ipfw_objhash_lookup_table_kidx(ch, cfg->map46);
sys/netpfil/ipfw/nat64/nat64stl_control.c
132
struct nat64stl_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64stl_control.c
134
cfg = (struct nat64stl_cfg *)ipfw_objhash_lookup_name_type(ni, set,
sys/netpfil/ipfw/nat64/nat64stl_control.c
137
return (cfg);
sys/netpfil/ipfw/nat64/nat64stl_control.c
141
nat64stl_create_internal(struct ip_fw_chain *ch, struct nat64stl_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64stl_control.c
147
if (ipfw_objhash_alloc_idx(CHAIN_TO_SRV(ch), &cfg->no.kidx) != 0)
sys/netpfil/ipfw/nat64/nat64stl_control.c
149
cfg->base.flags |= NAT64STL_KIDX;
sys/netpfil/ipfw/nat64/nat64stl_control.c
151
if (ipfw_ref_table(ch, &i->ntlv4, &cfg->map46) != 0)
sys/netpfil/ipfw/nat64/nat64stl_control.c
153
cfg->base.flags |= NAT64STL_46T;
sys/netpfil/ipfw/nat64/nat64stl_control.c
155
if (ipfw_ref_table(ch, &i->ntlv6, &cfg->map64) != 0)
sys/netpfil/ipfw/nat64/nat64stl_control.c
157
cfg->base.flags |= NAT64STL_64T;
sys/netpfil/ipfw/nat64/nat64stl_control.c
159
ipfw_objhash_add(CHAIN_TO_SRV(ch), &cfg->no);
sys/netpfil/ipfw/nat64/nat64stl_control.c
178
struct nat64stl_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64stl_control.c
205
cfg = nat64stl_alloc_config(uc->name, uc->set);
sys/netpfil/ipfw/nat64/nat64stl_control.c
206
cfg->base.plat_prefix = uc->prefix6;
sys/netpfil/ipfw/nat64/nat64stl_control.c
207
cfg->base.plat_plen = uc->plen6;
sys/netpfil/ipfw/nat64/nat64stl_control.c
208
cfg->base.flags = (uc->flags & NAT64STL_FLAGSMASK) | NAT64_PLATPFX;
sys/netpfil/ipfw/nat64/nat64stl_control.c
209
if (IN6_IS_ADDR_WKPFX(&cfg->base.plat_prefix))
sys/netpfil/ipfw/nat64/nat64stl_control.c
210
cfg->base.flags |= NAT64_WKPFX;
sys/netpfil/ipfw/nat64/nat64stl_control.c
216
nat64stl_free_config(cfg);
sys/netpfil/ipfw/nat64/nat64stl_control.c
219
error = nat64stl_create_internal(ch, cfg, uc);
sys/netpfil/ipfw/nat64/nat64stl_control.c
222
SRV_OBJECT(ch, cfg->no.kidx) = cfg;
sys/netpfil/ipfw/nat64/nat64stl_control.c
227
if (cfg->base.flags & NAT64STL_KIDX)
sys/netpfil/ipfw/nat64/nat64stl_control.c
228
ipfw_objhash_free_idx(ni, cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64stl_control.c
229
if (cfg->base.flags & NAT64STL_46T)
sys/netpfil/ipfw/nat64/nat64stl_control.c
230
ipfw_unref_table(ch, cfg->map46);
sys/netpfil/ipfw/nat64/nat64stl_control.c
231
if (cfg->base.flags & NAT64STL_64T)
sys/netpfil/ipfw/nat64/nat64stl_control.c
232
ipfw_unref_table(ch, cfg->map64);
sys/netpfil/ipfw/nat64/nat64stl_control.c
235
nat64stl_free_config(cfg);
sys/netpfil/ipfw/nat64/nat64stl_control.c
253
struct nat64stl_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64stl_control.c
270
cfg = nat64stl_find(ni, oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nat64/nat64stl_control.c
271
if (cfg == NULL) {
sys/netpfil/ipfw/nat64/nat64stl_control.c
275
nat64stl_export_config(ch, cfg, uc);
sys/netpfil/ipfw/nat64/nat64stl_control.c
281
cfg = nat64stl_find(ni, oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nat64/nat64stl_control.c
282
if (cfg == NULL) {
sys/netpfil/ipfw/nat64/nat64stl_control.c
291
cfg->base.flags &= ~NAT64STL_FLAGSMASK;
sys/netpfil/ipfw/nat64/nat64stl_control.c
292
cfg->base.flags |= uc->flags & NAT64STL_FLAGSMASK;
sys/netpfil/ipfw/nat64/nat64stl_control.c
299
nat64stl_detach_config(struct ip_fw_chain *ch, struct nat64stl_cfg *cfg)
sys/netpfil/ipfw/nat64/nat64stl_control.c
304
ipfw_objhash_del(CHAIN_TO_SRV(ch), &cfg->no);
sys/netpfil/ipfw/nat64/nat64stl_control.c
305
ipfw_objhash_free_idx(CHAIN_TO_SRV(ch), cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64stl_control.c
306
ipfw_unref_table(ch, cfg->map46);
sys/netpfil/ipfw/nat64/nat64stl_control.c
307
ipfw_unref_table(ch, cfg->map64);
sys/netpfil/ipfw/nat64/nat64stl_control.c
322
struct nat64stl_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64stl_control.c
332
cfg = nat64stl_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nat64/nat64stl_control.c
333
if (cfg == NULL) {
sys/netpfil/ipfw/nat64/nat64stl_control.c
337
if (cfg->no.refcnt > 0) {
sys/netpfil/ipfw/nat64/nat64stl_control.c
342
ipfw_reset_eaction_instance(ch, V_nat64stl_eid, cfg->no.kidx);
sys/netpfil/ipfw/nat64/nat64stl_control.c
343
SRV_OBJECT(ch, cfg->no.kidx) = NULL;
sys/netpfil/ipfw/nat64/nat64stl_control.c
344
nat64stl_detach_config(ch, cfg);
sys/netpfil/ipfw/nat64/nat64stl_control.c
347
nat64stl_free_config(cfg);
sys/netpfil/ipfw/nat64/nat64stl_control.c
395
export_stats(struct ip_fw_chain *ch, struct nat64stl_cfg *cfg,
sys/netpfil/ipfw/nat64/nat64stl_control.c
399
__COPY_STAT_FIELD(cfg, stats, opcnt64);
sys/netpfil/ipfw/nat64/nat64stl_control.c
400
__COPY_STAT_FIELD(cfg, stats, opcnt46);
sys/netpfil/ipfw/nat64/nat64stl_control.c
401
__COPY_STAT_FIELD(cfg, stats, ofrags);
sys/netpfil/ipfw/nat64/nat64stl_control.c
402
__COPY_STAT_FIELD(cfg, stats, ifrags);
sys/netpfil/ipfw/nat64/nat64stl_control.c
403
__COPY_STAT_FIELD(cfg, stats, oerrors);
sys/netpfil/ipfw/nat64/nat64stl_control.c
404
__COPY_STAT_FIELD(cfg, stats, noroute4);
sys/netpfil/ipfw/nat64/nat64stl_control.c
405
__COPY_STAT_FIELD(cfg, stats, noroute6);
sys/netpfil/ipfw/nat64/nat64stl_control.c
406
__COPY_STAT_FIELD(cfg, stats, noproto);
sys/netpfil/ipfw/nat64/nat64stl_control.c
407
__COPY_STAT_FIELD(cfg, stats, nomem);
sys/netpfil/ipfw/nat64/nat64stl_control.c
408
__COPY_STAT_FIELD(cfg, stats, dropped);
sys/netpfil/ipfw/nat64/nat64stl_control.c
424
struct nat64stl_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64stl_control.c
440
cfg = nat64stl_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nat64/nat64stl_control.c
441
if (cfg == NULL) {
sys/netpfil/ipfw/nat64/nat64stl_control.c
445
export_stats(ch, cfg, &stats);
sys/netpfil/ipfw/nat64/nat64stl_control.c
470
struct nat64stl_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64stl_control.c
481
cfg = nat64stl_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nat64/nat64stl_control.c
482
if (cfg == NULL) {
sys/netpfil/ipfw/nat64/nat64stl_control.c
486
COUNTER_ARRAY_ZERO(cfg->base.stats.cnt, NAT64STATS);
sys/netpfil/ipfw/nat64/nat64stl_control.c
514
struct nat64stl_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64stl_control.c
518
cfg = (struct nat64stl_cfg *)SRV_OBJECT(ch, no->kidx);
sys/netpfil/ipfw/nat64/nat64stl_control.c
520
nat64stl_detach_config(ch, cfg);
sys/netpfil/ipfw/nat64/nat64stl_control.c
521
nat64stl_free_config(cfg);
sys/netpfil/ipfw/nat64/nat64stl_control.c
68
static void nat64stl_free_config(struct nat64stl_cfg *cfg);
sys/netpfil/ipfw/nat64/nat64stl_control.c
75
struct nat64stl_cfg *cfg;
sys/netpfil/ipfw/nat64/nat64stl_control.c
77
cfg = malloc(sizeof(struct nat64stl_cfg), M_IPFW, M_WAITOK | M_ZERO);
sys/netpfil/ipfw/nat64/nat64stl_control.c
78
COUNTER_ARRAY_ALLOC(cfg->base.stats.cnt, NAT64STATS, M_WAITOK);
sys/netpfil/ipfw/nat64/nat64stl_control.c
79
cfg->no.name = cfg->name;
sys/netpfil/ipfw/nat64/nat64stl_control.c
80
cfg->no.etlv = IPFW_TLV_NAT64STL_NAME;
sys/netpfil/ipfw/nat64/nat64stl_control.c
81
cfg->no.set = set;
sys/netpfil/ipfw/nat64/nat64stl_control.c
82
strlcpy(cfg->name, name, sizeof(cfg->name));
sys/netpfil/ipfw/nat64/nat64stl_control.c
83
return (cfg);
sys/netpfil/ipfw/nat64/nat64stl_control.c
87
nat64stl_free_config(struct nat64stl_cfg *cfg)
sys/netpfil/ipfw/nat64/nat64stl_control.c
90
COUNTER_ARRAY_FREE(cfg->base.stats.cnt, NAT64STATS);
sys/netpfil/ipfw/nat64/nat64stl_control.c
91
free(cfg, M_IPFW);
sys/netpfil/ipfw/nat64/nat64stl_control.c
95
nat64stl_export_config(struct ip_fw_chain *ch, struct nat64stl_cfg *cfg,
sys/netpfil/ipfw/nptv6/nptv6.c
1001
ipfw_objhash_del(ni, &cfg->no);
sys/netpfil/ipfw/nptv6/nptv6.c
1002
ipfw_objhash_free_idx(ni, cfg->no.kidx);
sys/netpfil/ipfw/nptv6/nptv6.c
1003
nptv6_free_config(cfg);
sys/netpfil/ipfw/nptv6/nptv6.c
111
nptv6_getlasthdr(struct nptv6_cfg *cfg, struct mbuf *m, int *offset)
sys/netpfil/ipfw/nptv6/nptv6.c
137
nptv6_translate_icmpv6(struct nptv6_cfg *cfg, struct mbuf **mp, int offset)
sys/netpfil/ipfw/nptv6/nptv6.c
179
&cfg->external, &cfg->mask))
sys/netpfil/ipfw/nptv6/nptv6.c
180
return (nptv6_rewrite_external(cfg, mp, offset));
sys/netpfil/ipfw/nptv6/nptv6.c
182
&cfg->internal, &cfg->mask))
sys/netpfil/ipfw/nptv6/nptv6.c
183
return (nptv6_rewrite_internal(cfg, mp, offset));
sys/netpfil/ipfw/nptv6/nptv6.c
192
nptv6_search_index(struct nptv6_cfg *cfg, struct in6_addr *a)
sys/netpfil/ipfw/nptv6/nptv6.c
196
if (cfg->flags & NPTV6_48PLEN)
sys/netpfil/ipfw/nptv6/nptv6.c
228
nptv6_rewrite_internal(struct nptv6_cfg *cfg, struct mbuf **mp, int offset)
sys/netpfil/ipfw/nptv6/nptv6.c
251
idx = nptv6_search_index(cfg, addr);
sys/netpfil/ipfw/nptv6/nptv6.c
266
nptv6_copy_addr(&cfg->external, addr, &cfg->mask);
sys/netpfil/ipfw/nptv6/nptv6.c
267
adj = cksum_add(adj, cfg->adjustment);
sys/netpfil/ipfw/nptv6/nptv6.c
276
proto = nptv6_getlasthdr(cfg, *mp, &offset);
sys/netpfil/ipfw/nptv6/nptv6.c
278
nptv6_translate_icmpv6(cfg, mp, offset) != 0))
sys/netpfil/ipfw/nptv6/nptv6.c
280
NPTV6STAT_INC(cfg, in2ex);
sys/netpfil/ipfw/nptv6/nptv6.c
286
nptv6_rewrite_external(struct nptv6_cfg *cfg, struct mbuf **mp, int offset)
sys/netpfil/ipfw/nptv6/nptv6.c
309
idx = nptv6_search_index(cfg, addr);
sys/netpfil/ipfw/nptv6/nptv6.c
324
nptv6_copy_addr(&cfg->internal, addr, &cfg->mask);
sys/netpfil/ipfw/nptv6/nptv6.c
325
adj = cksum_add(adj, ~cfg->adjustment);
sys/netpfil/ipfw/nptv6/nptv6.c
334
proto = nptv6_getlasthdr(cfg, *mp, &offset);
sys/netpfil/ipfw/nptv6/nptv6.c
336
nptv6_translate_icmpv6(cfg, mp, offset) != 0))
sys/netpfil/ipfw/nptv6/nptv6.c
338
NPTV6STAT_INC(cfg, ex2in);
sys/netpfil/ipfw/nptv6/nptv6.c
351
struct nptv6_cfg *cfg;
sys/netpfil/ipfw/nptv6/nptv6.c
361
(cfg = NPTV6_LOOKUP(chain, icmd)) == NULL ||
sys/netpfil/ipfw/nptv6/nptv6.c
362
(cfg->flags & NPTV6_READY) == 0)
sys/netpfil/ipfw/nptv6/nptv6.c
382
&cfg->internal, &cfg->mask)) {
sys/netpfil/ipfw/nptv6/nptv6.c
388
&cfg->internal, &cfg->mask))
sys/netpfil/ipfw/nptv6/nptv6.c
390
ret = nptv6_rewrite_internal(cfg, &args->m, 0);
sys/netpfil/ipfw/nptv6/nptv6.c
392
&cfg->external, &cfg->mask))
sys/netpfil/ipfw/nptv6/nptv6.c
393
ret = nptv6_rewrite_external(cfg, &args->m, 0);
sys/netpfil/ipfw/nptv6/nptv6.c
404
NPTV6STAT_INC(cfg, dropped);
sys/netpfil/ipfw/nptv6/nptv6.c
422
struct nptv6_cfg *cfg;
sys/netpfil/ipfw/nptv6/nptv6.c
424
cfg = malloc(sizeof(struct nptv6_cfg), M_IPFW, M_WAITOK | M_ZERO);
sys/netpfil/ipfw/nptv6/nptv6.c
425
COUNTER_ARRAY_ALLOC(cfg->stats, NPTV6STATS, M_WAITOK);
sys/netpfil/ipfw/nptv6/nptv6.c
426
cfg->no.name = cfg->name;
sys/netpfil/ipfw/nptv6/nptv6.c
427
cfg->no.etlv = IPFW_TLV_NPTV6_NAME;
sys/netpfil/ipfw/nptv6/nptv6.c
428
cfg->no.set = set;
sys/netpfil/ipfw/nptv6/nptv6.c
429
strlcpy(cfg->name, name, sizeof(cfg->name));
sys/netpfil/ipfw/nptv6/nptv6.c
430
return (cfg);
sys/netpfil/ipfw/nptv6/nptv6.c
434
nptv6_free_config(struct nptv6_cfg *cfg)
sys/netpfil/ipfw/nptv6/nptv6.c
437
COUNTER_ARRAY_FREE(cfg->stats, NPTV6STATS);
sys/netpfil/ipfw/nptv6/nptv6.c
438
free(cfg, M_IPFW);
sys/netpfil/ipfw/nptv6/nptv6.c
442
nptv6_export_config(struct ip_fw_chain *ch, struct nptv6_cfg *cfg,
sys/netpfil/ipfw/nptv6/nptv6.c
446
uc->internal = cfg->internal;
sys/netpfil/ipfw/nptv6/nptv6.c
447
if (cfg->flags & NPTV6_DYNAMIC_PREFIX)
sys/netpfil/ipfw/nptv6/nptv6.c
448
memcpy(uc->if_name, cfg->if_name, IF_NAMESIZE);
sys/netpfil/ipfw/nptv6/nptv6.c
450
uc->external = cfg->external;
sys/netpfil/ipfw/nptv6/nptv6.c
451
uc->plen = cfg->plen;
sys/netpfil/ipfw/nptv6/nptv6.c
452
uc->flags = cfg->flags & NPTV6_FLAGSMASK;
sys/netpfil/ipfw/nptv6/nptv6.c
453
uc->set = cfg->no.set;
sys/netpfil/ipfw/nptv6/nptv6.c
454
strlcpy(uc->name, cfg->no.name, sizeof(uc->name));
sys/netpfil/ipfw/nptv6/nptv6.c
477
struct nptv6_cfg *cfg;
sys/netpfil/ipfw/nptv6/nptv6.c
479
cfg = (struct nptv6_cfg *)ipfw_objhash_lookup_name_type(ni, set,
sys/netpfil/ipfw/nptv6/nptv6.c
482
return (cfg);
sys/netpfil/ipfw/nptv6/nptv6.c
486
nptv6_calculate_adjustment(struct nptv6_cfg *cfg)
sys/netpfil/ipfw/nptv6/nptv6.c
492
for (i = 0, p = (uint16_t *)&cfg->internal;
sys/netpfil/ipfw/nptv6/nptv6.c
493
p < (uint16_t *)(&cfg->internal + 1); p++)
sys/netpfil/ipfw/nptv6/nptv6.c
497
for (e = 0, p = (uint16_t *)&cfg->external;
sys/netpfil/ipfw/nptv6/nptv6.c
498
p < (uint16_t *)(&cfg->external + 1); p++)
sys/netpfil/ipfw/nptv6/nptv6.c
502
cfg->adjustment = cksum_add(~e, i);
sys/netpfil/ipfw/nptv6/nptv6.c
518
nptv6_set_external(struct nptv6_cfg *cfg, struct in6_addr *addr)
sys/netpfil/ipfw/nptv6/nptv6.c
521
cfg->external = *addr;
sys/netpfil/ipfw/nptv6/nptv6.c
522
IN6_MASK_ADDR(&cfg->external, &cfg->mask);
sys/netpfil/ipfw/nptv6/nptv6.c
523
nptv6_calculate_adjustment(cfg);
sys/netpfil/ipfw/nptv6/nptv6.c
524
cfg->flags |= NPTV6_READY;
sys/netpfil/ipfw/nptv6/nptv6.c
532
nptv6_find_prefix(struct ip_fw_chain *ch, struct nptv6_cfg *cfg,
sys/netpfil/ipfw/nptv6/nptv6.c
539
MPASS(cfg->flags & NPTV6_DYNAMIC_PREFIX);
sys/netpfil/ipfw/nptv6/nptv6.c
543
ifp = ifunit_ref(cfg->if_name);
sys/netpfil/ipfw/nptv6/nptv6.c
554
&cfg->internal, &cfg->mask))
sys/netpfil/ipfw/nptv6/nptv6.c
557
nptv6_set_external(cfg, &ia->ia_addr.sin6_addr);
sys/netpfil/ipfw/nptv6/nptv6.c
576
struct nptv6_cfg *cfg;
sys/netpfil/ipfw/nptv6/nptv6.c
579
cfg = (struct nptv6_cfg *)SRV_OBJECT(ch, no->kidx);
sys/netpfil/ipfw/nptv6/nptv6.c
580
if ((cfg->flags & NPTV6_DYNAMIC_PREFIX) == 0)
sys/netpfil/ipfw/nptv6/nptv6.c
585
if (strncmp(args->ifp->if_xname, cfg->if_name, IF_NAMESIZE))
sys/netpfil/ipfw/nptv6/nptv6.c
588
cfg->flags &= ~NPTV6_READY;
sys/netpfil/ipfw/nptv6/nptv6.c
593
if ((cfg->flags & NPTV6_READY) == 0)
sys/netpfil/ipfw/nptv6/nptv6.c
596
if (!IN6_ARE_MASKED_ADDR_EQUAL(&cfg->external, args->addr,
sys/netpfil/ipfw/nptv6/nptv6.c
597
&cfg->mask))
sys/netpfil/ipfw/nptv6/nptv6.c
600
cfg->flags &= ~NPTV6_READY;
sys/netpfil/ipfw/nptv6/nptv6.c
603
if (cfg->flags & NPTV6_READY)
sys/netpfil/ipfw/nptv6/nptv6.c
607
IN6_ARE_MASKED_ADDR_EQUAL(args->addr, &cfg->internal,
sys/netpfil/ipfw/nptv6/nptv6.c
608
&cfg->mask))
sys/netpfil/ipfw/nptv6/nptv6.c
612
MPASS(!(cfg->flags & NPTV6_READY));
sys/netpfil/ipfw/nptv6/nptv6.c
615
nptv6_find_prefix(ch, cfg, args->ifp);
sys/netpfil/ipfw/nptv6/nptv6.c
655
struct nptv6_cfg *cfg;
sys/netpfil/ipfw/nptv6/nptv6.c
682
cfg = nptv6_alloc_config(uc->name, uc->set);
sys/netpfil/ipfw/nptv6/nptv6.c
683
cfg->plen = uc->plen;
sys/netpfil/ipfw/nptv6/nptv6.c
684
cfg->flags = uc->flags & NPTV6_FLAGSMASK;
sys/netpfil/ipfw/nptv6/nptv6.c
685
if (cfg->plen <= 48)
sys/netpfil/ipfw/nptv6/nptv6.c
686
cfg->flags |= NPTV6_48PLEN;
sys/netpfil/ipfw/nptv6/nptv6.c
687
cfg->mask = mask;
sys/netpfil/ipfw/nptv6/nptv6.c
688
cfg->internal = uc->internal;
sys/netpfil/ipfw/nptv6/nptv6.c
689
IN6_MASK_ADDR(&cfg->internal, &mask);
sys/netpfil/ipfw/nptv6/nptv6.c
690
if (cfg->flags & NPTV6_DYNAMIC_PREFIX)
sys/netpfil/ipfw/nptv6/nptv6.c
691
memcpy(cfg->if_name, uc->if_name, IF_NAMESIZE);
sys/netpfil/ipfw/nptv6/nptv6.c
693
nptv6_set_external(cfg, &uc->external);
sys/netpfil/ipfw/nptv6/nptv6.c
70
static void nptv6_free_config(struct nptv6_cfg *cfg);
sys/netpfil/ipfw/nptv6/nptv6.c
702
if (ipfw_objhash_alloc_idx(ni, &cfg->no.kidx) != 0) {
sys/netpfil/ipfw/nptv6/nptv6.c
704
nptv6_free_config(cfg);
sys/netpfil/ipfw/nptv6/nptv6.c
707
ipfw_objhash_add(ni, &cfg->no);
sys/netpfil/ipfw/nptv6/nptv6.c
708
SRV_OBJECT(ch, cfg->no.kidx) = cfg;
sys/netpfil/ipfw/nptv6/nptv6.c
709
if (cfg->flags & NPTV6_DYNAMIC_PREFIX)
sys/netpfil/ipfw/nptv6/nptv6.c
710
nptv6_find_prefix(ch, cfg, NULL);
sys/netpfil/ipfw/nptv6/nptv6.c
728
struct nptv6_cfg *cfg;
sys/netpfil/ipfw/nptv6/nptv6.c
73
static int nptv6_rewrite_internal(struct nptv6_cfg *cfg, struct mbuf **mp,
sys/netpfil/ipfw/nptv6/nptv6.c
738
cfg = nptv6_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nptv6/nptv6.c
739
if (cfg == NULL) {
sys/netpfil/ipfw/nptv6/nptv6.c
743
if (cfg->no.refcnt > 0) {
sys/netpfil/ipfw/nptv6/nptv6.c
748
ipfw_reset_eaction_instance(ch, V_nptv6_eid, cfg->no.kidx);
sys/netpfil/ipfw/nptv6/nptv6.c
749
SRV_OBJECT(ch, cfg->no.kidx) = NULL;
sys/netpfil/ipfw/nptv6/nptv6.c
75
static int nptv6_rewrite_external(struct nptv6_cfg *cfg, struct mbuf **mp,
sys/netpfil/ipfw/nptv6/nptv6.c
750
ipfw_objhash_del(CHAIN_TO_SRV(ch), &cfg->no);
sys/netpfil/ipfw/nptv6/nptv6.c
751
ipfw_objhash_free_idx(CHAIN_TO_SRV(ch), cfg->no.kidx);
sys/netpfil/ipfw/nptv6/nptv6.c
754
nptv6_free_config(cfg);
sys/netpfil/ipfw/nptv6/nptv6.c
814
export_stats(struct ip_fw_chain *ch, struct nptv6_cfg *cfg,
sys/netpfil/ipfw/nptv6/nptv6.c
818
__COPY_STAT_FIELD(cfg, stats, in2ex);
sys/netpfil/ipfw/nptv6/nptv6.c
819
__COPY_STAT_FIELD(cfg, stats, ex2in);
sys/netpfil/ipfw/nptv6/nptv6.c
820
__COPY_STAT_FIELD(cfg, stats, dropped);
sys/netpfil/ipfw/nptv6/nptv6.c
836
struct nptv6_cfg *cfg;
sys/netpfil/ipfw/nptv6/nptv6.c
855
cfg = nptv6_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nptv6/nptv6.c
856
if (cfg == NULL) {
sys/netpfil/ipfw/nptv6/nptv6.c
860
export_stats(ch, cfg, &stats);
sys/netpfil/ipfw/nptv6/nptv6.c
885
struct nptv6_cfg *cfg;
sys/netpfil/ipfw/nptv6/nptv6.c
896
cfg = nptv6_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set);
sys/netpfil/ipfw/nptv6/nptv6.c
897
if (cfg == NULL) {
sys/netpfil/ipfw/nptv6/nptv6.c
901
COUNTER_ARRAY_ZERO(cfg->stats, NPTV6STATS);
sys/netpfil/ipfw/nptv6/nptv6.c
993
struct nptv6_cfg *cfg;
sys/netpfil/ipfw/nptv6/nptv6.c
999
cfg = (struct nptv6_cfg *)SRV_OBJECT(ch, no->kidx);
sys/powerpc/ofw/ofw_pcibus.c
220
if (dinfo->opd_dinfo.cfg.intpin == 0)
sys/powerpc/ofw/ofw_pcibus.c
277
if (dinfo->opd_dinfo.cfg.intline == 0) {
sys/powerpc/ofw/ofw_pcibus.c
278
dinfo->opd_dinfo.cfg.intline = PCI_INVALID_IRQ;
sys/powerpc/powermac/cpcht.c
489
ht = &dinfo->cfg.ht;
sys/powerpc/powernv/opal_pci.c
674
if (dinfo->cfg.msi.msi_alloc > 0 &&
sys/powerpc/powernv/opal_pci.c
675
(dinfo->cfg.msi.msi_ctrl & PCIM_MSICTRL_64BIT) == 0) {
sys/riscv/sifive/fe310_aon.c
183
uint32_t cfg;
sys/riscv/sifive/fe310_aon.c
205
cfg = FEAON_READ_4(sc, FEAON_RTC_CFG) & ~FEAON_RTC_CFG_SCALE_MASK;
sys/riscv/sifive/fe310_aon.c
206
cfg |= scale;
sys/riscv/sifive/fe310_aon.c
208
FEAON_WRITE_4(sc, FEAON_RTC_CFG, cfg);
sys/riscv/sifive/sifive_prci.c
448
struct prci_config *cfg;
sys/riscv/sifive/sifive_prci.c
456
cfg = (struct prci_config *)ofw_bus_search_compatible(dev,
sys/riscv/sifive/sifive_prci.c
501
for (pll_clk = cfg->pll_clks; pll_clk->name; pll_clk++) {
sys/riscv/sifive/sifive_prci.c
507
if (cfg->div_clks != NULL) {
sys/riscv/sifive/sifive_prci.c
509
for (div_clk = cfg->div_clks; div_clk->name; div_clk++) {
sys/riscv/sifive/sifive_prci.c
519
if (cfg->gate_clks != NULL) {
sys/riscv/sifive/sifive_prci.c
521
for (gate_clk = cfg->gate_clks; gate_clk->name; gate_clk++) {
sys/riscv/sifive/sifive_prci.c
550
clknode_fixed_register(sc->clkdom, cfg->tlclk_def);
sys/riscv/sifive/sifive_prci.c
556
sc->nresets = cfg->nresets;
tools/test/gpioevents/gpioevents.c
563
struct gpio_event_config cfg =
tools/test/gpioevents/gpioevents.c
566
res = ioctl(handle, GPIOCONFIGEVENTS, &cfg);
tools/tools/netmap/nmreplay.c
1400
- the *_run() function takes struct _q *q and struct _cfg *cfg as arguments.
tools/tools/netmap/nmreplay.c
729
null_run_fn(struct _qs *q, struct _cfg *cfg)
tools/tools/netmap/nmreplay.c
732
(void)cfg;
tools/tools/usbtest/usb_control_ep_test.c
103
for (cfg = 0; cfg != 255; cfg++) {
tools/tools/usbtest/usb_control_ep_test.c
108
req.wValue = 0x0200 | cfg; /* config descriptor */
tools/tools/usbtest/usb_control_ep_test.c
112
printf("Test #%d.1/3 ...\n", cfg);
tools/tools/usbtest/usb_control_ep_test.c
119
printf("Last configuration index is: %d\n", cfg - 1);
tools/tools/usbtest/usb_control_ep_test.c
123
printf("Test #%d.2/3 ...\n", cfg);
tools/tools/usbtest/usb_control_ep_test.c
139
printf("Test #%d.3/3 ...\n", cfg);
tools/tools/usbtest/usb_control_ep_test.c
86
int cfg;
usr.bin/diff/diffreg_new.c
159
const struct diff_config *cfg;
usr.bin/diff/diffreg_new.c
169
cfg = &diff_config_myers_then_myers_divide;
usr.bin/diff/diffreg_new.c
172
cfg = &diff_config_myers_then_patience;
usr.bin/diff/diffreg_new.c
175
cfg = &diff_config_patience;
usr.bin/diff/diffreg_new.c
178
cfg = &diff_config_none;
usr.bin/diff/diffreg_new.c
224
ret = diff_atomize_file(&left, cfg, f1, (uint8_t *)str1, st1.st_size,
usr.bin/diff/diffreg_new.c
232
ret = diff_atomize_file(&right, cfg, f2, (uint8_t *)str2, st2.st_size,
usr.bin/diff/diffreg_new.c
241
result = diff_main(cfg, &left, &right);
usr.sbin/bhyve/slirp/libslirp.h
227
Slirp *slirp_new(const SlirpConfig *cfg, const SlirpCb *callbacks,
usr.sbin/bluetooth/rtlbtfw/main.c
174
struct libusb_config_descriptor *cfg;
usr.sbin/bluetooth/rtlbtfw/main.c
179
r = libusb_get_active_config_descriptor(dev, &cfg);
usr.sbin/bluetooth/rtlbtfw/main.c
186
if (cfg->bNumInterfaces != 0) {
usr.sbin/bluetooth/rtlbtfw/main.c
188
ifc = &cfg->interface[0];
usr.sbin/bluetooth/rtlbtfw/main.c
197
libusb_free_config_descriptor(cfg);
usr.sbin/bluetooth/rtlbtfw/main.c
202
libusb_free_config_descriptor(cfg);
usr.sbin/bluetooth/rtlbtfw/main.c
323
struct rtlbt_firmware fw, cfg;
usr.sbin/bluetooth/rtlbtfw/main.c
483
if (rtlbt_fw_read(&cfg, config_path) <= 0) {
usr.sbin/bluetooth/rtlbtfw/main.c
488
r = rtlbt_append_fwfile(&fw, &cfg);
usr.sbin/bluetooth/rtlbtfw/main.c
489
rtlbt_fw_free(&cfg);
usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
203
struct hastd_config *cfg;
usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
208
cfg = yy_config_parse(cfgpath, true);
usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
209
if (cfg == NULL)
usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
213
if (proto_client(NULL, cfg->hc_controladdr, &conn) == -1) {
usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
215
cfg->hc_controladdr);
usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
221
cfg->hc_controladdr);
usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
228
cfg->hc_controladdr);
usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
235
cfg->hc_controladdr);
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h
254
int32_t wlan_do_sysctl(struct wlan_config *cfg, enum wlan_syscl which, int set);
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2767
wlan_do_sysctl(struct wlan_config *cfg, enum wlan_syscl which, int set)
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2777
sval = cfg->mesh_retryto;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2780
sval = cfg->mesh_holdingto;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2783
sval = cfg->mesh_confirmto;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2786
sval = cfg->mesh_maxretries;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2789
sval = cfg->hwmp_targetonly;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2792
sval = cfg->hwmp_replyforward;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2795
sval = cfg->hwmp_pathlifetime;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2798
sval = cfg->hwmp_roottimeout;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2801
sval = cfg->hwmp_rootint;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2804
sval = cfg->hwmp_rannint;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2807
sval = cfg->hwmp_inact;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2830
cfg->mesh_retryto = val;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2833
cfg->mesh_holdingto = val;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2836
cfg->mesh_confirmto = val;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2839
cfg->mesh_maxretries = val;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2842
cfg->hwmp_targetonly = val;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2845
cfg->hwmp_replyforward = val;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2848
cfg->hwmp_pathlifetime = val;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2851
cfg->hwmp_roottimeout = val;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2854
cfg->hwmp_rootint = val;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2857
cfg->hwmp_rannint = val;
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
2860
cfg->hwmp_inact = val;
usr.sbin/config/main.cc
461
configfile_dynamic(std::ostringstream &cfg)
usr.sbin/config/main.cc
471
cfg << "options\t" << OPT_AUTOGEN << lend;
usr.sbin/config/main.cc
472
cfg << "ident\t" << ident << lend;
usr.sbin/config/main.cc
473
cfg << "machine\t" << machinename << lend;
usr.sbin/config/main.cc
475
cfg << "cpu\t" << cput->cpu_name << lend;
usr.sbin/config/main.cc
477
cfg << "makeoptions\t" << ol->op_name << '=' <<
usr.sbin/config/main.cc
482
cfg << "options\t" << ol->op_name;
usr.sbin/config/main.cc
484
cfg << '=';
usr.sbin/config/main.cc
487
cfg << '\\' << ol->op_value[i];
usr.sbin/config/main.cc
489
cfg << ol->op_value[i];
usr.sbin/config/main.cc
493
cfg << lend;
usr.sbin/config/main.cc
499
cfg << "device\t" << d->d_name << lend;
usr.sbin/config/main.cc
507
configfile_filebased(std::ostringstream &cfg)
usr.sbin/config/main.cc
526
cfg << "\\n\\\n";
usr.sbin/config/main.cc
528
cfg << '\\' << i;
usr.sbin/config/main.cc
530
cfg << i;
usr.sbin/config/main.cc
540
std::ostringstream cfg;
usr.sbin/config/main.cc
553
configfile_filebased(cfg);
usr.sbin/config/main.cc
555
configfile_dynamic(cfg);
usr.sbin/config/main.cc
558
cfg.flush();
usr.sbin/config/main.cc
569
fprintf(fo, "%s", cfg.str().c_str());
usr.sbin/mlxcontrol/interface.c
208
mlx_read_configuration(int unit, struct mlx_core_cfg *cfg)
usr.sbin/mlxcontrol/interface.c
213
cmd.mu_datasize = sizeof(*cfg);
usr.sbin/mlxcontrol/interface.c
214
cmd.mu_buf = cfg;
usr.sbin/mlxcontrol/mlxcontrol.h
46
extern int mlx_read_configuration(int unit, struct mlx_core_cfg *cfg);
usr.sbin/ppp/async.c
61
memset(async->cfg.EscMap, '\0', sizeof async->cfg.EscMap);
usr.sbin/ppp/async.c
93
if (async->cfg.EscMap[32] && async->cfg.EscMap[c >> 3] & (1 << (c & 7))) {
usr.sbin/ppp/async.h
41
} cfg;
usr.sbin/ppp/auth.c
414
authp->cfg.fsm.timeout = DEF_FSMRETRY;
usr.sbin/ppp/auth.c
415
authp->cfg.fsm.maxreq = DEF_FSMAUTHTRIES;
usr.sbin/ppp/auth.c
416
authp->cfg.fsm.maxtrm = 0; /* not used */
usr.sbin/ppp/auth.c
429
authp->authtimer.load = authp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/auth.c
431
authp->retry = authp->cfg.fsm.maxreq;
usr.sbin/ppp/auth.h
52
} cfg;
usr.sbin/ppp/bundle.c
1076
arg->bundle->cfg.ifqueue);
usr.sbin/ppp/bundle.c
1080
arg->bundle->cfg.label);
usr.sbin/ppp/bundle.c
1082
arg->bundle->cfg.auth.name);
usr.sbin/ppp/bundle.c
1084
if (*server.cfg.sockname != '\0') {
usr.sbin/ppp/bundle.c
1085
prompt_Printf(arg->prompt, "%s", server.cfg.sockname);
usr.sbin/ppp/bundle.c
1086
if (server.cfg.mask != (mode_t)-1)
usr.sbin/ppp/bundle.c
1087
prompt_Printf(arg->prompt, ", mask 0%03o", (int)server.cfg.mask);
usr.sbin/ppp/bundle.c
1089
} else if (server.cfg.port != 0)
usr.sbin/ppp/bundle.c
1090
prompt_Printf(arg->prompt, "TCP port %d%s\n", server.cfg.port,
usr.sbin/ppp/bundle.c
1096
arg->bundle->cfg.choked.timeout);
usr.sbin/ppp/bundle.c
1103
if (arg->bundle->cfg.idle.timeout) {
usr.sbin/ppp/bundle.c
1104
prompt_Printf(arg->prompt, "%us", arg->bundle->cfg.idle.timeout);
usr.sbin/ppp/bundle.c
1105
if (arg->bundle->cfg.idle.min_timeout)
usr.sbin/ppp/bundle.c
1107
arg->bundle->cfg.idle.min_timeout);
usr.sbin/ppp/bundle.c
1172
bundle->phys_type.open && bundle->cfg.idle.timeout) {
usr.sbin/ppp/bundle.c
1176
secs = bundle->cfg.idle.timeout;
usr.sbin/ppp/bundle.c
1179
if (bundle->cfg.idle.min_timeout > secs && bundle->upat) {
usr.sbin/ppp/bundle.c
1182
if (bundle->cfg.idle.min_timeout > up &&
usr.sbin/ppp/bundle.c
1183
bundle->cfg.idle.min_timeout - up > (long long)secs)
usr.sbin/ppp/bundle.c
1185
secs = bundle->cfg.idle.min_timeout - up;
usr.sbin/ppp/bundle.c
1200
bundle->cfg.idle.timeout = timeout;
usr.sbin/ppp/bundle.c
1201
bundle->cfg.idle.min_timeout = min_timeout;
usr.sbin/ppp/bundle.c
1343
strncpy(bundle->cfg.label, label, sizeof bundle->cfg.label - 1);
usr.sbin/ppp/bundle.c
1345
*bundle->cfg.label = '\0';
usr.sbin/ppp/bundle.c
1351
return *bundle->cfg.label ? bundle->cfg.label : NULL;
usr.sbin/ppp/bundle.c
472
ifqueue = nlinks > bundle->cfg.ifqueue ? nlinks : bundle->cfg.ifqueue;
usr.sbin/ppp/bundle.c
485
bundle->choked.timer.load = bundle->cfg.choked.timeout * SECTICKS;
usr.sbin/ppp/bundle.c
825
bundle.cfg.idle.timeout = NCP_IDLE_TIMEOUT;
usr.sbin/ppp/bundle.c
826
bundle.cfg.idle.min_timeout = 0;
usr.sbin/ppp/bundle.c
827
*bundle.cfg.auth.name = '\0';
usr.sbin/ppp/bundle.c
828
*bundle.cfg.auth.key = '\0';
usr.sbin/ppp/bundle.c
829
bundle.cfg.optmask = (1ull << OPT_IDCHECK) | (1ull << OPT_LOOPBACK) |
usr.sbin/ppp/bundle.c
839
*bundle.cfg.label = '\0';
usr.sbin/ppp/bundle.c
840
bundle.cfg.ifqueue = DEF_IFQUEUE;
usr.sbin/ppp/bundle.c
841
bundle.cfg.choked.timeout = CHOKED_TIMEOUT;
usr.sbin/ppp/bundle.h
120
} cfg;
usr.sbin/ppp/bundle.h
59
#define Enabled(b, o) ((b)->cfg.optmask & (1ull << (o)))
usr.sbin/ppp/bundle.h
60
#define opt_enable(b, o) ((b)->cfg.optmask |= (1ull << (o)))
usr.sbin/ppp/bundle.h
61
#define opt_disable(b, o) ((b)->cfg.optmask &= ~(1ull << (o)))
usr.sbin/ppp/cbcp.c
318
cbcp->fsm.delay = cbcp->p->dl->cfg.cbcp.delay;
usr.sbin/ppp/cbcp.c
322
strncpy(cbcp->fsm.phone, cbcp->p->dl->cfg.cbcp.phone,
usr.sbin/ppp/cbcp.c
363
if (cbcp->p->dl->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_NONE))
usr.sbin/ppp/ccp.c
186
if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]))
usr.sbin/ppp/ccp.c
194
" REQ%s, %u Term REQ%s\n", ccp->cfg.fsm.timeout,
usr.sbin/ppp/ccp.c
195
ccp->cfg.fsm.maxreq, ccp->cfg.fsm.maxreq == 1 ? "" : "s",
usr.sbin/ppp/ccp.c
196
ccp->cfg.fsm.maxtrm, ccp->cfg.fsm.maxtrm == 1 ? "" : "s");
usr.sbin/ppp/ccp.c
198
prompt_Printf(arg->prompt, "incoming = %d, ", ccp->cfg.deflate.in.winsize);
usr.sbin/ppp/ccp.c
199
prompt_Printf(arg->prompt, "outgoing = %d\n", ccp->cfg.deflate.out.winsize);
usr.sbin/ppp/ccp.c
202
if (ccp->cfg.mppe.keybits)
usr.sbin/ppp/ccp.c
203
prompt_Printf(arg->prompt, "%d bits, ", ccp->cfg.mppe.keybits);
usr.sbin/ppp/ccp.c
206
switch (ccp->cfg.mppe.state) {
usr.sbin/ppp/ccp.c
218
ccp->cfg.mppe.required ? ", required" : "");
usr.sbin/ppp/ccp.c
222
command_ShowNegval(ccp->cfg.neg[CCP_NEG_DEFLATE]));
usr.sbin/ppp/ccp.c
224
command_ShowNegval(ccp->cfg.neg[CCP_NEG_PRED1]));
usr.sbin/ppp/ccp.c
226
command_ShowNegval(ccp->cfg.neg[CCP_NEG_DEFLATE24]));
usr.sbin/ppp/ccp.c
229
command_ShowNegval(ccp->cfg.neg[CCP_NEG_MPPE]));
usr.sbin/ppp/ccp.c
252
ccp->cfg.deflate.in.winsize = 0;
usr.sbin/ppp/ccp.c
253
ccp->cfg.deflate.out.winsize = 15;
usr.sbin/ppp/ccp.c
254
ccp->cfg.fsm.timeout = DEF_FSMRETRY;
usr.sbin/ppp/ccp.c
255
ccp->cfg.fsm.maxreq = DEF_FSMTRIES;
usr.sbin/ppp/ccp.c
256
ccp->cfg.fsm.maxtrm = DEF_FSMTRIES;
usr.sbin/ppp/ccp.c
257
ccp->cfg.neg[CCP_NEG_DEFLATE] = NEG_ENABLED|NEG_ACCEPTED;
usr.sbin/ppp/ccp.c
258
ccp->cfg.neg[CCP_NEG_PRED1] = NEG_ENABLED|NEG_ACCEPTED;
usr.sbin/ppp/ccp.c
259
ccp->cfg.neg[CCP_NEG_DEFLATE24] = 0;
usr.sbin/ppp/ccp.c
261
ccp->cfg.mppe.keybits = 0;
usr.sbin/ppp/ccp.c
262
ccp->cfg.mppe.state = MPPE_ANYSTATE;
usr.sbin/ppp/ccp.c
263
ccp->cfg.mppe.required = 0;
usr.sbin/ppp/ccp.c
264
ccp->cfg.neg[CCP_NEG_MPPE] = NEG_ENABLED|NEG_ACCEPTED;
usr.sbin/ppp/ccp.c
303
if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]) &&
usr.sbin/ppp/ccp.c
329
fp->FsmTimer.load = ccp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/ccp.c
332
fp->restart = ccp->cfg.fsm.maxreq;
usr.sbin/ppp/ccp.c
335
fp->restart = ccp->cfg.fsm.maxtrm;
usr.sbin/ppp/ccp.c
359
if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]) &&
usr.sbin/ppp/ccp.c
378
(*algorithm[f]->o.OptInit)(fp->bundle, &(*o)->val, &ccp->cfg);
usr.sbin/ppp/ccp.c
439
fp->more.reqs = fp->more.naks = fp->more.rejs = ccp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ccp.c
506
if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]) &&
usr.sbin/ppp/ccp.c
540
if (IsEnabled(ccp->cfg.neg[algorithm[f]->Neg]))
usr.sbin/ppp/ccp.c
556
fp->more.reqs = fp->more.naks = fp->more.rejs = ccp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ccp.c
604
if (IsAccepted(ccp->cfg.neg[algorithm[f]->Neg]) &&
usr.sbin/ppp/ccp.c
608
switch ((*algorithm[f]->i.Set)(fp->bundle, &ccp->in.opt, &ccp->cfg)) {
usr.sbin/ppp/ccp.c
634
if ((*algorithm[f]->o.Set)(fp->bundle, &o->val, &ccp->cfg) ==
usr.sbin/ppp/ccp.c
800
if (IsEnabled(ccp->cfg.neg[f])) {
usr.sbin/ppp/ccp.c
808
if (IsAccepted(ccp->cfg.neg[f]))
usr.sbin/ppp/ccp.h
118
struct ccp_config cfg;
usr.sbin/ppp/chap.c
456
IsAccepted(chap->auth.physical->link.lcp.cfg.chap80lm)) ||
usr.sbin/ppp/chap.c
457
!IsAccepted(chap->auth.physical->link.lcp.cfg.chap80nt));
usr.sbin/ppp/chap.c
493
len = strlen(authp->physical->dl->bundle->cfg.auth.name);
usr.sbin/ppp/chap.c
500
if (*authp->physical->dl->bundle->radius.cfg.file) {
usr.sbin/ppp/chap.c
519
memcpy(cp, authp->physical->dl->bundle->cfg.auth.name, len);
usr.sbin/ppp/chap.c
532
len = strlen(authp->physical->dl->bundle->cfg.auth.name);
usr.sbin/ppp/chap.c
558
if (*bundle->radius.cfg.file && bundle->radius.msrepstr)
usr.sbin/ppp/chap.c
567
if (*bundle->radius.cfg.file && bundle->radius.repstr)
usr.sbin/ppp/chap.c
598
if (*bundle->radius.cfg.file && bundle->radius.errstr)
usr.sbin/ppp/chap.c
758
((chap->NTRespSent && IsAccepted(p->link.lcp.cfg.chap80lm)) ||
usr.sbin/ppp/chap.c
759
!IsAccepted(p->link.lcp.cfg.chap80nt));
usr.sbin/ppp/chap.c
837
if (*bundle->cfg.auth.key == '!' && bundle->cfg.auth.key[1] != '!')
usr.sbin/ppp/chap.c
838
chap_StartChild(chap, bundle->cfg.auth.key + 1,
usr.sbin/ppp/chap.c
839
bundle->cfg.auth.name);
usr.sbin/ppp/chap.c
841
chap_Respond(chap, bundle->cfg.auth.name, bundle->cfg.auth.key +
usr.sbin/ppp/chap.c
842
(*bundle->cfg.auth.key == '!' ? 1 : 0)
usr.sbin/ppp/chap.c
864
if (*bundle->radius.cfg.file) {
usr.sbin/ppp/chap.c
885
lanman && !IsEnabled(p->link.lcp.cfg.chap80lm)) {
usr.sbin/ppp/chap.c
891
!lanman && !IsEnabled(p->link.lcp.cfg.chap80nt)) {
usr.sbin/ppp/chap.c
897
!IsEnabled(p->link.lcp.cfg.chap81)) {
usr.sbin/ppp/chat.c
663
strncpy(result, c->physical->dl->bundle->cfg.auth.key, reslen);
usr.sbin/ppp/chat.c
677
strncpy(result, c->physical->dl->bundle->cfg.auth.name, reslen);
usr.sbin/ppp/command.c
1492
strncpy(server.cfg.passwd, passwd, sizeof server.cfg.passwd - 1);
usr.sbin/ppp/command.c
1493
server.cfg.passwd[sizeof server.cfg.passwd - 1] = '\0';
usr.sbin/ppp/command.c
1552
arg->cx->physical->async.cfg.EscMap[code] = 0;
usr.sbin/ppp/command.c
1557
arg->cx->physical->async.cfg.EscMap[code >> 3] |= (1 << (code & 7));
usr.sbin/ppp/command.c
1558
arg->cx->physical->async.cfg.EscMap[32] = 1;
usr.sbin/ppp/command.c
1574
memset(&ncp->ipcp.cfg.my_range, '\0', sizeof ncp->ipcp.cfg.my_range);
usr.sbin/ppp/command.c
1575
memset(&ncp->ipcp.cfg.peer_range, '\0', sizeof ncp->ipcp.cfg.peer_range);
usr.sbin/ppp/command.c
1576
ncp->ipcp.cfg.HaveTriggerAddress = 0;
usr.sbin/ppp/command.c
1577
ncp->ipcp.cfg.netmask.s_addr = INADDR_ANY;
usr.sbin/ppp/command.c
1578
iplist_reset(&ncp->ipcp.cfg.peer_list);
usr.sbin/ppp/command.c
1581
if (!ncprange_aton(&ncp->ipcp.cfg.my_range, ncp, arg->argv[arg->argn]))
usr.sbin/ppp/command.c
1586
ncp->ipcp.ifmask = ncp->ipcp.cfg.netmask =
usr.sbin/ppp/command.c
1589
ncp->ipcp.cfg.TriggerAddress = GetIpAddr(arg->argv[arg->argn+3]);
usr.sbin/ppp/command.c
1590
ncp->ipcp.cfg.HaveTriggerAddress = 1;
usr.sbin/ppp/command.c
1597
ncprange_getaddr(&ncp->ipcp.cfg.my_range, &ncpaddr);
usr.sbin/ppp/command.c
1600
ncprange_setwidth(&ncp->ipcp.cfg.my_range, 0);
usr.sbin/ppp/command.c
1682
strncpy(arg->bundle->cfg.auth.key, argp,
usr.sbin/ppp/command.c
1683
sizeof arg->bundle->cfg.auth.key - 1);
usr.sbin/ppp/command.c
1684
arg->bundle->cfg.auth.key[sizeof arg->bundle->cfg.auth.key - 1] = '\0';
usr.sbin/ppp/command.c
1695
strncpy(arg->bundle->cfg.auth.name, argp,
usr.sbin/ppp/command.c
1696
sizeof arg->bundle->cfg.auth.name - 1);
usr.sbin/ppp/command.c
1697
arg->bundle->cfg.auth.name[sizeof arg->bundle->cfg.auth.name-1] = '\0';
usr.sbin/ppp/command.c
1736
arg->bundle->ncp.mp.cfg.autoload.min = v1;
usr.sbin/ppp/command.c
1737
arg->bundle->ncp.mp.cfg.autoload.max = v2;
usr.sbin/ppp/command.c
1738
arg->bundle->ncp.mp.cfg.autoload.period = v3;
usr.sbin/ppp/command.c
1747
strncpy(cx->cfg.script.dial, argp, sizeof cx->cfg.script.dial - 1);
usr.sbin/ppp/command.c
1748
cx->cfg.script.dial[sizeof cx->cfg.script.dial - 1] = '\0';
usr.sbin/ppp/command.c
1752
strncpy(cx->cfg.script.login, argp, sizeof cx->cfg.script.login - 1);
usr.sbin/ppp/command.c
1753
cx->cfg.script.login[sizeof cx->cfg.script.login - 1] = '\0';
usr.sbin/ppp/command.c
1758
l->ccp.cfg.deflate.out.winsize = atoi(arg->argv[arg->argn]);
usr.sbin/ppp/command.c
1759
if (l->ccp.cfg.deflate.out.winsize < 8 ||
usr.sbin/ppp/command.c
1760
l->ccp.cfg.deflate.out.winsize > 15) {
usr.sbin/ppp/command.c
1762
l->ccp.cfg.deflate.out.winsize);
usr.sbin/ppp/command.c
1763
l->ccp.cfg.deflate.out.winsize = 15;
usr.sbin/ppp/command.c
1766
l->ccp.cfg.deflate.in.winsize = atoi(arg->argv[arg->argn+1]);
usr.sbin/ppp/command.c
1767
if (l->ccp.cfg.deflate.in.winsize < 8 ||
usr.sbin/ppp/command.c
1768
l->ccp.cfg.deflate.in.winsize > 15) {
usr.sbin/ppp/command.c
1770
l->ccp.cfg.deflate.in.winsize);
usr.sbin/ppp/command.c
1771
l->ccp.cfg.deflate.in.winsize = 15;
usr.sbin/ppp/command.c
1774
l->ccp.cfg.deflate.in.winsize = 0;
usr.sbin/ppp/command.c
1789
l->ccp.cfg.mppe.keybits = 0;
usr.sbin/ppp/command.c
1790
l->ccp.cfg.mppe.state = MPPE_ANYSTATE;
usr.sbin/ppp/command.c
1791
l->ccp.cfg.mppe.required = 0;
usr.sbin/ppp/command.c
1808
l->ccp.cfg.mppe.state = MPPE_ANYSTATE;
usr.sbin/ppp/command.c
1810
l->ccp.cfg.mppe.state = MPPE_STATELESS;
usr.sbin/ppp/command.c
1812
l->ccp.cfg.mppe.state = MPPE_STATEFUL;
usr.sbin/ppp/command.c
1820
l->ccp.cfg.mppe.state = MPPE_ANYSTATE;
usr.sbin/ppp/command.c
1821
l->ccp.cfg.mppe.keybits = long_val;
usr.sbin/ppp/command.c
1822
l->ccp.cfg.mppe.required = 1;
usr.sbin/ppp/command.c
1835
cx->physical->link.lcp.cfg.accmap = (u_int32_t)ulong_val;
usr.sbin/ppp/command.c
1881
arg->bundle->ncp.mp.cfg.mrru = long_val;
usr.sbin/ppp/command.c
1896
change = &l->lcp.cfg.mru;
usr.sbin/ppp/command.c
1897
if (long_val > l->lcp.cfg.max_mru) {
usr.sbin/ppp/command.c
1899
l->lcp.cfg.max_mru);
usr.sbin/ppp/command.c
1910
change = &l->lcp.cfg.max_mru;
usr.sbin/ppp/command.c
1937
if (l->lcp.cfg.mru > *change)
usr.sbin/ppp/command.c
1938
l->lcp.cfg.mru = *change;
usr.sbin/ppp/command.c
1953
change = &l->lcp.cfg.mtu;
usr.sbin/ppp/command.c
1954
if (long_val > l->lcp.cfg.max_mtu) {
usr.sbin/ppp/command.c
1956
l->lcp.cfg.max_mtu);
usr.sbin/ppp/command.c
1967
change = &l->lcp.cfg.max_mtu;
usr.sbin/ppp/command.c
1993
if (l->lcp.cfg.mtu > *change)
usr.sbin/ppp/command.c
1994
l->lcp.cfg.mtu = *change;
usr.sbin/ppp/command.c
1999
cx->physical->link.lcp.cfg.openmode = arg->argc > arg->argn+1 ?
usr.sbin/ppp/command.c
2002
cx->physical->link.lcp.cfg.openmode = OPEN_PASSIVE;
usr.sbin/ppp/command.c
2010
strncpy(cx->cfg.phone.list, argp, sizeof cx->cfg.phone.list - 1);
usr.sbin/ppp/command.c
2011
cx->cfg.phone.list[sizeof cx->cfg.phone.list - 1] = '\0';
usr.sbin/ppp/command.c
2016
strncpy(cx->cfg.script.hangup, argp, sizeof cx->cfg.script.hangup - 1);
usr.sbin/ppp/command.c
2017
cx->cfg.script.hangup[sizeof cx->cfg.script.hangup - 1] = '\0';
usr.sbin/ppp/command.c
2022
arg->bundle->cfg.ifqueue = long_val < 0 ? 0 : long_val;
usr.sbin/ppp/command.c
2026
strncpy(cx->cfg.script.logout, argp, sizeof cx->cfg.script.logout - 1);
usr.sbin/ppp/command.c
2027
cx->cfg.script.logout[sizeof cx->cfg.script.logout - 1] = '\0';
usr.sbin/ppp/command.c
2041
min = arg->bundle->cfg.idle.min_timeout;
usr.sbin/ppp/command.c
2058
if (arg->bundle->radius.alive.interval && !*arg->bundle->radius.cfg.file) {
usr.sbin/ppp/command.c
2078
l->lcp.cfg.lqrperiod = long_val;
usr.sbin/ppp/command.c
2083
&cx->physical->link.lcp.cfg.fsm.timeout,
usr.sbin/ppp/command.c
2084
&cx->physical->link.lcp.cfg.fsm.maxreq,
usr.sbin/ppp/command.c
2085
&cx->physical->link.lcp.cfg.fsm.maxtrm, DEF_FSMTRIES);
usr.sbin/ppp/command.c
2090
&cx->chap.auth.cfg.fsm.timeout,
usr.sbin/ppp/command.c
2091
&cx->chap.auth.cfg.fsm.maxreq, NULL, DEF_FSMAUTHTRIES);
usr.sbin/ppp/command.c
2096
&cx->pap.cfg.fsm.timeout, &cx->pap.cfg.fsm.maxreq,
usr.sbin/ppp/command.c
2102
&l->ccp.cfg.fsm.timeout, &l->ccp.cfg.fsm.maxreq,
usr.sbin/ppp/command.c
2103
&l->ccp.cfg.fsm.maxtrm, DEF_FSMTRIES);
usr.sbin/ppp/command.c
2108
&arg->bundle->ncp.ipcp.cfg.fsm.timeout,
usr.sbin/ppp/command.c
2109
&arg->bundle->ncp.ipcp.cfg.fsm.maxreq,
usr.sbin/ppp/command.c
2110
&arg->bundle->ncp.ipcp.cfg.fsm.maxtrm, DEF_FSMTRIES);
usr.sbin/ppp/command.c
2116
&arg->bundle->ncp.ipv6cp.cfg.fsm.timeout,
usr.sbin/ppp/command.c
2117
&arg->bundle->ncp.ipv6cp.cfg.fsm.maxreq,
usr.sbin/ppp/command.c
2118
&arg->bundle->ncp.ipv6cp.cfg.fsm.maxtrm, DEF_FSMTRIES);
usr.sbin/ppp/command.c
2125
ipaddr = arg->bundle->ncp.ipcp.cfg.ns.dns;
usr.sbin/ppp/command.c
2128
ipaddr = arg->bundle->ncp.ipcp.cfg.ns.nbns;
usr.sbin/ppp/command.c
2154
cx->cfg.callback.opmask = 0;
usr.sbin/ppp/command.c
2157
cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_AUTH);
usr.sbin/ppp/command.c
2159
cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_CBCP);
usr.sbin/ppp/command.c
2164
cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_E164);
usr.sbin/ppp/command.c
2165
strncpy(cx->cfg.callback.msg, arg->argv[++dummyint],
usr.sbin/ppp/command.c
2166
sizeof cx->cfg.callback.msg - 1);
usr.sbin/ppp/command.c
2167
cx->cfg.callback.msg[sizeof cx->cfg.callback.msg - 1] = '\0';
usr.sbin/ppp/command.c
2170
cx->cfg.callback.opmask |= CALLBACK_BIT(CALLBACK_NONE);
usr.sbin/ppp/command.c
2176
if (cx->cfg.callback.opmask == CALLBACK_BIT(CALLBACK_NONE))
usr.sbin/ppp/command.c
2177
cx->cfg.callback.opmask = 0;
usr.sbin/ppp/command.c
2181
cx->cfg.cbcp.delay = 0;
usr.sbin/ppp/command.c
2182
*cx->cfg.cbcp.phone = '\0';
usr.sbin/ppp/command.c
2183
cx->cfg.cbcp.fsmretry = DEF_FSMRETRY;
usr.sbin/ppp/command.c
2185
strncpy(cx->cfg.cbcp.phone, arg->argv[arg->argn],
usr.sbin/ppp/command.c
2186
sizeof cx->cfg.cbcp.phone - 1);
usr.sbin/ppp/command.c
2187
cx->cfg.cbcp.phone[sizeof cx->cfg.cbcp.phone - 1] = '\0';
usr.sbin/ppp/command.c
2189
cx->cfg.cbcp.delay = atoi(arg->argv[arg->argn + 1]);
usr.sbin/ppp/command.c
2196
cx->cfg.cbcp.fsmretry = long_val;
usr.sbin/ppp/command.c
2203
arg->bundle->cfg.choked.timeout = atoi(argp);
usr.sbin/ppp/command.c
2204
if (arg->bundle->cfg.choked.timeout <= 0)
usr.sbin/ppp/command.c
2205
arg->bundle->cfg.choked.timeout = CHOKED_TIMEOUT;
usr.sbin/ppp/command.c
2210
arg->bundle->ncp.cfg.sendpipe = long_val;
usr.sbin/ppp/command.c
2215
arg->bundle->ncp.cfg.recvpipe = long_val;
usr.sbin/ppp/command.c
2221
*arg->bundle->radius.cfg.file = '\0';
usr.sbin/ppp/command.c
2227
strncpy(arg->bundle->radius.cfg.file, argp,
usr.sbin/ppp/command.c
2228
sizeof arg->bundle->radius.cfg.file - 1);
usr.sbin/ppp/command.c
2229
arg->bundle->radius.cfg.file
usr.sbin/ppp/command.c
2230
[sizeof arg->bundle->radius.cfg.file - 1] = '\0';
usr.sbin/ppp/command.c
2241
cx->physical->cfg.cd.delay = long_val;
usr.sbin/ppp/command.c
2242
cx->physical->cfg.cd.necessity = argp[strlen(argp)-1] == '!' ?
usr.sbin/ppp/command.c
2245
cx->physical->cfg.cd.necessity = CD_NOTREQUIRED;
usr.sbin/ppp/command.c
2247
cx->physical->cfg.cd.delay = 0;
usr.sbin/ppp/command.c
2248
cx->physical->cfg.cd.necessity = CD_DEFAULT;
usr.sbin/ppp/command.c
2347
if (arg->bundle->radius.port_id_type && !*arg->bundle->radius.cfg.file) {
usr.sbin/ppp/command.c
266
Concatinate(arg->cx->physical->link.lcp.cfg.ident,
usr.sbin/ppp/command.c
267
sizeof arg->cx->physical->link.lcp.cfg.ident,
usr.sbin/ppp/command.c
2747
else if (!arg->bundle->ncp.mp.cfg.mrru) {
usr.sbin/ppp/command.c
2835
unsigned long long save = arg->bundle->cfg.optmask;
usr.sbin/ppp/command.c
2840
arg->bundle->cfg.optmask = save;
usr.sbin/ppp/command.c
2873
cx->physical->link.lcp.cfg.acfcomp &= keep;
usr.sbin/ppp/command.c
2874
cx->physical->link.lcp.cfg.acfcomp |= add;
usr.sbin/ppp/command.c
2877
cx->physical->link.lcp.cfg.chap05 &= keep;
usr.sbin/ppp/command.c
2878
cx->physical->link.lcp.cfg.chap05 |= add;
usr.sbin/ppp/command.c
2882
cx->physical->link.lcp.cfg.chap80nt &= keep;
usr.sbin/ppp/command.c
2883
cx->physical->link.lcp.cfg.chap80nt |= add;
usr.sbin/ppp/command.c
2886
cx->physical->link.lcp.cfg.chap80lm &= keep;
usr.sbin/ppp/command.c
2887
cx->physical->link.lcp.cfg.chap80lm |= add;
usr.sbin/ppp/command.c
2890
cx->physical->link.lcp.cfg.chap81 &= keep;
usr.sbin/ppp/command.c
2891
cx->physical->link.lcp.cfg.chap81 |= add;
usr.sbin/ppp/command.c
2894
l->ccp.cfg.neg[CCP_NEG_MPPE] &= keep;
usr.sbin/ppp/command.c
2895
l->ccp.cfg.neg[CCP_NEG_MPPE] |= add;
usr.sbin/ppp/command.c
2899
l->ccp.cfg.neg[CCP_NEG_DEFLATE] &= keep;
usr.sbin/ppp/command.c
2900
l->ccp.cfg.neg[CCP_NEG_DEFLATE] |= add;
usr.sbin/ppp/command.c
2903
arg->bundle->ncp.ipcp.cfg.ns.dns_neg &= keep;
usr.sbin/ppp/command.c
2904
arg->bundle->ncp.ipcp.cfg.ns.dns_neg |= add;
usr.sbin/ppp/command.c
2907
if (cx->physical->link.lcp.cfg.echo && !add) {
usr.sbin/ppp/command.c
2908
cx->physical->link.lcp.cfg.echo = 0;
usr.sbin/ppp/command.c
2916
} else if (!cx->physical->link.lcp.cfg.echo && add) {
usr.sbin/ppp/command.c
2917
cx->physical->link.lcp.cfg.echo = 1;
usr.sbin/ppp/command.c
2920
cx->physical->link.lcp.cfg.lqrperiod * SECTICKS;
usr.sbin/ppp/command.c
2926
arg->bundle->ncp.mp.cfg.negenddisc &= keep;
usr.sbin/ppp/command.c
2927
arg->bundle->ncp.mp.cfg.negenddisc |= add;
usr.sbin/ppp/command.c
2930
cx->physical->link.lcp.cfg.lqr &= keep;
usr.sbin/ppp/command.c
2931
cx->physical->link.lcp.cfg.lqr |= add;
usr.sbin/ppp/command.c
2934
cx->physical->link.lcp.cfg.pap &= keep;
usr.sbin/ppp/command.c
2935
cx->physical->link.lcp.cfg.pap |= add;
usr.sbin/ppp/command.c
2938
l->ccp.cfg.neg[CCP_NEG_DEFLATE24] &= keep;
usr.sbin/ppp/command.c
2939
l->ccp.cfg.neg[CCP_NEG_DEFLATE24] |= add;
usr.sbin/ppp/command.c
2942
l->ccp.cfg.neg[CCP_NEG_PRED1] &= keep;
usr.sbin/ppp/command.c
2943
l->ccp.cfg.neg[CCP_NEG_PRED1] |= add;
usr.sbin/ppp/command.c
2946
cx->physical->link.lcp.cfg.protocomp &= keep;
usr.sbin/ppp/command.c
2947
cx->physical->link.lcp.cfg.protocomp |= add;
usr.sbin/ppp/command.c
2966
arg->bundle->ncp.mp.cfg.shortseq &= keep;
usr.sbin/ppp/command.c
2967
arg->bundle->ncp.mp.cfg.shortseq |= add;
usr.sbin/ppp/command.c
2970
arg->bundle->ncp.ipcp.cfg.vj.neg &= keep;
usr.sbin/ppp/command.c
2971
arg->bundle->ncp.ipcp.cfg.vj.neg |= add;
usr.sbin/ppp/command.c
551
nargv[arg] = subst(nargv[arg], "AUTHNAME", bundle->cfg.auth.name);
usr.sbin/ppp/command.c
555
mp_Enddisc(bundle->ncp.mp.cfg.enddisc.class,
usr.sbin/ppp/command.c
556
bundle->ncp.mp.cfg.enddisc.address,
usr.sbin/ppp/command.c
557
bundle->ncp.mp.cfg.enddisc.len));
usr.sbin/ppp/command.c
599
if (server.cfg.port)
usr.sbin/ppp/command.c
600
nargv[arg] = substlong(nargv[arg], "SOCKNAME", server.cfg.port);
usr.sbin/ppp/command.c
602
nargv[arg] = subst(nargv[arg], "SOCKNAME", server.cfg.sockname);
usr.sbin/ppp/command.c
921
if (arg->cx->physical->async.cfg.EscMap[32]) {
usr.sbin/ppp/command.c
926
if (arg->cx->physical->async.cfg.EscMap[code])
usr.sbin/ppp/command.c
928
if (arg->cx->physical->async.cfg.EscMap[code] & (1 << bit)) {
usr.sbin/ppp/datalink.c
1087
arg->cx->cfg.phone.list);
usr.sbin/ppp/datalink.c
1088
if (arg->cx->cfg.dial.max)
usr.sbin/ppp/datalink.c
1090
arg->cx->cfg.dial.max);
usr.sbin/ppp/datalink.c
1093
if (arg->cx->cfg.dial.next_timeout >= 0)
usr.sbin/ppp/datalink.c
1094
prompt_Printf(arg->prompt, "%ds/", arg->cx->cfg.dial.next_timeout);
usr.sbin/ppp/datalink.c
1097
if (arg->cx->cfg.dial.timeout >= 0)
usr.sbin/ppp/datalink.c
1098
prompt_Printf(arg->prompt, "%ds\n", arg->cx->cfg.dial.timeout);
usr.sbin/ppp/datalink.c
1102
arg->cx->cfg.reconnect.max);
usr.sbin/ppp/datalink.c
1103
if (arg->cx->cfg.reconnect.timeout > 0)
usr.sbin/ppp/datalink.c
1104
prompt_Printf(arg->prompt, "%ds\n", arg->cx->cfg.reconnect.timeout);
usr.sbin/ppp/datalink.c
1109
if (!arg->cx->cfg.callback.opmask)
usr.sbin/ppp/datalink.c
1114
if (arg->cx->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_NONE)) {
usr.sbin/ppp/datalink.c
1118
if (arg->cx->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_AUTH)) {
usr.sbin/ppp/datalink.c
1122
if (arg->cx->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_E164)) {
usr.sbin/ppp/datalink.c
1125
prompt_Printf(arg->prompt, " (%s)", arg->cx->cfg.callback.msg);
usr.sbin/ppp/datalink.c
1128
if (arg->cx->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_CBCP)) {
usr.sbin/ppp/datalink.c
1131
arg->cx->cfg.cbcp.delay);
usr.sbin/ppp/datalink.c
1133
if (!strcmp(arg->cx->cfg.cbcp.phone, "*")) {
usr.sbin/ppp/datalink.c
1139
prompt_Printf(arg->prompt, "%s\n", arg->cx->cfg.cbcp.phone);
usr.sbin/ppp/datalink.c
1141
arg->cx->cfg.cbcp.fsmretry);
usr.sbin/ppp/datalink.c
1147
arg->cx->cfg.script.dial);
usr.sbin/ppp/datalink.c
1149
arg->cx->cfg.script.login);
usr.sbin/ppp/datalink.c
1151
arg->cx->cfg.script.logout);
usr.sbin/ppp/datalink.c
1153
arg->cx->cfg.script.hangup);
usr.sbin/ppp/datalink.c
1161
arg->cx->cfg.reconnect.timeout = atoi(arg->argv[arg->argn]);
usr.sbin/ppp/datalink.c
1162
arg->cx->cfg.reconnect.max = atoi(arg->argv[arg->argn+1]);
usr.sbin/ppp/datalink.c
1177
arg->cx->cfg.dial.timeout = -1;
usr.sbin/ppp/datalink.c
1183
arg->cx->cfg.dial.timeout = timeout;
usr.sbin/ppp/datalink.c
1195
arg->cx->cfg.dial.inc = inc;
usr.sbin/ppp/datalink.c
1204
arg->cx->cfg.dial.maxinc = maxinc;
usr.sbin/ppp/datalink.c
1211
arg->cx->cfg.dial.maxinc = 10;
usr.sbin/ppp/datalink.c
1216
arg->cx->cfg.dial.inc = 0;
usr.sbin/ppp/datalink.c
1217
arg->cx->cfg.dial.maxinc = 10;
usr.sbin/ppp/datalink.c
1224
arg->cx->cfg.dial.next_timeout = -1;
usr.sbin/ppp/datalink.c
1229
arg->cx->cfg.dial.next_timeout = timeout;
usr.sbin/ppp/datalink.c
1237
arg->cx->cfg.dial.next_timeout = DIAL_NEXT_TIMEOUT;
usr.sbin/ppp/datalink.c
1243
arg->cx->cfg.dial.max = tries;
usr.sbin/ppp/datalink.c
130
dl->cfg.callback.opmask = 0;
usr.sbin/ppp/datalink.c
131
strncpy(dl->cfg.phone.list, dl->cbcp.fsm.phone,
usr.sbin/ppp/datalink.c
132
sizeof dl->cfg.phone.list - 1);
usr.sbin/ppp/datalink.c
133
dl->cfg.phone.list[sizeof dl->cfg.phone.list - 1] = '\0';
usr.sbin/ppp/datalink.c
135
dl->reconnect_tries = dl->cfg.reconnect.max;
usr.sbin/ppp/datalink.c
136
dl->dial.tries = dl->cfg.dial.max;
usr.sbin/ppp/datalink.c
1365
copy = dl->pap.cfg.fsm;
usr.sbin/ppp/datalink.c
1367
dl->pap.cfg.fsm = copy;
usr.sbin/ppp/datalink.c
1369
copy = dl->chap.auth.cfg.fsm;
usr.sbin/ppp/datalink.c
1371
dl->chap.auth.cfg.fsm = copy;
usr.sbin/ppp/datalink.c
144
if (dl->cbcp.fsm.delay < dl->cfg.dial.timeout)
usr.sbin/ppp/datalink.c
145
dl->cbcp.fsm.delay = dl->cfg.dial.timeout;
usr.sbin/ppp/datalink.c
1472
int result = dl->cfg.dial.timeout + dl->dial.incs * dl->cfg.dial.inc;
usr.sbin/ppp/datalink.c
1474
if (dl->dial.incs < dl->cfg.dial.maxinc)
usr.sbin/ppp/datalink.c
170
datalink_StartDialTimer(dl, dl->cfg.reconnect.timeout);
usr.sbin/ppp/datalink.c
171
dl->dial.tries = dl->cfg.dial.max;
usr.sbin/ppp/datalink.c
175
dl->name, dl->cfg.reconnect.max - dl->reconnect_tries,
usr.sbin/ppp/datalink.c
176
dl->cfg.reconnect.max);
usr.sbin/ppp/datalink.c
182
datalink_StartDialTimer(dl, dl->cfg.dial.next_timeout);
usr.sbin/ppp/datalink.c
195
strncpy(dl->phone.list, dl->cfg.phone.list, sizeof dl->phone.list - 1);
usr.sbin/ppp/datalink.c
224
if (!chat_Setup(&dl->chat, dl->cfg.script.logout, NULL))
usr.sbin/ppp/datalink.c
241
0 : dl->physical->link.lcp.cfg.openmode);
usr.sbin/ppp/datalink.c
284
if (!chat_Setup(&dl->chat, dl->cfg.script.dial,
usr.sbin/ppp/datalink.c
285
*dl->cfg.script.dial ?
usr.sbin/ppp/datalink.c
289
dl->cfg.dial.max)
usr.sbin/ppp/datalink.c
291
dl->name, dl->cfg.dial.max - dl->dial.tries,
usr.sbin/ppp/datalink.c
292
dl->cfg.dial.max);
usr.sbin/ppp/datalink.c
298
dl->cfg.dial.max)
usr.sbin/ppp/datalink.c
300
dl->cfg.dial.max - dl->dial.tries, dl->cfg.dial.max);
usr.sbin/ppp/datalink.c
306
dl->cfg.dial.max && dl->dial.tries == 0)) {
usr.sbin/ppp/datalink.c
336
if (!chat_Setup(&dl->chat, dl->cfg.script.login, NULL))
usr.sbin/ppp/datalink.c
346
if (!chat_Setup(&dl->chat, dl->cfg.script.hangup, NULL))
usr.sbin/ppp/datalink.c
373
if (!chat_Setup(&dl->chat, dl->cfg.script.hangup, NULL))
usr.sbin/ppp/datalink.c
394
if (!chat_Setup(&dl->chat, dl->cfg.script.hangup, NULL))
usr.sbin/ppp/datalink.c
547
if (!chat_Setup(&dl->chat, dl->cfg.script.hangup, NULL))
usr.sbin/ppp/datalink.c
551
if (!chat_Setup(&dl->chat, dl->cfg.script.logout, NULL))
usr.sbin/ppp/datalink.c
808
*dl->cfg.script.dial = '\0';
usr.sbin/ppp/datalink.c
809
*dl->cfg.script.login = '\0';
usr.sbin/ppp/datalink.c
810
*dl->cfg.script.logout = '\0';
usr.sbin/ppp/datalink.c
811
*dl->cfg.script.hangup = '\0';
usr.sbin/ppp/datalink.c
812
*dl->cfg.phone.list = '\0';
usr.sbin/ppp/datalink.c
828
dl->cfg.dial.max = 1;
usr.sbin/ppp/datalink.c
829
dl->cfg.dial.next_timeout = DIAL_NEXT_TIMEOUT;
usr.sbin/ppp/datalink.c
830
dl->cfg.dial.timeout = DIAL_TIMEOUT;
usr.sbin/ppp/datalink.c
831
dl->cfg.dial.inc = 0;
usr.sbin/ppp/datalink.c
832
dl->cfg.dial.maxinc = 10;
usr.sbin/ppp/datalink.c
835
dl->cfg.reconnect.max = 0;
usr.sbin/ppp/datalink.c
836
dl->cfg.reconnect.timeout = RECONNECT_TIMEOUT;
usr.sbin/ppp/datalink.c
838
dl->cfg.callback.opmask = 0;
usr.sbin/ppp/datalink.c
839
dl->cfg.cbcp.delay = 0;
usr.sbin/ppp/datalink.c
840
*dl->cfg.cbcp.phone = '\0';
usr.sbin/ppp/datalink.c
841
dl->cfg.cbcp.fsmretry = DEF_FSMRETRY;
usr.sbin/ppp/datalink.c
888
memcpy(&dl->cfg, &odl->cfg, sizeof dl->cfg);
usr.sbin/ppp/datalink.c
911
dl->pap.cfg = odl->pap.cfg;
usr.sbin/ppp/datalink.c
914
dl->chap.auth.cfg = odl->chap.auth.cfg;
usr.sbin/ppp/datalink.c
916
memcpy(&dl->physical->cfg, &odl->physical->cfg, sizeof dl->physical->cfg);
usr.sbin/ppp/datalink.c
917
memcpy(&dl->physical->link.lcp.cfg, &odl->physical->link.lcp.cfg,
usr.sbin/ppp/datalink.c
918
sizeof dl->physical->link.lcp.cfg);
usr.sbin/ppp/datalink.c
919
memcpy(&dl->physical->link.ccp.cfg, &odl->physical->link.ccp.cfg,
usr.sbin/ppp/datalink.c
920
sizeof dl->physical->link.ccp.cfg);
usr.sbin/ppp/datalink.c
921
memcpy(&dl->physical->async.cfg, &odl->physical->async.cfg,
usr.sbin/ppp/datalink.c
922
sizeof dl->physical->async.cfg);
usr.sbin/ppp/datalink.c
977
dl->physical->type == PHYS_DIRECT ? 0 : dl->cfg.reconnect.max;
usr.sbin/ppp/datalink.c
978
dl->dial.tries = dl->cfg.dial.max;
usr.sbin/ppp/datalink.h
90
} cfg; /* All our config data is in here */
usr.sbin/ppp/deflate.c
444
const struct ccp_config *cfg)
usr.sbin/ppp/deflate.c
447
o->data[0] = ((cfg->deflate.out.winsize - 8) << 4) + 8;
usr.sbin/ppp/deflate.c
453
const struct ccp_config *cfg __unused)
usr.sbin/ppp/deflate.c
468
const struct ccp_config *cfg)
usr.sbin/ppp/deflate.c
476
if (cfg->deflate.in.winsize == 0) {
usr.sbin/ppp/deflate.c
480
} else if (want != cfg->deflate.in.winsize) {
usr.sbin/ppp/deflate.c
481
o->data[0] = ((cfg->deflate.in.winsize - 8) << 4) + 8;
usr.sbin/ppp/ether.c
630
if (p->cfg.pppoe_configured) {
usr.sbin/ppp/ether.c
631
mode = p->cfg.nonstandard_pppoe ? NG_PPPOE_NONSTANDARD : NG_PPPOE_STANDARD;
usr.sbin/ppp/ether.c
661
switch (p->cfg.cd.necessity) {
usr.sbin/ppp/ether.c
663
dev->dev.cd.delay = p->cfg.cd.delay;
usr.sbin/ppp/ether.c
666
dev->dev.cd = p->cfg.cd;
usr.sbin/ppp/exec.c
404
if (p->cfg.cd.necessity != CD_DEFAULT)
usr.sbin/ppp/ip.c
651
if (tos == IPTOS_LOWDELAY && bundle->ncp.cfg.urgent.tos)
usr.sbin/ppp/ip.c
815
if (tos == IPTOS_LOWDELAY && bundle->ncp.cfg.urgent.tos)
usr.sbin/ppp/ipcp.c
1000
if (iplist_ip2pos(&ipcp->cfg.peer_list, peer) >= 0) {
usr.sbin/ppp/ipcp.c
1025
!ncprange_containsip4(&ipcp->cfg.peer_range, ip)) {
usr.sbin/ppp/ipcp.c
1033
if (ncprange_contains(&ipcp->cfg.peer_range, &iface->addr[n].peer)) {
usr.sbin/ppp/ipcp.c
1088
if (ncprange_containsip4(&ipcp->cfg.my_range, ipaddr)) {
usr.sbin/ppp/ipcp.c
1117
if (!IsAccepted(ipcp->cfg.vj.neg))
usr.sbin/ppp/ipcp.c
1215
if (!IsAccepted(ipcp->cfg.ns.dns_neg)) {
usr.sbin/ppp/ipcp.c
1249
if (IsEnabled(ipcp->cfg.ns.dns_neg)) {
usr.sbin/ppp/ipcp.c
1270
ipcp->cfg.ns.nbns[opt->hdr.id == TY_PRIMARY_NBNS ? 0 : 1].s_addr;
usr.sbin/ppp/ipcp.c
1362
memset(&ipcp->cfg.peer_range, '\0', sizeof ipcp->cfg.peer_range);
usr.sbin/ppp/ipcp.c
1363
iplist_reset(&ipcp->cfg.peer_list);
usr.sbin/ppp/ipcp.c
1365
ncprange_setip4host(&ipcp->cfg.peer_range, hisaddr);
usr.sbin/ppp/ipcp.c
1366
ncprange_getip4addr(&ipcp->cfg.my_range, &myaddr);
usr.sbin/ppp/ipcp.c
1380
memset(&ipcp->cfg.peer_range, '\0', sizeof ipcp->cfg.peer_range);
usr.sbin/ppp/ipcp.c
1381
iplist_reset(&ipcp->cfg.peer_list);
usr.sbin/ppp/ipcp.c
1383
iplist_setsrc(&ipcp->cfg.peer_list, hisaddr);
usr.sbin/ppp/ipcp.c
1384
if (iplist_isvalid(&ipcp->cfg.peer_list)) {
usr.sbin/ppp/ipcp.c
1385
iplist_setrandpos(&ipcp->cfg.peer_list);
usr.sbin/ppp/ipcp.c
1388
log_Printf(LogWARN, "%s: None available !\n", ipcp->cfg.peer_list.src);
usr.sbin/ppp/ipcp.c
1391
ncprange_setip4host(&ipcp->cfg.peer_range, ipcp->peer_ip);
usr.sbin/ppp/ipcp.c
1396
} else if (ncprange_aton(&ipcp->cfg.peer_range, ncp, hisaddr) != 0) {
usr.sbin/ppp/ipcp.c
1397
if (ncprange_family(&ipcp->cfg.my_range) != AF_INET) {
usr.sbin/ppp/ipcp.c
1401
ncprange_getip4addr(&ipcp->cfg.my_range, &myaddr);
usr.sbin/ppp/ipcp.c
1402
ncprange_getip4addr(&ipcp->cfg.peer_range, &ipcp->peer_ip);
usr.sbin/ppp/ipcp.c
376
" REQ%s, %u Term REQ%s\n", ipcp->cfg.fsm.timeout,
usr.sbin/ppp/ipcp.c
377
ipcp->cfg.fsm.maxreq, ipcp->cfg.fsm.maxreq == 1 ? "" : "s",
usr.sbin/ppp/ipcp.c
378
ipcp->cfg.fsm.maxtrm, ipcp->cfg.fsm.maxtrm == 1 ? "" : "s");
usr.sbin/ppp/ipcp.c
380
ncprange_ntoa(&ipcp->cfg.my_range));
usr.sbin/ppp/ipcp.c
381
if (ipcp->cfg.HaveTriggerAddress)
usr.sbin/ppp/ipcp.c
383
inet_ntoa(ipcp->cfg.TriggerAddress));
usr.sbin/ppp/ipcp.c
386
"compression)\n", command_ShowNegval(ipcp->cfg.vj.neg),
usr.sbin/ppp/ipcp.c
387
ipcp->cfg.vj.slots, ipcp->cfg.vj.slotcomp ? "with" : "without");
usr.sbin/ppp/ipcp.c
389
if (iplist_isvalid(&ipcp->cfg.peer_list))
usr.sbin/ppp/ipcp.c
391
ipcp->cfg.peer_list.src);
usr.sbin/ppp/ipcp.c
394
ncprange_ntoa(&ipcp->cfg.peer_range));
usr.sbin/ppp/ipcp.c
397
ipcp->cfg.ns.dns[0].s_addr == INADDR_NONE ?
usr.sbin/ppp/ipcp.c
398
"none" : inet_ntoa(ipcp->cfg.ns.dns[0]));
usr.sbin/ppp/ipcp.c
399
if (ipcp->cfg.ns.dns[1].s_addr != INADDR_NONE)
usr.sbin/ppp/ipcp.c
401
inet_ntoa(ipcp->cfg.ns.dns[1]));
usr.sbin/ppp/ipcp.c
403
command_ShowNegval(ipcp->cfg.ns.dns_neg));
usr.sbin/ppp/ipcp.c
412
inet_ntoa(ipcp->cfg.ns.nbns[0]));
usr.sbin/ppp/ipcp.c
414
inet_ntoa(ipcp->cfg.ns.nbns[1]));
usr.sbin/ppp/ipcp.c
432
arg->bundle->ncp.ipcp.cfg.vj.slots = slots;
usr.sbin/ppp/ipcp.c
436
arg->bundle->ncp.ipcp.cfg.vj.slotcomp = 1;
usr.sbin/ppp/ipcp.c
438
arg->bundle->ncp.ipcp.cfg.vj.slotcomp = 0;
usr.sbin/ppp/ipcp.c
459
ipcp->cfg.vj.slots = DEF_VJ_STATES;
usr.sbin/ppp/ipcp.c
460
ipcp->cfg.vj.slotcomp = 1;
usr.sbin/ppp/ipcp.c
461
memset(&ipcp->cfg.my_range, '\0', sizeof ipcp->cfg.my_range);
usr.sbin/ppp/ipcp.c
464
ipcp->cfg.netmask.s_addr = INADDR_ANY;
usr.sbin/ppp/ipcp.c
470
ncprange_setip4(&ipcp->cfg.my_range, host, ipcp->cfg.netmask);
usr.sbin/ppp/ipcp.c
471
ncprange_setip4(&ipcp->cfg.peer_range, ipcp->cfg.netmask, ipcp->cfg.netmask);
usr.sbin/ppp/ipcp.c
473
iplist_setsrc(&ipcp->cfg.peer_list, "");
usr.sbin/ppp/ipcp.c
474
ipcp->cfg.HaveTriggerAddress = 0;
usr.sbin/ppp/ipcp.c
476
ipcp->cfg.ns.dns[0].s_addr = INADDR_NONE;
usr.sbin/ppp/ipcp.c
477
ipcp->cfg.ns.dns[1].s_addr = INADDR_NONE;
usr.sbin/ppp/ipcp.c
478
ipcp->cfg.ns.dns_neg = 0;
usr.sbin/ppp/ipcp.c
479
ipcp->cfg.ns.nbns[0].s_addr = INADDR_ANY;
usr.sbin/ppp/ipcp.c
480
ipcp->cfg.ns.nbns[1].s_addr = INADDR_ANY;
usr.sbin/ppp/ipcp.c
482
ipcp->cfg.fsm.timeout = DEF_FSMRETRY;
usr.sbin/ppp/ipcp.c
483
ipcp->cfg.fsm.maxreq = DEF_FSMTRIES;
usr.sbin/ppp/ipcp.c
484
ipcp->cfg.fsm.maxtrm = DEF_FSMTRIES;
usr.sbin/ppp/ipcp.c
485
ipcp->cfg.vj.neg = NEG_ENABLED|NEG_ACCEPTED;
usr.sbin/ppp/ipcp.c
530
ipcp->ifmask.s_addr = mask == INADDR_NONE ? ipcp->cfg.netmask.s_addr : mask;
usr.sbin/ppp/ipcp.c
532
if (iplist_isvalid(&ipcp->cfg.peer_list)) {
usr.sbin/ppp/ipcp.c
537
if ((pos = iplist_ip2pos(&ipcp->cfg.peer_list, peer)) != -1) {
usr.sbin/ppp/ipcp.c
538
ncpaddr_setip4(&ipaddr, iplist_setcurpos(&ipcp->cfg.peer_list, pos));
usr.sbin/ppp/ipcp.c
544
ncpaddr_setip4(&ipaddr, iplist_setrandpos(&ipcp->cfg.peer_list));
usr.sbin/ppp/ipcp.c
546
ncprange_sethost(&ipcp->cfg.peer_range, &ipaddr);
usr.sbin/ppp/ipcp.c
551
ncprange_getip4addr(&ipcp->cfg.peer_range, &ipcp->peer_ip);
usr.sbin/ppp/ipcp.c
554
if (ipcp->cfg.HaveTriggerAddress) {
usr.sbin/ppp/ipcp.c
560
ipcp->my_ip = ipcp->cfg.TriggerAddress;
usr.sbin/ppp/ipcp.c
562
inet_ntoa(ipcp->cfg.TriggerAddress));
usr.sbin/ppp/ipcp.c
572
if (ncprange_contains(&ipcp->cfg.my_range, &ipaddr)) {
usr.sbin/ppp/ipcp.c
578
ncprange_getip4addr(&ipcp->cfg.my_range, &ipcp->my_ip);
usr.sbin/ppp/ipcp.c
581
if (IsEnabled(ipcp->cfg.vj.neg)
usr.sbin/ppp/ipcp.c
587
((ipcp->cfg.vj.slots - 1) << 8) +
usr.sbin/ppp/ipcp.c
588
ipcp->cfg.vj.slotcomp;
usr.sbin/ppp/ipcp.c
591
sl_compress_init(&ipcp->vj.cslc, ipcp->cfg.vj.slots - 1);
usr.sbin/ppp/ipcp.c
597
if (ipcp->cfg.ns.dns[0].s_addr != INADDR_NONE)
usr.sbin/ppp/ipcp.c
598
memcpy(ipcp->ns.dns, ipcp->cfg.ns.dns, sizeof ipcp->ns.dns);
usr.sbin/ppp/ipcp.c
695
if (bundle->ncp.cfg.sendpipe > 0 || bundle->ncp.cfg.recvpipe > 0) {
usr.sbin/ppp/ipcp.c
718
for (f = 0; f < bundle->ncp.ipcp.cfg.peer_list.nItems; f++) {
usr.sbin/ppp/ipcp.c
719
try = iplist_next(&bundle->ncp.ipcp.cfg.peer_list);
usr.sbin/ppp/ipcp.c
728
if (f == bundle->ncp.ipcp.cfg.peer_list.nItems) {
usr.sbin/ppp/ipcp.c
742
fp->FsmTimer.load = ipcp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/ipcp.c
745
fp->restart = ipcp->cfg.fsm.maxreq;
usr.sbin/ppp/ipcp.c
748
fp->restart = ipcp->cfg.fsm.maxtrm;
usr.sbin/ppp/ipcp.c
789
if (IsEnabled(ipcp->cfg.ns.dns_neg)) {
usr.sbin/ppp/ipcp.c
827
fp->more.reqs = fp->more.naks = fp->more.rejs = ipcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipcp.c
883
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
usr.sbin/ppp/ipcp.c
952
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
usr.sbin/ppp/ipcp.c
971
fp->more.reqs = fp->more.naks = fp->more.rejs = ipcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipcp.c
985
if (iplist_isvalid(&ipcp->cfg.peer_list)) {
usr.sbin/ppp/ipcp.c
986
ncprange_getip4addr(&ipcp->cfg.my_range, &myaddr);
usr.sbin/ppp/ipcp.c
988
iplist_ip2pos(&ipcp->cfg.peer_list, ip) < 0 ||
usr.sbin/ppp/ipcp.h
70
} cfg;
usr.sbin/ppp/ipv6cp.c
243
if (bundle->ncp.cfg.sendpipe > 0 || bundle->ncp.cfg.recvpipe > 0) {
usr.sbin/ppp/ipv6cp.c
275
ipv6cp->cfg.fsm.timeout = DEF_FSMRETRY;
usr.sbin/ppp/ipv6cp.c
276
ipv6cp->cfg.fsm.maxreq = DEF_FSMTRIES;
usr.sbin/ppp/ipv6cp.c
277
ipv6cp->cfg.fsm.maxtrm = DEF_FSMTRIES;
usr.sbin/ppp/ipv6cp.c
341
" REQ%s, %u Term REQ%s\n\n", ipv6cp->cfg.fsm.timeout,
usr.sbin/ppp/ipv6cp.c
342
ipv6cp->cfg.fsm.maxreq, ipv6cp->cfg.fsm.maxreq == 1 ? "" : "s",
usr.sbin/ppp/ipv6cp.c
343
ipv6cp->cfg.fsm.maxtrm, ipv6cp->cfg.fsm.maxtrm == 1 ? "" : "s");
usr.sbin/ppp/ipv6cp.c
489
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
usr.sbin/ppp/ipv6cp.c
513
fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipv6cp.c
542
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
usr.sbin/ppp/ipv6cp.c
580
fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/ipv6cp.c
601
fp->FsmTimer.load = ipv6cp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/ipv6cp.c
604
fp->restart = ipv6cp->cfg.fsm.maxreq;
usr.sbin/ppp/ipv6cp.c
607
fp->restart = ipv6cp->cfg.fsm.maxtrm;
usr.sbin/ppp/ipv6cp.h
42
} cfg;
usr.sbin/ppp/lcp.c
1009
if (IsAccepted(lcp->cfg.protocomp)) {
usr.sbin/ppp/lcp.c
1034
if (IsAccepted(lcp->cfg.acfcomp)) {
usr.sbin/ppp/lcp.c
1110
if ((p->dl->cfg.callback.opmask & CALLBACK_BIT(op)) &&
usr.sbin/ppp/lcp.c
1113
E164ok(&p->dl->cfg.callback, opt->data + 1, sz))) {
usr.sbin/ppp/lcp.c
1122
} else if ((p->dl->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_AUTH)) &&
usr.sbin/ppp/lcp.c
1126
} else if (p->dl->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_CBCP)) {
usr.sbin/ppp/lcp.c
1129
} else if (p->dl->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_E164)) {
usr.sbin/ppp/lcp.c
1132
} else if (p->dl->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_AUTH)) {
usr.sbin/ppp/lcp.c
1176
if (lcp->want_mrru && IsAccepted(mp->cfg.shortseq)) {
usr.sbin/ppp/lcp.c
1207
} else if (!IsAccepted(mp->cfg.negenddisc)) {
usr.sbin/ppp/lcp.c
1258
p->dl->cfg.callback.opmask && !callback_req &&
usr.sbin/ppp/lcp.c
1259
!(p->dl->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_NONE))) {
usr.sbin/ppp/lcp.c
1263
if ((p->dl->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_AUTH)) &&
usr.sbin/ppp/lcp.c
1266
else if (p->dl->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_CBCP))
usr.sbin/ppp/lcp.c
1268
else if (p->dl->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_E164))
usr.sbin/ppp/lcp.c
1282
if (mru > lcp->cfg.max_mtu)
usr.sbin/ppp/lcp.c
1283
mru = lcp->cfg.max_mtu;
usr.sbin/ppp/lcp.c
1286
lcp->his_mru = lcp->cfg.mtu && lcp->cfg.mtu < mru ? lcp->cfg.mtu : mru;
usr.sbin/ppp/lcp.c
183
if (lcp->cfg.mru)
usr.sbin/ppp/lcp.c
185
lcp->cfg.mru, lcp->cfg.max_mru);
usr.sbin/ppp/lcp.c
188
lcp->cfg.max_mru);
usr.sbin/ppp/lcp.c
189
if (lcp->cfg.mtu)
usr.sbin/ppp/lcp.c
191
lcp->cfg.mtu, lcp->cfg.max_mtu);
usr.sbin/ppp/lcp.c
193
prompt_Printf(arg->prompt, "MTU = any (max %d), ", lcp->cfg.max_mtu);
usr.sbin/ppp/lcp.c
194
prompt_Printf(arg->prompt, "ACCMAP = %08lx\n", (u_long)lcp->cfg.accmap);
usr.sbin/ppp/lcp.c
196
lcp->cfg.lqrperiod);
usr.sbin/ppp/lcp.c
198
lcp->cfg.openmode == OPEN_PASSIVE ? "passive" : "active");
usr.sbin/ppp/lcp.c
199
if (lcp->cfg.openmode > 0)
usr.sbin/ppp/lcp.c
200
prompt_Printf(arg->prompt, " (delay %ds)", lcp->cfg.openmode);
usr.sbin/ppp/lcp.c
202
" REQ%s, %u Term REQ%s\n", lcp->cfg.fsm.timeout,
usr.sbin/ppp/lcp.c
203
lcp->cfg.fsm.maxreq, lcp->cfg.fsm.maxreq == 1 ? "" : "s",
usr.sbin/ppp/lcp.c
204
lcp->cfg.fsm.maxtrm, lcp->cfg.fsm.maxtrm == 1 ? "" : "s");
usr.sbin/ppp/lcp.c
205
prompt_Printf(arg->prompt, " Ident: %s\n", lcp->cfg.ident);
usr.sbin/ppp/lcp.c
208
command_ShowNegval(lcp->cfg.acfcomp));
usr.sbin/ppp/lcp.c
210
command_ShowNegval(lcp->cfg.chap05));
usr.sbin/ppp/lcp.c
213
command_ShowNegval(lcp->cfg.chap80nt));
usr.sbin/ppp/lcp.c
215
command_ShowNegval(lcp->cfg.chap80lm));
usr.sbin/ppp/lcp.c
217
command_ShowNegval(lcp->cfg.chap81));
usr.sbin/ppp/lcp.c
220
command_ShowNegval(lcp->cfg.lqr));
usr.sbin/ppp/lcp.c
222
lcp->cfg.echo ? "enabled" : "disabled");
usr.sbin/ppp/lcp.c
224
command_ShowNegval(lcp->cfg.pap));
usr.sbin/ppp/lcp.c
226
command_ShowNegval(lcp->cfg.protocomp));
usr.sbin/ppp/lcp.c
258
lcp->cfg.mru = 0;
usr.sbin/ppp/lcp.c
259
lcp->cfg.max_mru = MAX_MRU;
usr.sbin/ppp/lcp.c
260
lcp->cfg.mtu = 0;
usr.sbin/ppp/lcp.c
261
lcp->cfg.max_mtu = MAX_MTU;
usr.sbin/ppp/lcp.c
262
lcp->cfg.accmap = 0;
usr.sbin/ppp/lcp.c
263
lcp->cfg.openmode = 1;
usr.sbin/ppp/lcp.c
264
lcp->cfg.lqrperiod = DEF_LQRPERIOD;
usr.sbin/ppp/lcp.c
265
lcp->cfg.fsm.timeout = DEF_FSMRETRY;
usr.sbin/ppp/lcp.c
266
lcp->cfg.fsm.maxreq = DEF_FSMTRIES;
usr.sbin/ppp/lcp.c
267
lcp->cfg.fsm.maxtrm = DEF_FSMTRIES;
usr.sbin/ppp/lcp.c
269
lcp->cfg.acfcomp = NEG_ENABLED|NEG_ACCEPTED;
usr.sbin/ppp/lcp.c
270
lcp->cfg.chap05 = NEG_ACCEPTED;
usr.sbin/ppp/lcp.c
272
lcp->cfg.chap80nt = NEG_ACCEPTED;
usr.sbin/ppp/lcp.c
273
lcp->cfg.chap80lm = 0;
usr.sbin/ppp/lcp.c
274
lcp->cfg.chap81 = NEG_ACCEPTED;
usr.sbin/ppp/lcp.c
276
lcp->cfg.lqr = NEG_ACCEPTED;
usr.sbin/ppp/lcp.c
277
lcp->cfg.echo = 0;
usr.sbin/ppp/lcp.c
278
lcp->cfg.pap = NEG_ACCEPTED;
usr.sbin/ppp/lcp.c
279
lcp->cfg.protocomp = NEG_ENABLED|NEG_ACCEPTED;
usr.sbin/ppp/lcp.c
280
*lcp->cfg.ident = '\0';
usr.sbin/ppp/lcp.c
282
lcp_Setup(lcp, lcp->cfg.openmode);
usr.sbin/ppp/lcp.c
303
if ((lcp->want_mru = lcp->cfg.mru) == 0)
usr.sbin/ppp/lcp.c
305
lcp->want_mrru = lcp->fsm.bundle->ncp.mp.cfg.mrru;
usr.sbin/ppp/lcp.c
306
lcp->want_shortseq = IsEnabled(lcp->fsm.bundle->ncp.mp.cfg.shortseq) ? 1 : 0;
usr.sbin/ppp/lcp.c
307
lcp->want_acfcomp = IsEnabled(lcp->cfg.acfcomp) ? 1 : 0;
usr.sbin/ppp/lcp.c
311
lcp->want_accmap = lcp->cfg.accmap;
usr.sbin/ppp/lcp.c
313
lcp->want_protocomp = IsEnabled(lcp->cfg.protocomp) ? 1 : 0;
usr.sbin/ppp/lcp.c
316
if (IsEnabled(lcp->cfg.chap05)) {
usr.sbin/ppp/lcp.c
320
} else if (IsEnabled(lcp->cfg.chap80nt) ||
usr.sbin/ppp/lcp.c
321
IsEnabled(lcp->cfg.chap80lm)) {
usr.sbin/ppp/lcp.c
324
} else if (IsEnabled(lcp->cfg.chap81)) {
usr.sbin/ppp/lcp.c
328
} else if (IsEnabled(lcp->cfg.pap)) {
usr.sbin/ppp/lcp.c
337
memcpy(&lcp->want_callback, &p->dl->cfg.callback,
usr.sbin/ppp/lcp.c
341
lcp->want_lqrperiod = IsEnabled(lcp->cfg.lqr) ?
usr.sbin/ppp/lcp.c
342
lcp->cfg.lqrperiod * 100 : 0;
usr.sbin/ppp/lcp.c
364
fp->FsmTimer.load = lcp->cfg.fsm.timeout * SECTICKS;
usr.sbin/ppp/lcp.c
367
fp->restart = lcp->cfg.fsm.maxreq;
usr.sbin/ppp/lcp.c
370
fp->restart = lcp->cfg.fsm.maxtrm;
usr.sbin/ppp/lcp.c
411
if (lcp->cfg.max_mru && (!maxmru || maxmru > lcp->cfg.max_mru))
usr.sbin/ppp/lcp.c
412
maxmru = lcp->cfg.max_mru;
usr.sbin/ppp/lcp.c
480
if (mp->cfg.enddisc.class != 0 && IsEnabled(mp->cfg.negenddisc) &&
usr.sbin/ppp/lcp.c
482
*o->data = mp->cfg.enddisc.class;
usr.sbin/ppp/lcp.c
483
memcpy(o->data+1, mp->cfg.enddisc.address, mp->cfg.enddisc.len);
usr.sbin/ppp/lcp.c
484
INC_FSM_OPT(TY_ENDDISC, mp->cfg.enddisc.len + 3, o);
usr.sbin/ppp/lcp.c
507
if (*lcp->cfg.ident == '\0')
usr.sbin/ppp/lcp.c
510
argv[0] = lcp->cfg.ident;
usr.sbin/ppp/lcp.c
560
fp->more.reqs = fp->more.naks = fp->more.rejs = lcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/lcp.c
582
fp->more.reqs = fp->more.naks = fp->more.rejs = lcp->cfg.fsm.maxreq * 3;
usr.sbin/ppp/lcp.c
627
if (IsAccepted(lcp->cfg.pap)) {
usr.sbin/ppp/lcp.c
639
if (IsAccepted(lcp->cfg.chap05)) {
usr.sbin/ppp/lcp.c
643
} else if (IsAccepted(lcp->cfg.chap80nt) ||
usr.sbin/ppp/lcp.c
644
IsAccepted(lcp->cfg.chap80lm)) {
usr.sbin/ppp/lcp.c
647
} else if (IsAccepted(lcp->cfg.chap81)) {
usr.sbin/ppp/lcp.c
692
if (mp->cfg.mrru) {
usr.sbin/ppp/lcp.c
722
if (mp->cfg.mrru) {
usr.sbin/ppp/lcp.c
751
if (lcp->cfg.max_mtu && (!maxmtu || maxmtu > lcp->cfg.max_mtu))
usr.sbin/ppp/lcp.c
752
maxmtu = lcp->cfg.max_mtu;
usr.sbin/ppp/lcp.c
753
wantmtu = lcp->cfg.mtu;
usr.sbin/ppp/lcp.c
780
if (lcp->cfg.max_mru && (!maxmru || maxmru > lcp->cfg.max_mru))
usr.sbin/ppp/lcp.c
781
maxmru = lcp->cfg.max_mru;
usr.sbin/ppp/lcp.c
782
wantmru = lcp->cfg.mru > maxmru ? maxmru : lcp->cfg.mru;
usr.sbin/ppp/lcp.c
831
if (opt->hdr.len == 4 && IsAccepted(lcp->cfg.pap)) {
usr.sbin/ppp/lcp.c
842
if ((chap_type == 0x05 && IsAccepted(lcp->cfg.chap05))
usr.sbin/ppp/lcp.c
844
|| (chap_type == 0x80 && (IsAccepted(lcp->cfg.chap80nt) ||
usr.sbin/ppp/lcp.c
845
(IsAccepted(lcp->cfg.chap80lm))))
usr.sbin/ppp/lcp.c
846
|| (chap_type == 0x81 && IsAccepted(lcp->cfg.chap81))
usr.sbin/ppp/lcp.c
885
if (IsEnabled(lcp->cfg.pap)) {
usr.sbin/ppp/lcp.c
894
if (chap_type == 0x05 && IsEnabled(lcp->cfg.chap05)) {
usr.sbin/ppp/lcp.c
898
} else if (chap_type == 0x80 && (IsEnabled(lcp->cfg.chap80nt) ||
usr.sbin/ppp/lcp.c
899
IsEnabled(lcp->cfg.chap80lm))) {
usr.sbin/ppp/lcp.c
902
} else if (chap_type == 0x81 && IsEnabled(lcp->cfg.chap81)) {
usr.sbin/ppp/lcp.c
944
if (ntohs(req.proto) != PROTO_LQR || !IsAccepted(lcp->cfg.lqr)) {
usr.sbin/ppp/lcp.h
105
} cfg;
usr.sbin/ppp/lqr.c
218
else if (!IsAccepted(l->lcp.cfg.lqr) && !(p->hdlc.lqm.method & LQM_LQR)) {
usr.sbin/ppp/lqr.c
279
physical->hdlc.lqm.method = lcp->cfg.echo ? LQM_ECHO : 0;
usr.sbin/ppp/lqr.c
280
if (IsEnabled(lcp->cfg.lqr) && !REJECTED(lcp, TY_QUALPROTO))
usr.sbin/ppp/lqr.c
291
lcp->want_lqrperiod : lcp->cfg.lqrperiod * 100;
usr.sbin/ppp/main.c
422
ncprange_family(&bundle->ncp.ipcp.cfg.peer_range) == AF_UNSPEC) {
usr.sbin/ppp/mp.c
1004
mp->cfg.enddisc.class = ENDDISC_MAC;
usr.sbin/ppp/mp.c
1005
memcpy(mp->cfg.enddisc.address, hwaddr.sdl_data + hwaddr.sdl_nlen,
usr.sbin/ppp/mp.c
1007
mp->cfg.enddisc.len = hwaddr.sdl_alen;
usr.sbin/ppp/mp.c
1018
*(long *)(mp->cfg.enddisc.address + f) = random();
usr.sbin/ppp/mp.c
1019
mp->cfg.enddisc.class = ENDDISC_MAGIC;
usr.sbin/ppp/mp.c
1020
mp->cfg.enddisc.len = 20;
usr.sbin/ppp/mp.c
1023
mp->cfg.enddisc.class = ENDDISC_PSN;
usr.sbin/ppp/mp.c
1024
strcpy(mp->cfg.enddisc.address, arg->argv[arg->argn+1]);
usr.sbin/ppp/mp.c
1025
mp->cfg.enddisc.len = strlen(mp->cfg.enddisc.address);
usr.sbin/ppp/mp.c
200
if (percent >= mp->cfg.autoload.max) {
usr.sbin/ppp/mp.c
203
} else if (percent <= mp->cfg.autoload.min) {
usr.sbin/ppp/mp.c
218
if (mp->link.stats.total.SamplePeriod != mp->cfg.autoload.period) {
usr.sbin/ppp/mp.c
220
throughput_init(&mp->link.stats.total, mp->cfg.autoload.period);
usr.sbin/ppp/mp.c
233
if (mp->link.stats.total.SamplePeriod != mp->cfg.autoload.period)
usr.sbin/ppp/mp.c
259
mp->cfg.autoload.period = SAMPLE_PERIOD;
usr.sbin/ppp/mp.c
260
mp->cfg.autoload.min = mp->cfg.autoload.max = 0;
usr.sbin/ppp/mp.c
261
throughput_init(&mp->link.stats.total, mp->cfg.autoload.period);
usr.sbin/ppp/mp.c
277
mp->cfg.mrru = 0;
usr.sbin/ppp/mp.c
278
mp->cfg.shortseq = NEG_ENABLED|NEG_ACCEPTED;
usr.sbin/ppp/mp.c
279
mp->cfg.negenddisc = NEG_ENABLED|NEG_ACCEPTED;
usr.sbin/ppp/mp.c
280
mp->cfg.enddisc.class = 0;
usr.sbin/ppp/mp.c
281
*mp->cfg.enddisc.address = '\0';
usr.sbin/ppp/mp.c
282
mp->cfg.enddisc.len = 0;
usr.sbin/ppp/mp.c
332
throughput_init(&mp->link.stats.total, mp->cfg.autoload.period);
usr.sbin/ppp/mp.c
865
mp_Enddisc(mp->cfg.enddisc.class, mp->cfg.enddisc.address,
usr.sbin/ppp/mp.c
866
mp->cfg.enddisc.len));
usr.sbin/ppp/mp.c
883
if (mp->cfg.mrru)
usr.sbin/ppp/mp.c
884
prompt_Printf(arg->prompt, "%d (multilink enabled)\n", mp->cfg.mrru);
usr.sbin/ppp/mp.c
888
command_ShowNegval(mp->cfg.shortseq));
usr.sbin/ppp/mp.c
890
command_ShowNegval(mp->cfg.negenddisc));
usr.sbin/ppp/mp.c
892
" period %d secs\n", mp->cfg.autoload.min,
usr.sbin/ppp/mp.c
893
mp->cfg.autoload.max, mp->cfg.autoload.period);
usr.sbin/ppp/mp.c
979
mp->cfg.enddisc.class = 0;
usr.sbin/ppp/mp.c
980
*mp->cfg.enddisc.address = '\0';
usr.sbin/ppp/mp.c
981
mp->cfg.enddisc.len = 0;
usr.sbin/ppp/mp.c
984
mp->cfg.enddisc.class = ENDDISC_LOCAL;
usr.sbin/ppp/mp.c
985
strcpy(mp->cfg.enddisc.address, arg->bundle->cfg.label);
usr.sbin/ppp/mp.c
986
mp->cfg.enddisc.len = strlen(mp->cfg.enddisc.address);
usr.sbin/ppp/mp.c
989
ncprange_getip4addr(&arg->bundle->ncp.ipcp.cfg.my_range, &addr);
usr.sbin/ppp/mp.c
992
memcpy(mp->cfg.enddisc.address, &addr.s_addr, sizeof addr.s_addr);
usr.sbin/ppp/mp.c
993
mp->cfg.enddisc.class = ENDDISC_IP;
usr.sbin/ppp/mp.c
994
mp->cfg.enddisc.len = sizeof arg->bundle->ncp.ipcp.my_ip.s_addr;
usr.sbin/ppp/mp.c
999
ncprange_getip4addr(&arg->bundle->ncp.ipcp.cfg.my_range, &addr);
usr.sbin/ppp/mp.h
105
} cfg;
usr.sbin/ppp/mppe.c
440
if (*r->cfg.file) {
usr.sbin/ppp/mppe.c
465
if (*fp->bundle->radius.cfg.file && fp->bundle->radius.mppe.policy)
usr.sbin/ppp/mppe.c
469
return fp->link->ccp.cfg.mppe.required;
usr.sbin/ppp/mppe.c
473
MPPE_ConfigVal(struct bundle *bundle __unused, const struct ccp_config *cfg)
usr.sbin/ppp/mppe.c
477
val = cfg->mppe.state == MPPE_STATELESS ? MPPE_OPT_STATELESS : 0;
usr.sbin/ppp/mppe.c
483
if (*bundle->radius.cfg.file && bundle->radius.mppe.types) {
usr.sbin/ppp/mppe.c
490
switch(cfg->mppe.keybits) {
usr.sbin/ppp/mppe.c
513
const struct ccp_config *cfg)
usr.sbin/ppp/mppe.c
528
mval = MPPE_ConfigVal(bundle, cfg);
usr.sbin/ppp/mppe.c
537
const struct ccp_config *cfg)
usr.sbin/ppp/mppe.c
547
mval = MPPE_ConfigVal(bundle, cfg);
usr.sbin/ppp/mppe.c
553
if (!cfg->mppe.keybits) {
usr.sbin/ppp/mppe.c
561
if (cfg->mppe.state == MPPE_ANYSTATE) {
usr.sbin/ppp/mppe.c
576
const struct ccp_config *cfg)
usr.sbin/ppp/mppe.c
591
mval = MPPE_ConfigVal(bundle, cfg);
usr.sbin/ppp/mppe.c
598
if (cfg->mppe.state == MPPE_STATEFUL)
usr.sbin/ppp/mppe.c
605
if (cfg->mppe.state == MPPE_STATELESS)
usr.sbin/ppp/mppe.c
614
if (cfg->mppe.keybits) {
usr.sbin/ppp/mppe.c
696
if (*bundle->radius.cfg.file && bundle->radius.mppe.recvkey) {
usr.sbin/ppp/mppe.c
752
if (*bundle->radius.cfg.file && bundle->radius.mppe.sendkey) {
usr.sbin/ppp/ncp.c
101
ncp->cfg.urgent.tcp.port = (u_short *)malloc(NDEFTCPPORTS * sizeof(u_short));
usr.sbin/ppp/ncp.c
102
if (ncp->cfg.urgent.tcp.port == NULL) {
usr.sbin/ppp/ncp.c
104
ncp->cfg.urgent.tcp.nports = ncp->cfg.urgent.tcp.maxports = 0;
usr.sbin/ppp/ncp.c
106
ncp->cfg.urgent.tcp.nports = ncp->cfg.urgent.tcp.maxports = NDEFTCPPORTS;
usr.sbin/ppp/ncp.c
107
memcpy(ncp->cfg.urgent.tcp.port, default_urgent_tcp_ports,
usr.sbin/ppp/ncp.c
110
ncp->cfg.urgent.tos = 1;
usr.sbin/ppp/ncp.c
112
ncp->cfg.urgent.udp.nports = ncp->cfg.urgent.udp.maxports = 0;
usr.sbin/ppp/ncp.c
113
ncp->cfg.urgent.udp.port = NULL;
usr.sbin/ppp/ncp.c
134
if (ncp->cfg.urgent.tcp.maxports) {
usr.sbin/ppp/ncp.c
135
ncp->cfg.urgent.tcp.nports = ncp->cfg.urgent.tcp.maxports = 0;
usr.sbin/ppp/ncp.c
136
free(ncp->cfg.urgent.tcp.port);
usr.sbin/ppp/ncp.c
137
ncp->cfg.urgent.tcp.port = NULL;
usr.sbin/ppp/ncp.c
139
if (ncp->cfg.urgent.udp.maxports) {
usr.sbin/ppp/ncp.c
140
ncp->cfg.urgent.udp.nports = ncp->cfg.urgent.udp.maxports = 0;
usr.sbin/ppp/ncp.c
141
free(ncp->cfg.urgent.udp.port);
usr.sbin/ppp/ncp.c
142
ncp->cfg.urgent.udp.port = NULL;
usr.sbin/ppp/ncp.c
444
if (len < ncp->cfg.urgent.len)
usr.sbin/ppp/ncp.c
453
ncp->cfg.urgent.len = len;
usr.sbin/ppp/ncp.c
474
if (ncp->cfg.sendpipe > 0)
usr.sbin/ppp/ncp.c
475
prompt_Printf(arg->prompt, "%-20ld\n", ncp->cfg.sendpipe);
usr.sbin/ppp/ncp.c
479
if (ncp->cfg.recvpipe > 0)
usr.sbin/ppp/ncp.c
480
prompt_Printf(arg->prompt, "%ld\n", ncp->cfg.recvpipe);
usr.sbin/ppp/ncp.c
486
if (ncp->cfg.urgent.tcp.nports == 0)
usr.sbin/ppp/ncp.c
489
for (p = 0; p < ncp->cfg.urgent.tcp.nports; p++) {
usr.sbin/ppp/ncp.c
492
prompt_Printf(arg->prompt, "%u", ncp->cfg.urgent.tcp.port[p]);
usr.sbin/ppp/ncp.c
496
if (ncp->cfg.urgent.udp.nports == 0)
usr.sbin/ppp/ncp.c
499
for (p = 0; p < ncp->cfg.urgent.udp.nports; p++) {
usr.sbin/ppp/ncp.c
502
prompt_Printf(arg->prompt, "%u", ncp->cfg.urgent.udp.port[p]);
usr.sbin/ppp/ncp.c
505
ncp->cfg.urgent.tos ? "yes" : "no");
usr.sbin/ppp/ncp.h
45
} cfg;
usr.sbin/ppp/ncp.h
82
ncp_IsUrgentPort(&(ncp)->cfg.urgent.tcp, p1, p2)
usr.sbin/ppp/ncp.h
84
ncp_IsUrgentPort(&(ncp)->cfg.urgent.udp, p1, p2)
usr.sbin/ppp/ncp.h
86
ncp_AddUrgentPort(&(ncp)->cfg.urgent.tcp, p)
usr.sbin/ppp/ncp.h
88
ncp_AddUrgentPort(&(ncp)->cfg.urgent.udp, p)
usr.sbin/ppp/ncp.h
90
ncp_RemoveUrgentPort(&(ncp)->cfg.urgent.tcp, p)
usr.sbin/ppp/ncp.h
92
ncp_RemoveUrgentPort(&(ncp)->cfg.urgent.udp, p)
usr.sbin/ppp/ncp.h
94
ncp_ClearUrgentPorts(&(ncp)->cfg.urgent.tcp)
usr.sbin/ppp/ncp.h
96
ncp_ClearUrgentPorts(&(ncp)->cfg.urgent.udp)
usr.sbin/ppp/ncp.h
97
#define ncp_ClearUrgentTOS(ncp) (ncp)->cfg.urgent.tos = 0
usr.sbin/ppp/ncp.h
98
#define ncp_SetUrgentTOS(ncp) (ncp)->cfg.urgent.tos = 1
usr.sbin/ppp/pap.c
105
memcpy(cp, bundle->cfg.auth.name, namelen);
usr.sbin/ppp/pap.c
108
memcpy(cp, bundle->cfg.auth.key, keylen);
usr.sbin/ppp/pap.c
149
if (*bundle->radius.cfg.file && bundle->radius.repstr)
usr.sbin/ppp/pap.c
267
if (*bundle->radius.cfg.file) {
usr.sbin/ppp/pap.c
91
namelen = strlen(bundle->cfg.auth.name);
usr.sbin/ppp/pap.c
92
keylen = strlen(bundle->cfg.auth.key);
usr.sbin/ppp/pap.c
95
log_Printf(LogPHASE, "Pap Output: %s ********\n", bundle->cfg.auth.name);
usr.sbin/ppp/pap.c
96
if (*bundle->cfg.auth.name == '\0')
usr.sbin/ppp/physical.c
1012
dev = p->cfg.devlist;
usr.sbin/ppp/physical.c
1014
while (devno < p->cfg.ndev && p->fd < 0) {
usr.sbin/ppp/physical.c
1075
p->cfg.speed = MODEM_SPEED;
usr.sbin/ppp/physical.c
1121
p->cfg.nonstandard_pppoe = enable ? 1 : 0;
usr.sbin/ppp/physical.c
1122
p->cfg.pppoe_configured = 1;
usr.sbin/ppp/physical.c
197
p->cfg.rts_cts = MODEM_CTSRTS;
usr.sbin/ppp/physical.c
198
p->cfg.speed = MODEM_SPEED;
usr.sbin/ppp/physical.c
199
p->cfg.parity = CS8;
usr.sbin/ppp/physical.c
200
memcpy(p->cfg.devlist, MODEM_LIST, sizeof MODEM_LIST);
usr.sbin/ppp/physical.c
201
p->cfg.ndev = NMODEMS;
usr.sbin/ppp/physical.c
202
p->cfg.cd.necessity = CD_DEFAULT;
usr.sbin/ppp/physical.c
203
p->cfg.cd.delay = 0; /* reconfigured or device specific default */
usr.sbin/ppp/physical.c
244
p->cfg.parity = val;
usr.sbin/ppp/physical.c
270
p->cfg.speed = speed;
usr.sbin/ppp/physical.c
466
dev = p->cfg.devlist;
usr.sbin/ppp/physical.c
467
for (n = 0; n < p->cfg.ndev; n++) {
usr.sbin/ppp/physical.c
478
prompt_Printf(arg->prompt, "%dbps", p->cfg.speed);
usr.sbin/ppp/physical.c
480
switch (p->cfg.parity & CSIZE) {
usr.sbin/ppp/physical.c
488
if (p->cfg.parity & PARENB) {
usr.sbin/ppp/physical.c
489
if (p->cfg.parity & PARODD)
usr.sbin/ppp/physical.c
496
prompt_Printf(arg->prompt, ", CTS/RTS %s\n", (p->cfg.rts_cts ? "on" : "off"));
usr.sbin/ppp/physical.c
499
cd = p->handler ? &p->handler->cd : &p->cfg.cd;
usr.sbin/ppp/physical.c
502
else if (p->cfg.cd.necessity == CD_DEFAULT) {
usr.sbin/ppp/physical.c
505
prompt_Printf(arg->prompt, "%d second%s", p->cfg.cd.delay,
usr.sbin/ppp/physical.c
506
p->cfg.cd.delay == 1 ? "" : "s");
usr.sbin/ppp/physical.c
507
if (p->cfg.cd.necessity == CD_REQUIRED)
usr.sbin/ppp/physical.c
757
return p->cfg.speed == 0;
usr.sbin/ppp/physical.c
777
p->cfg.devlist[sizeof p->cfg.devlist - 1] = '\0';
usr.sbin/ppp/physical.c
778
for (f = 0, pos = 0; f < argc && pos < sizeof p->cfg.devlist - 1; f++) {
usr.sbin/ppp/physical.c
780
p->cfg.devlist[pos++] = '\0';
usr.sbin/ppp/physical.c
781
strncpy(p->cfg.devlist + pos, argv[f], sizeof p->cfg.devlist - pos - 1);
usr.sbin/ppp/physical.c
782
pos += strlen(p->cfg.devlist + pos);
usr.sbin/ppp/physical.c
784
p->cfg.ndev = f;
usr.sbin/ppp/physical.c
790
p->cfg.speed = 0;
usr.sbin/ppp/physical.c
796
p->cfg.rts_cts = enable ? 1 : 0;
usr.sbin/ppp/physical.h
113
} cfg;
usr.sbin/ppp/pred.c
306
const struct ccp_config *cfg __unused)
usr.sbin/ppp/pred.c
313
const struct ccp_config *cfg __unused)
usr.sbin/ppp/prompt.c
345
p->auth = *s->cfg.passwd ? LOCAL_NO_AUTH : LOCAL_AUTH;
usr.sbin/ppp/prompt.c
533
if (!strcmp(arg->prompt->owner->cfg.passwd, pass))
usr.sbin/ppp/radius.c
1106
if (!*r->cfg.file)
usr.sbin/ppp/radius.c
1123
if (rad_config(r->cx.rad, r->cfg.file) != 0) {
usr.sbin/ppp/radius.c
1146
dl->bundle->cfg.auth.name, (long)getpid(),
usr.sbin/ppp/radius.c
1303
*r->cfg.file ? r->cfg.file : "none");
usr.sbin/ppp/radius.c
1348
if (*bundle->radius.cfg.file && bundle->radius.alive.interval) {
usr.sbin/ppp/radius.c
787
*r->cfg.file = '\0';
usr.sbin/ppp/radius.c
910
if (!*r->cfg.file)
usr.sbin/ppp/radius.c
927
if (rad_config(r->cx.rad, r->cfg.file) != 0) {
usr.sbin/ppp/radius.h
73
} cfg;
usr.sbin/ppp/route.c
762
if (bundle->ncp.cfg.sendpipe > 0) {
usr.sbin/ppp/route.c
763
rtmes.m_rtm.rtm_rmx.rmx_sendpipe = bundle->ncp.cfg.sendpipe;
usr.sbin/ppp/route.c
766
if (bundle->ncp.cfg.recvpipe > 0) {
usr.sbin/ppp/route.c
767
rtmes.m_rtm.rtm_rmx.rmx_recvpipe = bundle->ncp.cfg.recvpipe;
usr.sbin/ppp/route.c
882
if (bundle->ncp.cfg.sendpipe > 0) {
usr.sbin/ppp/route.c
883
rtmes.m_rtm.rtm_rmx.rmx_sendpipe = bundle->ncp.cfg.sendpipe;
usr.sbin/ppp/route.c
887
if (bundle->ncp.cfg.recvpipe > 0) {
usr.sbin/ppp/route.c
888
rtmes.m_rtm.rtm_rmx.rmx_recvpipe = bundle->ncp.cfg.recvpipe;
usr.sbin/ppp/server.c
164
strncpy(p->src.from, s->cfg.sockname, sizeof p->src.from - 1);
usr.sbin/ppp/server.c
218
char name[sizeof server.cfg.sockname];
usr.sbin/ppp/server.c
224
if (server.cfg.sockname[0] != '\0') {
usr.sbin/ppp/server.c
225
strcpy(name, server.cfg.sockname);
usr.sbin/ppp/server.c
226
mask = server.cfg.mask;
usr.sbin/ppp/server.c
228
if (server.cfg.sockname[0] != '\0' && stat(server.cfg.sockname, &st) == 0)
usr.sbin/ppp/server.c
229
if (!(st.st_mode & S_IFSOCK) || unlink(server.cfg.sockname) != 0)
usr.sbin/ppp/server.c
232
} else if (server.cfg.port != 0) {
usr.sbin/ppp/server.c
233
port = server.cfg.port;
usr.sbin/ppp/server.c
251
if (server.cfg.sockname[0] != '\0' && !strcmp(server.cfg.sockname, name))
usr.sbin/ppp/server.c
289
server.cfg.port = 0;
usr.sbin/ppp/server.c
290
strncpy(server.cfg.sockname, ifsun.sun_path, sizeof server.cfg.sockname - 1);
usr.sbin/ppp/server.c
291
server.cfg.sockname[sizeof server.cfg.sockname - 1] = '\0';
usr.sbin/ppp/server.c
292
server.cfg.mask = mask;
usr.sbin/ppp/server.c
300
server.cfg.port = 0;
usr.sbin/ppp/server.c
301
strncpy(server.cfg.sockname, ifsun.sun_path,
usr.sbin/ppp/server.c
302
sizeof server.cfg.sockname - 1);
usr.sbin/ppp/server.c
303
server.cfg.sockname[sizeof server.cfg.sockname - 1] = '\0';
usr.sbin/ppp/server.c
304
server.cfg.mask = mask;
usr.sbin/ppp/server.c
319
if (server.cfg.port == port)
usr.sbin/ppp/server.c
370
server.cfg.port = port;
usr.sbin/ppp/server.c
371
*server.cfg.sockname = '\0';
usr.sbin/ppp/server.c
372
server.cfg.mask = 0;
usr.sbin/ppp/server.c
379
server.cfg.port = port;
usr.sbin/ppp/server.c
380
*server.cfg.sockname = '\0';
usr.sbin/ppp/server.c
381
server.cfg.mask = 0;
usr.sbin/ppp/server.c
390
if (*server.cfg.sockname != '\0') {
usr.sbin/ppp/server.c
417
server.cfg.port = 0;
usr.sbin/ppp/server.c
418
*server.cfg.sockname = '\0';
usr.sbin/ppp/server.c
419
server.cfg.mask = 0;
usr.sbin/ppp/server.h
42
} cfg;
usr.sbin/ppp/tcp.c
204
if (p->cfg.cd.necessity != CD_DEFAULT)
usr.sbin/ppp/tty.c
131
if (p->cfg.cd.necessity != CD_DEFAULT)
usr.sbin/ppp/tty.c
231
struct ng_async_cfg cfg;
usr.sbin/ppp/tty.c
237
memset(&cfg, 0, sizeof cfg);
usr.sbin/ppp/tty.c
238
cfg.enabled = 1;
usr.sbin/ppp/tty.c
239
cfg.accm = mymap | hismap;
usr.sbin/ppp/tty.c
240
cfg.amru = MAX_MTU;
usr.sbin/ppp/tty.c
241
cfg.smru = MAX_MRU;
usr.sbin/ppp/tty.c
244
NGM_ASYNC_CMD_SET_CONFIG, &cfg, sizeof cfg) < 0)
usr.sbin/ppp/tty.c
451
if (p->cfg.rts_cts)
usr.sbin/ppp/tty.c
713
if (p->cfg.cd.necessity != CD_DEFAULT)
usr.sbin/ppp/tty.c
715
dev->dev.cd = p->cfg.cd;
usr.sbin/ppp/tty.c
722
if (p->cfg.rts_cts)
usr.sbin/ppp/tty.c
735
ios.c_cflag |= p->cfg.parity;
usr.sbin/ppp/tty.c
736
if (cfsetspeed(&ios, UnsignedToSpeed(p->cfg.speed)) == -1)
usr.sbin/ppp/tty.c
738
p->link.name, p->name.full, p->cfg.speed);
usr.sbin/ppp/tty.c
744
if (p->type != PHYS_DIRECT && p->cfg.speed > 115200)
usr.sbin/ppp/udp.c
316
if (p->link.lcp.cfg.openmode != OPEN_PASSIVE) {
usr.sbin/ppp/udp.c
319
p->link.lcp.cfg.openmode = OPEN_PASSIVE;
usr.sbin/ppp/udp.c
329
if (p->cfg.cd.necessity != CD_DEFAULT)
usr.sbin/pw/pw.h
69
struct userconf *get_userconfig(const char *cfg);
usr.sbin/pw/pw_group.c
263
const char *cfg = NULL;
usr.sbin/pw/pw_group.c
270
cfg = optarg;
usr.sbin/pw/pw_group.c
286
cnf = get_userconfig(cfg);
usr.sbin/pw/pw_group.c
371
const char *cfg = NULL;
usr.sbin/pw/pw_group.c
387
cfg = optarg;
usr.sbin/pw/pw_group.c
413
cnf = get_userconfig(cfg);
usr.sbin/pw/pw_group.c
507
const char *cfg = NULL;
usr.sbin/pw/pw_group.c
524
cfg = optarg;
usr.sbin/pw/pw_group.c
580
cnf = get_userconfig(cfg);
usr.sbin/pw/pw_group.c
594
const char *cfg = NULL;
usr.sbin/pw/pw_group.c
616
cfg = optarg;
usr.sbin/pw/pw_group.c
674
cnf = get_userconfig(cfg);
usr.sbin/pw/pw_user.c
1146
mix_config(struct userconf *cmdcnf, struct userconf *cfg)
usr.sbin/pw/pw_user.c
1150
cmdcnf->default_password = cfg->default_password;
usr.sbin/pw/pw_user.c
1152
cmdcnf->reuse_uids = cfg->reuse_uids;
usr.sbin/pw/pw_user.c
1154
cmdcnf->reuse_gids = cfg->reuse_gids;
usr.sbin/pw/pw_user.c
1156
cmdcnf->nispasswd = cfg->nispasswd;
usr.sbin/pw/pw_user.c
1158
cmdcnf->dotdir = cfg->dotdir;
usr.sbin/pw/pw_user.c
1160
cmdcnf->newmail = cfg->newmail;
usr.sbin/pw/pw_user.c
1162
cmdcnf->logfile = cfg->logfile;
usr.sbin/pw/pw_user.c
1164
cmdcnf->home = cfg->home;
usr.sbin/pw/pw_user.c
1166
cmdcnf->homemode = cfg->homemode;
usr.sbin/pw/pw_user.c
1168
cmdcnf->shelldir = cfg->shelldir;
usr.sbin/pw/pw_user.c
1170
cmdcnf->shells = cfg->shells;
usr.sbin/pw/pw_user.c
1172
cmdcnf->shell_default = cfg->shell_default;
usr.sbin/pw/pw_user.c
1174
cmdcnf->default_group = cfg->default_group;
usr.sbin/pw/pw_user.c
1176
cmdcnf->groups = cfg->groups;
usr.sbin/pw/pw_user.c
1178
cmdcnf->default_class = cfg->default_class;
usr.sbin/pw/pw_user.c
1180
cmdcnf->min_uid = cfg->min_uid;
usr.sbin/pw/pw_user.c
1182
cmdcnf->max_uid = cfg->max_uid;
usr.sbin/pw/pw_user.c
1184
cmdcnf->min_gid = cfg->min_gid;
usr.sbin/pw/pw_user.c
1186
cmdcnf->max_gid = cfg->max_gid;
usr.sbin/pw/pw_user.c
1188
cmdcnf->expire_days = cfg->expire_days;
usr.sbin/pw/pw_user.c
1190
cmdcnf->password_days = cfg->password_days;
usr.sbin/pw/pw_user.c
1204
const char *cfg = NULL;
usr.sbin/pw/pw_user.c
1234
cfg = optarg;
usr.sbin/pw/pw_user.c
1351
cnf = get_userconfig(cfg);
usr.sbin/pw/pw_user.c
1380
if (write_userconfig(cmdcnf, cfg))
usr.sbin/pw/pw_user.c
1536
const char *cfg = NULL;
usr.sbin/pw/pw_user.c
1567
cfg = optarg;
usr.sbin/pw/pw_user.c
1668
cnf = get_userconfig(cfg);
usr.sbin/pw/pw_user.c
717
const char *cfg = NULL;
usr.sbin/pw/pw_user.c
725
cfg = optarg;
usr.sbin/pw/pw_user.c
742
cnf = get_userconfig(cfg);
usr.sbin/pw/pw_user.c
847
const char *cfg = NULL;
usr.sbin/pw/pw_user.c
865
cfg = optarg;
usr.sbin/pw/pw_user.c
900
cnf = get_userconfig(cfg);
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
147
struct bt_config cfg;
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
154
avdtpACPFree_f(&c->cfg);
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
155
if (c->cfg.fd != -1)
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
156
close(c->cfg.fd);
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
157
if (c->cfg.hc != -1)
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
158
close(c->cfg.hc);
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
174
c->cfg.fd = -1;
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
178
c->cfg.hc = accept(r->fd_listen, (struct sockaddr *)&c->peer_addr, &addrlen);
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
180
message("Accepted control connection, %d\n", c->cfg.hc);
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
181
if (c->cfg.hc < 0) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
185
c->cfg.sep = 0; /* to be set later */
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
186
c->cfg.media_Type = mediaTypeAudio;
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
187
c->cfg.chmode = MODE_DUAL;
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
188
c->cfg.aacMode1 = 0; /* TODO: support AAC */
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
189
c->cfg.aacMode2 = 0;
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
190
c->cfg.acceptor_state = acpInitial;
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
205
switch (c->cfg.chmode) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
228
switch (c->cfg.freq) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
268
while (c->cfg.acceptor_state != acpStreamClosed) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
275
pfd[1].fd = c->cfg.hc;
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
279
pfd[2].fd = c->cfg.fd;
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
283
if (c->cfg.fd != -1)
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
295
c->cfg.acceptor_state);
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
296
retval = avdtpACPHandlePacket_f(&c->cfg);
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
310
if (c->cfg.fd < 0) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
311
if (c->cfg.acceptor_state == acpStreamOpened) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
313
c->cfg.fd = fd;
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
315
if (getsockopt(c->cfg.fd, SOL_L2CAP, SO_L2CAP_IMTU, &c->cfg.mtu, &mtusize) == -1) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
320
int temp = c->cfg.mtu * 32;
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
322
if (setsockopt(c->cfg.fd, SOL_SOCKET, SO_RCVBUF, &temp, sizeof(temp)) == -1) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
328
if (setsockopt(c->cfg.fd, SOL_SOCKET, SO_RCVLOWAT, &temp, sizeof(temp)) == -1) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
332
message("Accepted data connection, %d\n", c->cfg.fd);
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
342
if ((len = bt_receive_f(&c->cfg, data, sizeof(data), 0)) < 0) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
345
if (c->cfg.acceptor_state != acpStreamSuspended &&
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
358
switch (c->cfg.freq) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
373
if (c->cfg.chmode == MODE_MONO) {
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
419
if (c->cfg.acceptor_state == acpStreamSuspended &&
usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
54
static int (*avdtpACPHandlePacket_f)(struct bt_config *cfg);