Lines Matching defs:ne

1301  * int irp_marshall_nw(struct nwent *ne, char **buffer, size_t *len)
1314 irp_marshall_nw(struct nwent *ne, char **buffer, size_t *len) {
1320 if (ne == NULL || len == NULL) {
1324 strcpy(nAddrType, ADDR_T_STR(ne->n_addrtype));
1326 if (inet_net_ntop(ne->n_addrtype, ne->n_addr, ne->n_length,
1332 need += strlen(ne->n_name) + 1;
1333 need += joinlength(ne->n_aliases) + 1;
1358 strcpy(*buffer, ne->n_name); strcat(*buffer, fieldsep);
1359 joinarray(ne->n_aliases, *buffer, COMMA) ; strcat(*buffer, fieldsep);
1367 * int irp_unmarshall_nw(struct nwent *ne, char *buffer)
1380 irp_unmarshall_nw(struct nwent *ne, char *buffer) {
1392 if (ne == NULL || buffer == NULL) {
1446 ne->n_name = name;
1447 ne->n_aliases = aliases;
1448 ne->n_addrtype = naddrtype;
1449 ne->n_length = bits;
1450 ne->n_addr = malloc(sizeof nnet);
1451 if (ne->n_addr == NULL) {
1455 memcpy(ne->n_addr, &nnet, sizeof nnet);
1475 * int irp_marshall_ne(struct netent *ne, char **buffer, size_t *len)
1488 irp_marshall_ne(struct netent *ne, char **buffer, size_t *len) {
1495 if (ne == NULL || len == NULL) {
1499 strcpy(nAddrType, ADDR_T_STR(ne->n_addrtype));
1501 nval = htonl(ne->n_net);
1502 if (inet_ntop(ne->n_addrtype, &nval, nNet, sizeof nNet) == NULL) {
1506 need += strlen(ne->n_name) + 1;
1507 need += joinlength(ne->n_aliases) + 1;
1532 strcpy(*buffer, ne->n_name); strcat(*buffer, fieldsep);
1533 joinarray(ne->n_aliases, *buffer, COMMA) ; strcat(*buffer, fieldsep);
1541 * int irp_unmarshall_ne(struct netent *ne, char *buffer)
1554 irp_unmarshall_ne(struct netent *ne, char *buffer) {
1566 if (ne == NULL || buffer == NULL) {
1618 ne->n_name = name;
1619 ne->n_aliases = aliases;
1620 ne->n_addrtype = naddrtype;
1621 ne->n_net = nnet;
1994 struct nwent ne;
1998 if (irp_unmarshall_nw(&ne, argv[1]) != 0) {
2003 printf("Name: \"%s\"\n", ne.n_name);
2005 for (i = 0 ; ne.n_aliases[i] != NULL ; i++)
2006 printf("\n\t\"%s\"", ne.n_aliases[i]);
2007 printf("\nAddrtype: %s\n", ADDR_T_STR(ne.n_addrtype));
2008 inet_net_ntop(ne.n_addrtype, ne.n_addr, ne.n_length,
2011 *((long*)ne.n_addr) = htonl(*((long*)ne.n_addr));
2012 inet_net_ntop(ne.n_addrtype, ne.n_addr, ne.n_length,
2017 ne.n_name = np1->n_name;
2018 ne.n_aliases = np1->n_aliases;
2019 ne.n_addrtype = np1->n_addrtype;
2020 ne.n_addr = &np1->n_net;
2021 ne.n_length = (IN_CLASSA(np1->n_net) ?
2028 if (irp_marshall_nw(&ne, &b, &len) != 0) {