bool_t udp_make_socket(struct udpcommon *uc, struct udpsock *us,
int failmsgclass);
- /* Fills in us->fd. Logs any errors with lg_[v]perror. */
+ /* Caller should have filled in ->addr. Fills in us->fd,
+ ->experienced; updates ->addr. Logs any errors with lg_[v]perror. */
+bool_t udp_import_socket(struct udpcommon *uc, struct udpsock *us,
+ int failmsgclass, int fd);
+ /* Like udp_make_socket, but caller provides fd. fd is not closed
+ on error */
void udp_destroy_socket(struct udpcommon *uc, struct udpsock *us);
/* Idempotent. No errors are possible. */
#define UDP_APPLY_STANDARD(st,uc,desc) \
(uc)->use_proxy=False; \
(uc)->authbind=NULL; \
- (uc)->port=dict_read_number(d,"port",True,"udp",(uc)->cc.loc,0)
+ (uc)->port=dict_read_number(d,"port",False,"udp",(uc)->cc.loc,0)
/* Expects in scope: dict_t *d=...; */
#endif /*COMM_COMMON_H*/