Lines Matching refs:g

835 st_optionneg(g)  in st_optionneg()  argument
836 genarg *g; in st_optionneg()
849 if (g == NULL || g->a_ctx->ctx_smfi == NULL)
851 ctx = g->a_ctx;
852 mi_clr_macros(ctx, g->a_idx + 1);
856 if (g->a_len < MILTER_OPTLEN)
861 (long) ctx->ctx_id, (int) g->a_len,
867 (void) memcpy((void *) &i, (void *) &(g->a_buf[0]), MILTER_LEN_BYTES);
887 (void) memcpy((void *) &i, (void *) &(g->a_buf[MILTER_LEN_BYTES]),
897 (void) memcpy((void *) &i, (void *) &(g->a_buf[MILTER_LEN_BYTES * 2]),
969 if (g->a_ctx->ctx_smfi != NULL &&
970 g->a_ctx->ctx_smfi->xxfi_version > 4 &&
971 (fi_negotiate = g->a_ctx->ctx_smfi->xxfi_negotiate) != NULL)
989 r = fi_negotiate(g->a_ctx,
1165 st_connectinfo(g) in st_connectinfo() argument
1166 genarg *g; in st_connectinfo()
1175 if (g == NULL)
1177 mi_clr_macros(g->a_ctx, g->a_idx + 1);
1178 if (g->a_ctx->ctx_smfi == NULL ||
1179 (fi_connect = g->a_ctx->ctx_smfi->xxfi_connect) == NULL)
1182 s = g->a_buf;
1184 l = g->a_len;
1200 g->a_ctx->ctx_smfi->xxfi_name,
1201 (long) g->a_ctx->ctx_id, (int) i, (int) l);
1219 g->a_ctx->ctx_smfi->xxfi_name,
1220 (long) g->a_ctx->ctx_id);
1237 g->a_ctx->ctx_smfi->xxfi_name,
1238 (long) g->a_ctx->ctx_id);
1256 g->a_ctx->ctx_smfi->xxfi_name,
1257 (long) g->a_ctx->ctx_id);
1267 g->a_ctx->ctx_smfi->xxfi_name,
1268 (long) g->a_ctx->ctx_id, family);
1272 return (*fi_connect)(g->a_ctx, g->a_buf,
1287 st_eoh(g) in st_eoh() argument
1288 genarg *g; in st_eoh()
1292 if (g == NULL)
1294 if (g->a_ctx->ctx_smfi != NULL &&
1295 (fi_eoh = g->a_ctx->ctx_smfi->xxfi_eoh) != NULL)
1296 return (*fi_eoh)(g->a_ctx);
1311 st_data(g) in st_data() argument
1312 genarg *g; in st_data()
1316 if (g == NULL)
1318 if (g->a_ctx->ctx_smfi != NULL &&
1319 g->a_ctx->ctx_smfi->xxfi_version > 3 &&
1320 (fi_data = g->a_ctx->ctx_smfi->xxfi_data) != NULL)
1321 return (*fi_data)(g->a_ctx);
1336 st_helo(g) in st_helo() argument
1337 genarg *g; in st_helo()
1341 if (g == NULL)
1343 mi_clr_macros(g->a_ctx, g->a_idx + 1);
1344 if (g->a_ctx->ctx_smfi != NULL &&
1345 (fi_helo = g->a_ctx->ctx_smfi->xxfi_helo) != NULL)
1348 if (g->a_len == 0 || g->a_buf[g->a_len - 1] != '\0')
1350 return (*fi_helo)(g->a_ctx, g->a_buf);
1366 st_header(g) in st_header() argument
1367 genarg *g; in st_header()
1372 if (g == NULL)
1374 if (g->a_ctx->ctx_smfi == NULL ||
1375 (fi_header = g->a_ctx->ctx_smfi->xxfi_header) == NULL)
1377 if (dec_arg2(g->a_buf, g->a_len, &hf, &hv) == MI_SUCCESS)
1378 return (*fi_header)(g->a_ctx, hf, hv);
1388 if (g == NULL) \
1390 mi_clr_macros(g->a_ctx, g->a_idx + 1); \
1391 if (g->a_ctx->ctx_smfi == NULL || \
1392 (lf = g->a_ctx->ctx_smfi->rf) == NULL) \
1394 if ((argv = dec_argv(g->a_buf, g->a_len)) == NULL) \
1396 r = (*lf)(g->a_ctx, argv); \
1411 st_sender(g) in st_sender() argument
1412 genarg *g; in st_sender()
1428 st_rcpt(g) in st_rcpt() argument
1429 genarg *g; in st_rcpt()
1445 st_unknown(g) in st_unknown() argument
1446 genarg *g; in st_unknown()
1450 if (g == NULL)
1452 if (g->a_ctx->ctx_smfi != NULL &&
1453 g->a_ctx->ctx_smfi->xxfi_version > 2 &&
1454 (fi_unknown = g->a_ctx->ctx_smfi->xxfi_unknown) != NULL)
1455 return (*fi_unknown)(g->a_ctx, (const char *) g->a_buf);
1473 st_macros(g) in st_macros() argument
1474 genarg *g; in st_macros()
1479 if (g == NULL || g->a_len < 1)
1481 if ((argv = dec_argv(g->a_buf + 1, g->a_len - 1)) == NULL)
1483 switch (g->a_buf[0])
1510 if (g->a_ctx->ctx_mac_ptr[i] != NULL)
1511 free(g->a_ctx->ctx_mac_ptr[i]);
1512 if (g->a_ctx->ctx_mac_buf[i] != NULL)
1513 free(g->a_ctx->ctx_mac_buf[i]);
1514 g->a_ctx->ctx_mac_ptr[i] = argv;
1515 g->a_ctx->ctx_mac_buf[i] = g->a_buf;
1531 st_quit(g) in st_quit() argument
1532 genarg *g; in st_quit()
1536 if (g == NULL)
1538 if (g->a_ctx->ctx_smfi != NULL &&
1539 (fi_close = g->a_ctx->ctx_smfi->xxfi_close) != NULL)
1540 (void) (*fi_close)(g->a_ctx);
1541 mi_clr_macros(g->a_ctx, 0);
1556 st_bodychunk(g) in st_bodychunk() argument
1557 genarg *g; in st_bodychunk()
1561 if (g == NULL)
1563 if (g->a_ctx->ctx_smfi != NULL &&
1564 (fi_body = g->a_ctx->ctx_smfi->xxfi_body) != NULL)
1565 return (*fi_body)(g->a_ctx, (unsigned char *)g->a_buf,
1566 g->a_len);
1584 st_bodyend(g) in st_bodyend() argument
1585 genarg *g; in st_bodyend()
1591 if (g == NULL)
1594 if (g->a_ctx->ctx_smfi != NULL)
1596 if ((fi_body = g->a_ctx->ctx_smfi->xxfi_body) != NULL &&
1597 g->a_len > 0)
1602 timeout.tv_sec = g->a_ctx->ctx_timeout;
1604 sd = g->a_ctx->ctx_sd;
1605 r = (*fi_body)(g->a_ctx, (unsigned char *)g->a_buf,
1606 g->a_len);
1608 sendreply(r, sd, &timeout, g->a_ctx) != MI_SUCCESS)
1613 (fi_eom = g->a_ctx->ctx_smfi->xxfi_eom) != NULL)
1614 return (*fi_eom)(g->a_ctx);
1629 st_abortfct(g) in st_abortfct() argument
1630 genarg *g; in st_abortfct()
1634 if (g == NULL)
1636 if (g != NULL && g->a_ctx->ctx_smfi != NULL &&
1637 (fi_abort = g->a_ctx->ctx_smfi->xxfi_abort) != NULL)
1638 (void) (*fi_abort)(g->a_ctx);