Lines Matching refs:algfd
27 void tst_alg_bind_addr(int algfd, const struct sockaddr_alg *addr)
29 const long ret = bind(algfd, (const struct sockaddr *)addr,
67 void tst_alg_bind(int algfd, const char *algtype, const char *algname)
73 tst_alg_bind_addr(algfd, &addr);
80 int algfd;
83 algfd = tst_alg_create();
87 ret = bind(algfd, (const struct sockaddr *)&addr, sizeof(addr));
92 close(algfd);
128 int algfd = tst_alg_create();
130 tst_alg_bind(algfd, algtype, algname);
132 close(algfd);
135 void tst_alg_setkey(int algfd, const uint8_t *key, unsigned int keylen)
148 ret = setsockopt(algfd, SOL_ALG, ALG_SET_KEY, key, keylen);
156 int tst_alg_accept(int algfd)
158 const long ret = accept(algfd, NULL, NULL);
170 int algfd = tst_alg_create();
172 tst_alg_bind(algfd, algtype, algname);
175 tst_alg_setkey(algfd, key, keylen);
177 return algfd;
183 int algfd = tst_alg_setup(algtype, algname, key, keylen);
184 int reqfd = tst_alg_accept(algfd);
186 close(algfd);