Lines Matching defs:g
828 ** g -- generic argument structure
835 st_optionneg(g)
836 genarg *g;
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)
980 ** - libmilter can "fake" some features (e.g., SMFIP_NR_HDR)
989 r = fi_negotiate(g->a_ctx,
1158 ** g -- generic argument structure
1165 st_connectinfo(g)
1166 genarg *g;
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,
1280 ** g -- generic argument structure
1287 st_eoh(g)
1288 genarg *g;
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);
1304 ** g -- generic argument structure
1311 st_data(g)
1312 genarg *g;
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);
1329 ** g -- generic argument structure
1336 st_helo(g)
1337 genarg *g;
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);
1359 ** g -- generic argument structure
1366 st_header(g)
1367 genarg *g;
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); \
1404 ** g -- generic argument structure
1411 st_sender(g)
1412 genarg *g;
1421 ** g -- generic argument structure
1428 st_rcpt(g)
1429 genarg *g;
1438 ** g -- generic argument structure
1445 st_unknown(g)
1446 genarg *g;
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);
1463 ** g -- generic argument structure
1473 st_macros(g)
1474 genarg *g;
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;
1523 ** g -- generic argument structure
1531 st_quit(g)
1532 genarg *g;
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);
1549 ** g -- generic argument structure
1556 st_bodychunk(g)
1557 genarg *g;
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);
1574 ** g -- generic argument structure
1584 st_bodyend(g)
1585 genarg *g;
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);
1622 ** g -- generic argument structure
1629 st_abortfct(g)
1630 genarg *g;
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);