Changeset 440:f38bff0bf3e9 in freeDiameter for extensions/app_sip/tools/app_sip_ppr.c
- Timestamp:
- Jul 28, 2010, 4:17:29 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_sip/tools/app_sip_ppr.c
r435 r440 48 48 #include <stdlib.h> 49 49 #include <string.h> 50 #define PORT 667 50 51 51 #include <errno.h> 52 52 … … 66 66 struct pprsipaor pprsip; 67 67 int numdatatype=0,i=0; 68 68 int port=667; 69 69 70 sock = socket(AF_INET, SOCK_STREAM, 0); 70 71 sin.sin_addr.s_addr = inet_addr("127.0.0.1"); 71 72 sin.sin_family = AF_INET; 72 sin.sin_port = htons(PORT);73 73 74 74 75 //We initialize the structure … … 158 159 pprsip.accounting=1; 159 160 161 162 } 163 else if(strcmp(argv[i],"-p")==0) 164 { 165 166 if(sscanf(argv[i+1],"%d", &port)!=1) 167 { 168 fprintf(stderr,"Incorrect port number!\n"); 169 return 1; 170 } 171 172 160 173 i++; 161 174 } … … 170 183 } 171 184 185 //We set the port number 186 sin.sin_port = htons(port); 172 187 173 188 … … 180 195 181 196 182 197 fprintf(stderr,"%d!\n",port); 183 198 184 199 /*
Note: See TracChangeset
for help on using the changeset viewer.