代码搜索:AF_INET
找到约 1,347 项符合「AF_INET」的源代码
代码结果 1,347
www.eeworm.com/read/129399/5973667
pl proxysvr.pl
#!/usr/bin/perl
# Version 1.02 1999-08-27
# Author Cay Horstmann
($url) = @ARGV;
$url =~ tr/+/ /;
$url =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$pos = index($url, "URL=http
www.eeworm.com/read/127694/6002415
c sock_set_port.c
#include "unp.h"
void
sock_set_port(struct sockaddr *sa, socklen_t salen, int port)
{
switch (sa->sa_family) {
case AF_INET: {
struct sockaddr_in *sin = (struct sockaddr_in *) sa;
sin->sin_por
www.eeworm.com/read/127694/6002435
c sock_ntop_host.c
#include "unp.h"
#ifdef HAVE_SOCKADDR_DL_STRUCT
# include
#endif
char *
sock_ntop_host(const struct sockaddr *sa, socklen_t salen)
{
static char str[128]; /* Unix domain is larges
www.eeworm.com/read/127694/6002853
c udpcli05.c
#include "unp.h"
int
main(int argc, char **argv)
{
int sockfd;
struct sockaddr_in servaddr;
if (argc != 2)
err_quit("usage: udpcli ");
bzero(&servaddr, sizeof(servaddr));
serv
www.eeworm.com/read/127694/6002870
c tisfdtype.c
#include "unp.h"
main()
{
int tcpsock, udpsock;
printf("stdin: %d\n", Isfdtype(STDIN_FILENO, S_IFSOCK));
printf("stdout: %d\n", Isfdtype(STDOUT_FILENO, S_IFSOCK));
printf("stderr: %d\n", Isfdtyp
www.eeworm.com/read/127694/6002880
c funcs.c
#include "test.h"
/*
* Fill in the global servaddr{} as a side effect.
*/
int
TcpSockByAddr(char *ipaddr, int port /* host byte order */ )
{
int sockfd;
sockfd = Socket(AF_INET, SOCK_STREAM
www.eeworm.com/read/127694/6002921
c tcpcli07.c
#include "unp.h"
int
main(int argc, char **argv)
{
int sockfd;
void sig_alrm(int);
struct itimerval val;
struct sockaddr_in servaddr;
if (argc != 2)
err_quit("usage: tcpcli
www.eeworm.com/read/481365/6639448
c aftostr.c
//
// AFtoSTR.CPP Returns a (const) string for a given
// address family ID
//
#include
////////////////////////////////////////////////////////////
ty
www.eeworm.com/read/410380/11289450
c ctl.c
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permi
www.eeworm.com/read/408584/11380154
c sctp_print_addrs.c
#include "unp.h"
void
sctp_print_addresses(struct sockaddr_storage *addrs, int num)
{
struct sockaddr_storage *ss;
int i,salen;
ss = addrs;
for(i=0; i